[MERGE] saas-4 report_webkit missing dependency on report
[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.assets_editor" name="Event Editor" groups="event.group_event_manager">
6     <xpath expr="." position="inside">
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>
29                             <a href="/event">Our Events</a>
30                         </li>
31                         <li t-if="current_date"><t t-esc="current_date"/></li>
32                         <li t-if="current_type"><t t-esc="current_type.name"/></li>
33                         <li t-if="current_country"><t t-esc="current_country.name"/></li>
34                     </ol>
35                 </div><div class="col-sm-7">
36                     <t t-call="website.pager" >
37                         <t t-set="classname">pull-right</t>
38                     </t>
39                 </div>
40             </div>
41             <div class="row mt32 mb32">
42                 <div class="col-md-9" id="middle_column">
43                     <div class="text-center text-muted" t-if="not event_ids">
44                       <h1>No event found</h1>
45                       <t groups="base.group_website_publisher">
46                           <p groups="event.group_event_manager">Use the top menu <i>'Content'</i> to create your first event.</p>
47                       </t>
48                     </div>
49                     <ul class="media-list">
50                         <li t-foreach="event_ids" t-as="event" class="media">
51                             <div itemscope="itemscope" itemtype="http://schema.org/Event" class="media-body">
52                                 <h4 class="media-heading">
53                                     <a itemprop="url" t-att-class="event.state == 'done' and 'text-success'" t-attf-href="/event/#{ slug(event) }/#{(not event.menu_id) and 'register' or ''}"><span itemprop="name" t-field="event.name"> </span></a>
54                                     <small t-if="not event.website_published" class="label label-danger">not published</small>
55                                 </h4>
56                                 <div>
57                                     <t t-if="event.organizer_id">
58                                         Organized by: <span t-field="event.organizer_id"> </span>
59                                     </t>
60                                 </div>
61                                 <div>
62                                     <i class="fa fa-clock-o"></i> <span itemprop="startDate" t-field="event.date_begin" t-field-options='{"hide_seconds":"True"}'> </span> <i>to</i> <span itemprop="endDate" t-field="event.date_end" t-field-options='{"hide_seconds":"True"}'> </span>
63                                 </div>
64                                 <div itemprop="location" t-field="event.address_id" t-field-options='{
65                                     "widget": "contact",
66                                     "fields": ["city"]
67                                     }'/>
68                                 <div class="text-muted" t-if="event.type">
69                                     <i class="fa fa-tag"></i> <span t-field="event.type"/>
70                                 </div>
71                             </div>
72                         </li>
73                     </ul>
74                 </div>
75                 <div class="col-md-3 oe_structure" id="right_column">
76                 </div>
77             </div>
78         </div>
79         <div class="oe_structure"/>
80       </div>
81     </t>
82 </template>
83
84 <template id="event_right_photos" inherit_option_id="website_event.index" name="Photos">
85     <xpath expr="//div[@id='right_column']" position="inside">
86         <div class="row">
87             <div class="col-md-12 mb16">
88                 <div class="oe_demo">
89                     <img src="/website_event/static/src/img/openerp_enterprise_of_the_year.png" class="img-rounded"/>
90                     <div class="text-center"><a href="/event">Photos of Past Events</a></div>
91                 </div>
92             </div>
93             <div class="col-md-12 mb16">
94                 <div class="oe_demo">
95                     <img src="/website_event/static/src/img/training.jpg" class="img-rounded"/>
96                     <div class="text-center"><a href="/event">Our Trainings</a></div>
97                 </div>
98             </div>
99         </div>
100     </xpath>
101 </template>
102
103 <template id="event_right_quotes" inherit_option_id="website_event.index" name="Quotes">
104     <xpath expr="//div[@id='right_column']" position="inside">
105         <div class="row">
106             <div class="col-md-12 mb16">
107                 <blockquote class="oe_snippet_body">
108                     <p>
109                         Write here a quote from one of your attendees.
110                         It gives confidence in your
111                         events.
112                     </p>
113                     <small>Author</small>
114                 </blockquote>
115             </div>
116         </div>
117     </xpath>
118 </template>
119
120 <template id="event_right_country_event" inherit_option_id="website_event.index" name="Country Events">
121     <xpath expr="//div[@id='right_column']" position="inside">
122         <div class="row">
123             <div class="col-md-12 mb16 mt16 country_events">
124                 <div class="country_events_list">
125                     <div class="text-muted text-center">
126                         <h1>
127                             <i class="fa fa-flag fa-5x"></i>
128                         </h1>
129                         <h1>Events from Your Country</h1>
130                     </div>
131                 </div>
132             </div>
133         </div>
134     </xpath>
135 </template>
136
137 <template id="event_left_column" inherit_option_id="website_event.index" inherit_id="website_event.index" name="Filters">
138     <xpath expr="//div[@id='middle_column']" position="attributes">
139         <attribute name="class">col-md-6</attribute>
140     </xpath>
141     <xpath expr="//div[@id='middle_column']" position="before">
142         <div class="col-md-3 css_noprint" id="left_column">
143             <ul class="nav nav-pills nav-stacked">
144                 <t t-foreach="dates" t-as="date">
145                     <li t-att-class="searches.get('date') == date[0] and 'active' or ''" t-if="date[3] or (date[0] in ('old','all'))">
146                         <a t-attf-href="/event?{{ keep_query('country', 'type', date=date[0]) }}"><t t-esc="date[1]"/>
147                             <span t-if="date[3]" class="badge pull-right"><t t-esc="date[3]"/></span>
148                         </a>
149                     </li>
150                 </t>
151             </ul>
152         </div>
153     </xpath>
154 </template>
155
156 <template id="event_category" inherit_option_id="website_event.event_left_column" name="Filter by Category">
157     <xpath expr="//div[@id='left_column']" position="inside">
158         <ul class="nav nav-pills nav-stacked mt32">
159             <t t-foreach="types">
160                 <li t-if="type" t-att-class="searches.get('type') == str(type and type[0]) and 'active' or ''">
161                     <a t-attf-href="/event?{{ keep_query('country', 'date', type=type[0]) }}"><t t-esc="type[1]"/>
162                         <span class="badge pull-right"><t t-esc="type_count"/></span>
163                     </a>
164                 </li>
165             </t>
166         </ul>
167     </xpath>
168 </template>
169
170 <template id="event_location" inherit_option_id="website_event.event_left_column" name="Filter by Country">
171     <xpath expr="//div[@id='left_column']" position="inside">
172         <ul class="nav nav-pills nav-stacked mt32">
173             <t t-foreach="countries">
174                 <li t-if="country_id" t-att-class="searches.get('country') == str(country_id and country_id[0]) and 'active' or ''">
175                     <a t-attf-href="/event?{{ keep_query('type', 'data', country=country_id[0]) }}"><t t-esc="country_id[1]"/>
176                         <span class="badge pull-right"><t t-esc="country_id_count"/></span>
177                     </a>
178                 </li>
179             </t>
180         </ul>
181     </xpath>
182 </template>
183
184 <template id="layout">
185     <t t-call="website.layout">
186       <div id="wrap" class="js_event">
187         <div class="container">
188             <div class="row mt8">
189                 <div class="col-sm-7" id="event_menu">
190                     <ol class="breadcrumb mb0" t-if="not event.menu_id">
191                         <li><a href="/event">All Events</a></li>
192                         <li t-if="event.type">
193                             <a t-attf-href="/event?type=#{event.type.id}" t-esc="event.type.name"/>
194                         </li>
195                         <li t-if="event.country_id">
196                             <a t-attf-href="/event?country=#{event.country_id.id}" t-esc="event.country_id.name"/>
197                         </li>
198                         <li class="active">
199                             <span t-field="event.name"/>
200                         </li>
201                     </ol>
202                     <ol class="breadcrumb mb0" id="event_menu" t-if="event.menu_id">
203                         <t t-foreach="event.menu_id.child_id" t-as="submenu">
204                             <t t-call="website.submenu"/>
205                         </t>
206                     </ol>
207                 </div>
208                 <div class="col-sm-5" groups="event.group_event_manager">
209                     <t t-call="website.publish_management">
210                       <t t-set="object" t-value="event"/>
211                       <t t-set="publish_edit" t-value="True"/>
212                       <t t-set="action" t-value="'event.action_event_view'"/>
213                     </t>
214                 </div>
215             </div>
216         </div>
217         <t t-raw="0"/>
218         <div class="oe_structure"/>
219       </div>
220     </t>
221 </template>
222
223 <template id="template_location">
224     <t t-call="website_event.layout">
225         <section class="container" data-snippet-id="title">
226             <h1 class="text-center">Event Location</h1>
227         </section>
228         <div class="oe_structure oe_empty"/>
229     </t>
230 </template>
231
232 <template id="template_intro">
233     <t t-call="website_event.layout">
234         <section class="container" data-snippet-id="title">
235             <h1 class="text-center">Event Introduction</h1>
236         </section>
237         <div class="oe_structure oe_empty"/>
238     </t>
239 </template>
240
241 <template id="event_details">
242     <t t-call="website_event.layout">
243         <div itemscope="itemscope" itemtype="http://schema.org/Event" class="container">
244             <h1 itemprop="name" class="text-center" t-field="event.name"></h1>
245             <h4 class="text-center text-muted">
246                 <i class="fa fa-clock-o"></i> <span itemprop="startDate" t-field="event.date_begin" t-field-options='{"hide_seconds":"True"}'/> to
247                 <span itemprop="endDate" t-field="event.date_end" t-field-options='{"hide_seconds":"True"}'/>
248             </h4>
249             <h4 class="text-center text-muted"
250                 t-field="event.address_id" t-field-options='{
251                 "widget": "contact",
252                 "fields": ["city"]
253                 }'/>
254             <div class="row mt32 mb32">
255                 <t t-raw="0"/>
256             </div>
257         </div>
258     </t>
259 </template>
260
261 <template id="404">
262     <t t-call="website.layout">
263         <div id="wrap">
264             <div class="oe_structure oe_empty">
265                 <div class="container">
266                     <h1 class="mt32">Event not found!</h1>
267                     <p>Sorry, the requested event is not available anymore.</p>
268                     <p><a t-attf-href="/event">Return to the event list.</a></p>
269                 </div>
270             </div>
271         </div>
272     </t>
273 </template>
274
275 <template id="event_description_full">
276     <t t-call="website_event.event_details">
277         <div class="col-md-8">
278             <div itemprop="description" t-field="event.description"></div>
279             <div class="clearfix"/>
280             <ul class="media-list" id="comment">
281                 <li t-foreach="event.website_message_ids" t-as="comment" class="media">
282                     <div class="media-body">
283                         <t t-call="website.publish_management">
284                             <t t-set="object" t-value="comment"/>
285                             <t t-set="publish_edit" t-value="True"/>
286                         </t>
287                         <t t-raw="comment.body"/>
288                         <small class="pull-right muted text-right">
289                             <div t-field="comment.author_id"/>
290                             <div t-field="comment.date" t-field-options='{"hide_seconds":"True"}'/>
291                         </small>
292                     </div>
293                 </li>
294             </ul>
295         </div>
296         <div class="col-md-4 css_noprint">
297             <div class="clearfix"/>
298
299             <div class="panel panel-default" t-if="event.address_id">
300                 <div class="panel-heading">
301                     <h4>Where</h4>
302                 </div>
303                 <div class="panel-body">
304                     <a t-att-href="event.google_map_link()" target="_BLANK">
305                         <img t-att-src="event.google_map_img()" width="100%%"/>
306                     </a>
307                     <div itemprop="location" class="mt16 mb8" t-field="event.address_id" t-field-options='{
308                         "widget": "contact",
309                         "fields": ["address", "phone", "mobile", "fax", "email"]
310                         }'/>
311                 </div>
312             </div>
313
314             <div class="panel panel-default">
315                 <div class="panel-heading">
316                     <h4>When</h4>
317                 </div>
318                 <div class="panel-body">
319                     <i class="fa fa-clock-o"></i> From <span t-field="event.date_begin" t-field-options='{"hide_seconds":"True"}'> </span><br/>
320                     <i class="fa fa-clock-o"></i> To <span t-field="event.date_end" t-field-options='{"hide_seconds":"True"}'> </span>
321                 </div>
322             </div>
323
324             <div class="panel panel-default" t-if="event.organizer_id">
325                 <div class="panel-heading">
326                     <h4>Organizer</h4>
327                 </div>
328                 <div class="panel-body" t-field="event.organizer_id" t-field-options='{
329                     "widget": "contact",
330                     "fields": ["name", "phone", "mobile", "fax", "email"]
331                     }'/>
332             </div>
333
334             <div class="panel panel-default">
335                 <div class="panel-heading">
336                     <h4>Social Stream</h4>
337                 </div>
338                 <div class="panel-body">
339                     <t t-call="website_mail.follow"><t t-set="object" t-value="event"/></t>
340                     <div t-if="event.twitter_hashtag" class="mt16">
341                         <p><strong>Participate on Twitter</strong></p>
342                         <p class="text-muted">
343                             Find out what people see and say about this event, 
344                             and join the conversation.
345                         </p>
346                         <p><strong>Use this tag:
347                             <a t-att-href="'http://twitter.com/search?q=%23'+event.twitter_hashtag" target="_blank" class="label label-primary">#<span t-field="event.twitter_hashtag"/></a>
348                         </strong></p>
349                     </div>
350                 </div>
351             </div>
352         </div>
353     </t>
354 </template>
355
356 <template id="event_script" name="Country Events Snippet Script" inherit_id="website.layout">
357     <xpath expr="//head" position="inside">
358         <script type="text/javascript" src="/website_event/static/src/js/website_geolocation.js"></script>
359     </xpath>
360 </template>
361
362 <template id="country_events" name="Country Events" inherit_id="website.snippets">
363     <xpath expr="//div[@id='snippet_content']" position="inside">
364         <div>
365             <div class="oe_snippet_thumbnail">
366                 <div style="background: white;box-shadow:none;-webkit-box-shadow:none;" class="oe_snippet_thumbnail_img" >
367                     <i class="fa fa-flag fa-5x text-muted"></i>
368                 </div>
369                 <span class="oe_snippet_thumbnail_title">Local Events</span>
370             </div>
371             <div class="oe_snippet_body oe_country_events mb16 mt16">
372                 <div class="country_events_list">
373                     <div class="text-muted text-left">
374                         <div>
375                             <img style="max-height:10em;" class="img-rounded img-responsive" src="/website_event/static/src/img/world_map.jpg"></img>
376                         </div>
377                         <div>Events in visitor's country</div>
378                     </div>
379                 </div>
380             </div>
381         </div>
382     </xpath>
383     <xpath expr="//div[@id='snippet_options']" position="inside">
384         <div data-snippet-option-id='country_events'
385             data-selector=".oe_country_events"
386             data-selector-siblings="p, h1, h2, h3, blockquote, .well, .panel"
387             data-selector-children=".content"
388            >
389         </div>
390     </xpath>
391 </template>
392
393 <template id="country_events_list" name="Country">
394     <t t-ignore="true">
395         <t t-if="events">
396             <div class="country_events_list">
397                 <div>
398                     <t t-if="country">
399                         <img style="max-height:10em;" class="img-rounded img-responsive" t-att-src="'/website/image?model=res.country&amp;field=image&amp;id='+str(country.id)"></img>
400                         <h4><b>Events in <span t-esc="country.name"></span></b></h4>
401                     </t>
402                     <t t-if="not country">
403                         <img style="max-height:10em;" class="img-rounded img-responsive" src="/website_event/static/src/img/world_map.jpg"></img>
404                         <h4><b>Upcoming Events</b></h4>
405                     </t>
406                     <div t-foreach="events[:5]" t-as="event_dict" class="oe_website_overflow_ellipsis mb8">
407                         <t t-if="not event_dict['event'].website_published">
408                             <span class="label label-danger"><i class="fa fa-ban"></i></span>
409                         </t>
410                         <t t-if="event_dict['event'].address_id">
411                             <i class="fa fa-map-marker"></i>
412                         </t>
413                         <t t-if="not event_dict['event'].address_id">
414                             <i class="fa fa-cloud"></i>
415                         </t>
416                         <b><span t-esc="event_dict['date']"/>: <span><a t-att-href="event_dict['url']"><t t-esc="event_dict['event'].name"/></a></span></b>
417                     </div>
418                     <t t-if="len(events) > 5">
419                         <div t-if="country">
420                             <b><a t-att-href="'/event?country='+str(country.id)">See all events from <span t-esc="country.name"></span></a></b>
421                         </div>
422                         <div t-if="not country">
423                             <b><a href="/event"> See all upcoming events </a></b>
424                         </div>
425                     </t>
426                 </div>
427             </div>
428         </t>
429     </t>
430 </template>
431 </data>
432 </openerp>