[IMP] website: Removing unnecessary spaces at beginning of line
[odoo/odoo.git] / addons / website_event / views / website_event.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3 <data>
4
5 <template id="editor_head" inherit_id="website.editor_head" name="Event Editor" groups="base.group_website_designer">
6     <xpath expr="//script[last()]" position="after">
7         <script type="text/javascript" src="/website_event/static/src/js/website_event.editor.js"></script>
8         <script type="text/javascript" src="/website_event/static/src/js/website.tour.event.js"></script>
9     </xpath>
10 </template>
11
12 <!-- Layout add nav and footer -->
13 <template id="header_footer_custom" inherit_id="website.layout" name="Footer Events Link">
14     <xpath expr="//footer//ul[@name='products']" position="inside">
15         <li><a href="/event">Events</a></li>
16     </xpath>
17 </template>
18
19 <!-- Page -->
20 <template id="index" name="Events">
21     <t t-call="website.layout">
22       <div id="wrap">
23         <div class="oe_structure"/>
24         <div class="container">
25             <div class="row mt8">
26                 <div class="col-sm-5">
27                     <ol class="breadcrumb mb0">
28                         <li class="active">
29                             Our Events
30                         </li>
31                     </ol>
32                 </div><div class="col-sm-7">
33                     <t t-call="website.pager" >
34                         <t t-set="classname">pull-right</t>
35                     </t>
36                 </div>
37             </div>
38             <h3 class="text-center text-muted">
39                 <t t-esc="current_date or ''"/><span t-if="current_type"><t t-if="current_date">,</t>
40                   <t t-esc="current_type.name"/></span><span t-if="current_country"><t t-if="current_type or current_date">,</t>
41                   <t t-esc="current_country.name"/>
42                 </span>
43             </h3>
44             <div class="row mt32 mb32">
45                 <div class="col-md-9" id="middle_column">
46                     <t t-if="not event_ids">
47                         <p t-if="current_date or current_country or current_type">
48                             No event found in this category, check <a href="/event">all events</a>.
49                         </p>
50                         <p t-if="(current_date is None) and (current_country is None) and (current_type is None)">
51                             No events are planned for now on.
52                         </p>
53                     </t>
54                     <ul class="media-list">
55                         <li t-foreach="event_ids" t-as="event" class="media">
56                             <div class="media-body">
57                                 <t t-if="event.event_ticket_ids">
58                                     <span t-if="not event.register_avail" class="label label-danger pull-right">Sold Out</span>
59                                     <span t-if="event.register_avail and event.register_avail &lt;= ((event.register_max or 0) / 4)" class="label pull-right label-info">
60                                         Only <t t-esc="event.register_avail"/> Remaining
61                                     </span>
62                                 </t>
63                                 <h4 class="media-heading">
64                                     <a t-href="/event/#{ slug(event) }/#{(not event.menu_id) and 'register/' or ''}"><span t-field="event.name"> </span></a>
65                                     <small t-if="not event.website_published" class="label label-danger">not published</small>
66                                 </h4>
67                                 <div>
68                                     <t t-if="event.organizer_id">
69                                         Organized by: <span t-field="event.organizer_id"> </span>
70                                     </t>
71                                 </div>
72                                 <div>
73                                     <i class="fa fa-clock-o"></i> <span t-field="event.date_begin"> </span> <i>to</i> <span t-field="event.date_end"> </span>
74                                 </div>
75                                 <div t-if="event.country_id">
76                                     <i class="fa fa-map-marker"></i> <span t-field="event.city"/>, <span t-field="event.country_id"/>
77                                 </div>
78                                 <div class="text-muted">
79                                     <i class="fa fa-tag"></i> <span t-field="event.type"/>
80                                 </div>
81                             </div>
82                         </li>
83                     </ul>
84                 </div>
85                 <div class="col-md-3 oe_structure" id="right_column">
86                 </div>
87             </div>
88         </div>
89         <div class="oe_structure"/>
90       </div>
91     </t>
92 </template>
93
94 <template id="event_right_photos" inherit_id="website_event.index" inherit_option_id="website_event.index" name="Photos">
95     <xpath expr="//div[@id='right_column']" position="inside">
96         <div class="row">
97             <div class="col-md-12 mb16">
98                 <div class="oe_demo">
99                     <img src="/website_event/static/src/img/openerp_enterprise_of_the_year.png" class="img-rounded"/>
100                     <div class="text-center"><a href="/event">Photos of Past Events</a></div>
101                 </div>
102             </div>
103             <div class="col-md-12 mb16">
104                 <div class="oe_demo">
105                     <img src="/website_event/static/src/img/training.jpg" class="img-rounded"/>
106                     <div class="text-center"><a href="/event">Our Trainings</a></div>
107                 </div>
108             </div>
109         </div>
110     </xpath>
111 </template>
112
113 <template id="event_right_quotes" inherit_id="website_event.index" inherit_option_id="website_event.index" name="Quotes">
114     <xpath expr="//div[@id='right_column']" position="inside">
115         <div class="row">
116             <div class="col-md-12 mb16">
117                 <blockquote class="oe_snippet_body">
118                     <p>
119                         Write here a quote from one of your attendees.
120                         It gives confidence in your
121                         events.
122                     </p>
123                     <small>Author</small>
124                 </blockquote>
125             </div>
126         </div>
127     </xpath>
128 </template>
129
130 <template id="event_left_column" inherit_option_id="website_event.index" name="Filters">
131     <xpath expr="//div[@id='middle_column']" position="attributes">
132         <attribute name="class">col-md-6</attribute>
133     </xpath>
134     <xpath expr="//div[@id='middle_column']" position="before">
135         <div class="col-md-3 css_noprint" id="left_column">
136             <ul class="nav nav-pills nav-stacked">
137                 <t t-foreach="dates" t-as="date">
138                     <li t-att-class="searches.get('date') == date[0] and 'active' or ''" t-if="date[3] or (date[0] in ('old','all'))">
139                         <a t-href="/event/#{ search_path }&amp;date=#{ date[0] }"><t t-esc="date[1]"/>
140                             <span t-if="date[3]" class="badge pull-right"><t t-esc="date[3]"/></span>
141                         </a>
142                     </li>
143                 </t>
144             </ul>
145         </div>
146     </xpath>
147 </template>
148 <template id="event_category" inherit_id="website_event.event_left_column" inherit_option_id="website_event.event_left_column" name="Filter by Category">
149     <xpath expr="//div[@id='left_column']" position="inside">
150         <ul class="nav nav-pills nav-stacked mt32">
151             <t t-foreach="types">
152                 <li t-if="type" t-att-class="searches.get('type') == str(type and type[0]) and 'active' or ''">
153                     <a t-href="/event/#{ search_path }&amp;type=#{ type[0] }"><t t-esc="type[1]"/>
154                         <span class="badge pull-right"><t t-esc="type_count"/></span>
155                     </a>
156                 </li>
157             </t>
158         </ul>
159     </xpath>
160 </template>
161 <template id="event_location" inherit_id="website_event.event_left_column" inherit_option_id="website_event.event_left_column" name="Filter by Country">
162     <xpath expr="//div[@id='left_column']" position="inside">
163         <ul class="nav nav-pills nav-stacked mt32">
164             <t t-foreach="countries">
165                 <li t-if="country_id" t-att-class="searches.get('country') == str(country_id and country_id[0]) and 'active' or ''">
166                     <a t-href="/event/#{ search_path }&amp;country=#{ country_id[0] }"><t t-esc="country_id[1]"/>
167                         <span class="badge pull-right"><t t-esc="country_id_count"/></span>
168                     </a>
169                 </li>
170             </t>
171         </ul>
172     </xpath>
173 </template>
174
175 <template id="layout">
176     <t t-call="website.layout">
177       <div id="wrap">
178         <div class="oe_structure"/>
179         <div class="container">
180             <div class="row mt8">
181                 <div class="col-sm-7" id="event_menu">
182                     <ol class="breadcrumb mb0" t-if="not event.menu_id">
183                         <li><a href="/event">All Events</a></li>
184                         <li t-if="event.type">
185                             <a t-href="/event?type=#{event.type.id}" t-esc="event.type.name"/>
186                         </li>
187                         <li t-if="event.country_id">
188                             <a t-href="/event?country=#{event.country_id.id}" t-esc="event.country_id.name"/>
189                         </li>
190                         <li class="active">
191                             <span t-field="event.name"/>
192                         </li>
193                     </ol>
194                     <ol class="breadcrumb mb0" id="event_menu" t-if="event.menu_id">
195                         <t t-foreach="event.menu_id.child_id" t-as="submenu">
196                             <t t-call="website.submenu"/>
197                         </t>
198                     </ol>
199                 </div>
200                 <div class="col-sm-5">
201                     <t t-call="website.publish_management">
202                         <t t-set="object" t-value="event"/>
203                         <t t-set="publish_edit" t-value="True"/>
204                         <t t-set="publish_controller">/event/publish</t>
205                     </t>
206                 </div>
207             </div>
208         </div>
209         <t t-raw="0"/>
210         <div class="oe_structure"/>
211       </div>
212     </t>
213 </template>
214
215 <template id="template_location">
216     <t t-call="website_event.layout">
217         <section class="container" data-snippet-id="title">
218             <h1 class="text-center">Event Location</h1>
219         </section>
220         <div class="oe_structure oe_empty"/>
221     </t>
222 </template>
223
224 <template id="template_intro">
225     <t t-call="website_event.layout">
226         <section class="container" data-snippet-id="title">
227             <h1 class="text-center">Event Introduction</h1>
228         </section>
229         <div class="oe_structure oe_empty"/>
230     </t>
231 </template>
232
233 <template id="event_details">
234     <t t-call="website_event.layout">
235         <div class="container">
236             <h1 class="text-center" t-field="event.name"></h1>
237             <h4 class="text-center text-muted">
238                 <i class="fa fa-clock-o"></i> <span t-field="event.date_begin"/> to
239                 <span t-field="event.date_end"/>
240             </h4>
241             <h4 t-if="event.city and event.country_id" class="text-center text-muted">
242                 <i class="fa fa-map-marker"/>
243                 <span t-field="event.city"/>,
244                 <span t-field="event.country_id"/>
245             </h4>
246             <div class="row mt32 mb32">
247                 <t t-raw="0"/>
248             </div>
249         </div>
250     </t>
251 </template>
252
253 <template id="404">
254     <t t-call="website.layout">
255         <div id="wrap">
256             <div class="oe_structure oe_empty">
257                 <div class="container">
258                     <h1 class="mt32">Event not found!</h1>
259                     <p>Sorry, the requested event is not available anymore.</p>
260                     <p><a t-href="/event/">Return to the event list.</a></p>
261                 </div>
262             </div>
263         </div>
264     </t>
265 </template>
266
267 <template id="event_description_full">
268     <t t-call="website_event.event_details">
269         <div class="col-md-8">
270             <form t-action="/event/add_cart?event_id=#{ event.id }" method="post" t-if="event.event_ticket_ids">
271                 <table class="table table-striped">
272                     <thead>
273                         <tr>
274                             <th>Ticket Type</th>
275                             <th style="min-width: 100px">Sales End</th>
276                             <th style="min-width: 100px">Price</th>
277                             <th></th>
278                             <th>Quantity</th>
279                         </tr>
280                     </thead>
281                     <tbody>
282                         <tr t-foreach="event.event_ticket_ids" t-as="ticket">
283                             <td>
284                                 <div t-field="ticket.name"/>
285                                 <div><small t-field="ticket.product_id.description_sale"/></div>
286                             </td>
287                             <td><span t-field="ticket.deadline"/></td>
288                             <td>
289                                 <t t-if="ticket.price or editable"><span t-field="ticket.price" t-field-options='{
290                                        "widget": "monetary",
291                                        "display_currency": "website.pricelist_id.currency_id"
292                                   }'/>
293                                 </t>
294                                 <t t-if="not ticket.price and not editable">
295                                     <span>Free</span>
296                                 </t>
297                             </td>
298                             <td>
299                                 <span t-if="ticket.register_max and ((ticket.register_current or 0)*100 / ticket.register_max)&gt;75" class="text-muted">
300                                     <t t-esc="ticket.register_max - ticket.register_current"/> <span>left</span>
301                                 </span>
302                             </td>
303                             <td>
304                                 <select t-if="ticket.register_avail" t-attf-name="ticket-#{ ticket.id }" class="form-control">
305                                     <t t-foreach="range(0, ticket.register_avail > 9 and 10 or ticket.register_avail+1 )" t-as="nb"><option t-esc="nb"/></t>
306                                 </select>
307                                 <span t-if="not ticket.register_avail">Sold Out</span>
308                             </td>
309                         </tr>
310                     </tbody>
311                 </table>
312                 <button type="submit" class="btn btn-primary btn-lg pull-right" t-if="event.register_avail">Order Now</button>
313                 <div class="clearfix"/>
314                 <hr/>
315             </form>
316             <div t-field="event.description"></div>
317             <div class="clearfix"/>
318             <ul class="media-list" id="comment">
319                 <li t-foreach="event.website_message_ids" t-as="comment" class="media">
320                     <div class="media-body">
321                         <t t-call="website.publish_management">
322                             <t t-set="object" t-value="comment"/>
323                             <t t-set="publish_edit" t-value="True"/>
324                             <t t-set="publish_controller">/event/publish</t>
325                         </t>
326                         <t t-raw="comment.body"/>
327                         <small class="pull-right muted text-right">
328                             <div t-field="comment.author_id"/>
329                             <div t-field="comment.date"/>
330                         </small>
331                     </div>
332                 </li>
333             </ul>
334         </div>
335         <div class="col-md-4 css_noprint">
336             <div class="clearfix"/>
337
338             <div class="panel panel-default" t-if="event.address_id">
339                 <div class="panel-heading">
340                     <h4>Where</h4>
341                 </div>
342                 <div class="panel-body">
343                     <a t-att-href="event.google_map_link()" target="_BLANK">
344                         <img t-att-src="event.google_map_img()" width="100%%"/>
345                     </a>
346                     <div class="mt16 mb8" t-field="event.address_id" t-field-options='{
347                         "widget": "contact",
348                         "fields": ["address", "phone", "mobile", "fax", "email"]
349                         }'/>
350                 </div>
351             </div>
352
353             <div class="panel panel-default">
354                 <div class="panel-heading">
355                     <h4>When</h4>
356                 </div>
357                 <div class="panel-body">
358                     <i class="fa fa-clock-o"></i> <span t-field="event.date_begin"> </span><br/>
359                     <i class="fa fa-clock-o"></i> <span t-field="event.date_end"> </span>
360                 </div>
361             </div>
362
363             <div class="panel panel-default" t-if="event.organizer_id">
364                 <div class="panel-heading">
365                     <h4>Organizer</h4>
366                 </div>
367                 <div class="panel-body" t-field="event.organizer_id" t-field-options='{
368                     "widget": "contact",
369                     "fields": ["name", "phone", "mobile", "fax", "email"]
370                     }'/>
371             </div>
372
373             <div class="panel panel-default">
374                 <div class="panel-heading">
375                     <h4>Social Stream</h4>
376                 </div>
377                 <div class="panel-body">
378                     <t t-call="website_mail.follow"><t t-set="object" t-value="event"/></t>
379                     <div t-if="event.twitter_hashtag" class="mt16">
380                         <p><strong>Participate on Twitter</strong></p>
381                         <p class="text-muted">
382                             Find out what others are seeing and
383                             saying about this event, and join the
384                             conversation.
385                         </p>
386                         <p><strong>Use this tag:
387                             <a t-att-href="'http://twitter.com/search?q=#'+event.twitter_hashtag" class="label label-primary">#<span t-field="event.twitter_hashtag"/></a>
388                         </strong></p>
389                     </div>
390                 </div>
391             </div>
392         </div>
393     </t>
394 </template>
395 </data>
396 </openerp>