2013-08-02 04:35:26 +00:00
<?xml version="1.0" encoding="utf-8"?>
<openerp >
<data >
<!-- Layout add nav and footer -->
2013-08-12 09:32:55 +00:00
<template id= "footer_custom" inherit_id= "website.layout" name= "Custom Footer" >
<xpath expr= "//body/header//ul[@id='top_menu']/li[last()]" position= "before" >
<li > <a href= "/event" > Events</a> </li>
</xpath>
<xpath expr= "//body/footer//a[@href='/page/website.contactus']" position= "after" >
<li > <a href= "/event" > Events</a> </li>
</xpath>
</template>
2013-08-02 04:35:26 +00:00
<!-- Page -->
2013-08-06 08:04:12 +00:00
2013-08-13 11:52:47 +00:00
<template id= "index" name= "Events" >
2013-08-02 04:35:26 +00:00
<t t-call= "website.layout" >
<t t-set= "head" >
2013-08-13 14:27:43 +00:00
<script type= "text/javascript" src= "/website_hr/static/src/js/website_hr.js" > </script>
2013-08-08 22:53:36 +00:00
<t t-raw= "head or ''" />
2013-08-02 04:35:26 +00:00
</t>
<t t-set= "title" > Events</t>
2013-08-02 09:11:31 +00:00
<div class= "container mt48" >
<div class= "row" >
2013-08-12 14:02:43 +00:00
<div class= "span4 css_noprint" id= "left_column" >
2013-08-02 09:11:31 +00:00
<ul class= "nav nav-list" >
2013-08-02 10:11:22 +00:00
<li class= "nav-header" > Date</li>
<t t-foreach= "dates" t-as= "date" >
2013-08-05 10:21:10 +00:00
<li t-att-class= "searches.get('date') == date[0] and 'active' or ''" >
<a t-att-href= "'/event/%%s&date=%%s' %% (search_path, date[0])" > <t t-esc= "date[1]" /> <small t-if= "date[3]" > (<t t-esc= "date[3]" /> )</small> </a>
2013-08-02 10:11:22 +00:00
</li>
</t>
</ul>
2013-08-02 09:11:31 +00:00
</div>
2013-08-12 13:43:12 +00:00
<div class= 'span8 navbar navbar-inverse' >
<div class= 'navbar-inner' >
<t t-call= "website.pager" >
<t t-set= "classname" > pull-left</t>
</t>
</div>
</div>
2013-08-02 09:11:31 +00:00
<div class= "span8" >
2013-08-12 13:43:12 +00:00
<ul class= "media-list" >
2013-08-06 08:04:12 +00:00
<li t-foreach= "event_ids" t-as= "event_id" class= "media thumbnail" >
<div class= "media-body" >
2013-08-07 09:47:34 +00:00
<span t-if= "not event_id.event_ticket_ids" class= "label pull-right" > No tickets needed.</span>
<t t-if= "event_id.event_ticket_ids" >
<span t-if= "event_id.register_avail == 9999" class= "label pull-right label-info" > Tickets availables.</span>
<span t-if= "not event_id.register_avail" class= "label pull-right" > No ticket available.</span>
<span t-if= "event_id.register_avail and event_id.register_avail != 9999" t-att-class= "'label pull-right label-%%s' %% (event_id.register_avail <= 10 and 'warning' or 'info')" >
2013-08-06 08:04:12 +00:00
<t t-if= "event_id.register_avail <= 10" > Only</t>
<t t-esc= "event_id.register_avail" />
<t t-if= "event_id.register_avail > 1" > tickets </t>
<t t-if= "event_id.register_avail == 1" > ticket </t>
available.
</span>
</t>
2013-08-06 09:31:15 +00:00
<h4 class= "media-heading" > <a t-att-href= "'/event/%%s/' %% event_id.id" > <span t-field= "event_id.name" > </span> </a> </h4>
2013-08-06 08:04:12 +00:00
<a t-if= "editable" href= "#" t-att-data-id= "event_id.id" class= "pull-right" >
2013-08-13 11:52:47 +00:00
<span t-att-class= "'label label-success js_unpublish %%s' %% (not event_id.website_published and 'hidden' or '')" > Unpublish</span>
<span t-att-class= "'label label-important js_publish %%s' %% (event_id.website_published and 'hidden' or '')" > Publish</span>
2013-08-06 08:04:12 +00:00
</a>
<div >
<span t-field= "event_id.type" > : </span>
<t t-if= "event_id.user_id" >
Organized by: <span t-field= "event_id.user_id" > </span>
</t>
2013-08-02 09:11:31 +00:00
</div>
2013-08-06 08:04:12 +00:00
<div >
<i class= "icon-time" > </i> <span t-field= "event_id.date_begin" > </span> <i > to</i> <span t-field= "event_id.date_end" > </span>
</div>
<div t-if= "event_id.country_id" >
<i class= "icon-map-marker" > </i> <span t-field= "event_id.city" > </span> <span t-field= "event_id.zip" > </span> , <span t-field= "event_id.country_id" > </span>
</div>
</div>
</li>
2013-08-02 09:11:31 +00:00
</ul>
</div>
2013-08-12 13:43:12 +00:00
<div class= "span8 offset4 text-center" >
<t t-call= "website.pager" />
</div>
2013-08-02 04:35:26 +00:00
</div>
</div>
</t>
</template>
2013-08-05 15:03:19 +00:00
2013-08-12 14:02:43 +00:00
<template id= "event_category" inherit_id= "website_event.index" inherit_option_id= "website_event.index" name= "Category" >
<xpath expr= "//div[@id='left_column']" position= "inside" >
<ul class= "nav nav-list" >
<li class= "nav-header" > Category</li>
<t t-foreach= "types" >
<li t-if= "type" t-att-class= "searches.get('type') == str(type and type[0]) and 'active' or ''" >
<a t-att-href= "'/event/%%s&type=%%s' %% (search_path, type[0])" > <t t-esc= "type[1]" /> <small > (<t t-esc= "type_count" /> )</small> </a>
</li>
</t>
</ul>
</xpath>
</template>
<template id= "event_location" inherit_id= "website_event.index" inherit_option_id= "website_event.index" name= "Location" >
<xpath expr= "//div[@id='left_column']" position= "inside" >
<ul class= "nav nav-list" >
<li class= "nav-header" > Location</li>
<t t-foreach= "countries" >
<li t-if= "country_id" t-att-class= "searches.get('country') == str(country_id and country_id[0]) and 'active' or ''" >
<a t-att-href= "'/event/%%s&country=%%s' %% (search_path, country_id[0])" > <t t-esc= "country_id[1]" /> <small > (<t t-esc= "country_id_count" /> )</small> </a>
</li>
</t>
</ul>
</xpath>
</template>
2013-08-05 15:03:19 +00:00
<template id= "detail" >
<t t-call= "website.layout" >
<t t-set= "head" >
<script type= "text/javascript" src= "/website_event/static/src/js/website_event.js" > </script>
<t t-raw= "head" />
</t>
<t t-set= "title" > Events</t>
<div class= "container mt48" >
<div class= "row" >
<div class= "span4 css_noprint" >
<h4 > When & Where</h4>
<img t-att-src= "google_map_url" />
<address >
2013-08-06 13:00:53 +00:00
<pre t-field= "event_id.address_id" />
2013-08-05 15:03:19 +00:00
<i class= "icon-time" > </i> <span t-field= "event_id.date_begin" > </span> <br />
2013-08-06 13:00:53 +00:00
<i class= "icon-time" > </i> <span t-field= "event_id.date_end" > </span>
2013-08-05 15:03:19 +00:00
<t t-if= "event_id.user_id" >
2013-08-06 13:00:53 +00:00
<h6 > Organized by:</h6>
<pre > <t t-field= "event_id.organizer_id" /> <br /> <span > & #x2706;</span> <span t-field= "event_id.phone" > </span> <br /> <i class= "icon-envelope" > </i> <span t-field= "event_id.email" > </span> </pre>
2013-08-05 15:03:19 +00:00
</t>
</address>
</div>
<div class= "span8" >
<div class= "media-body" >
2013-08-07 09:47:34 +00:00
<span t-if= "not event_id.event_ticket_ids" class= "label pull-right" > No tickets needed.</span>
<t t-if= "event_id.event_ticket_ids" >
<span t-if= "event_id.register_avail == 9999" class= "label pull-right" > Tickets availables.</span>
<span t-if= "not event_id.register_avail" class= "label pull-right" > No ticket available.</span>
<span t-if= "event_id.register_avail and event_id.register_avail != 9999" t-att-class= "'label pull-right label-%%s' %% (event_id.register_avail <= 10 and 'warning' or 'info')" >
2013-08-06 08:04:12 +00:00
<t t-if= "event_id.register_avail <= 10" > Only</t>
<t t-esc= "event_id.register_avail" />
<t t-if= "event_id.register_avail > 1" > tickets </t>
<t t-if= "event_id.register_avail == 1" > ticket </t>
available.
</span>
</t>
2013-08-06 09:31:15 +00:00
<h4 class= "media-heading" > <a t-att-href= "'/event/%%s/' %% event_id.id" > <span t-field= "event_id.name" > </span> </a> </h4>
2013-08-07 09:47:34 +00:00
<a t-if= "editable" href= "#" t-att-data-id= "event_id.id" class= "pull-right" >
2013-08-13 11:52:47 +00:00
<span t-att-class= "'label label-success js_unpublish %%s' %% (not event_id.website_published and 'hidden' or '')" > Unpublish</span>
<span t-att-class= "'label label-important js_publish %%s' %% (event_id.website_published and 'hidden' or '')" > Publish</span>
2013-08-07 09:47:34 +00:00
</a>
2013-08-06 13:00:53 +00:00
<h5 class= "media-heading" >
<span t-field= "event_id.address_id" /> <br />
<i class= "icon-time" > </i> <span t-field= "event_id.date_begin" /> <br />
<i class= "icon-time" > </i> <span t-field= "event_id.date_end" />
</h5>
2013-08-07 09:47:34 +00:00
<h4 t-if= "event_id.event_ticket_ids" > Ticket Information</h4>
<form t-att-action= "'/event/%%s/add_cart' %% event_id.id" method= "post" t-if= "event_id.event_ticket_ids" >
2013-08-06 15:21:58 +00:00
<table class= "table" >
2013-08-07 09:47:34 +00:00
<thead >
<tr >
<th > Ticket type</th>
<th > Sales End</th>
<th > Price</th>
<th > Seats</th>
<th > Quantity</th>
</tr>
</thead>
<tbody >
<tr t-foreach= "event_id.event_ticket_ids" t-as= "ticket" >
<td t-field= "ticket.product_id" />
<td t-field= "ticket.deadline" />
<td t-field= "ticket.price" />
<td > <span t-if= "ticket.register_max" > <t t-esc= "ticket.register_current" /> /<t t-field= "ticket.register_max" /> </span> </td>
<td >
2013-08-07 13:45:47 +00:00
<select t-if= "ticket.register_avail" t-att-name= "'ticket-%%s' %% ticket.id" >
<t t-foreach= "range(0, ticket.register_avail > 9 and 10 or ticket.register_avail+1 )" t-as= "nb" > <option t-esc= "nb" /> </t>
2013-08-07 09:47:34 +00:00
</select>
2013-08-07 13:45:47 +00:00
<span t-if= "not ticket.register_avail" > Not ticket available</span>
2013-08-07 09:47:34 +00:00
</td>
</tr>
</tbody>
2013-08-06 15:21:58 +00:00
</table>
2013-08-07 14:03:34 +00:00
<button type= "submit" class= "btn btn-primary" t-if= "event_id.register_avail" > Order Now</button>
2013-08-05 15:03:19 +00:00
</form>
<h4 > Event Details</h4>
<div t-field= "event_id.description_website" > </div>
</div>
</div>
</div>
</div>
</t>
</template>
2013-08-02 04:35:26 +00:00
</data>
2013-08-08 22:53:36 +00:00
</openerp>