[IMP] removing static style
[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="event_script" inherit_id="website.assets_frontend" name="Country Events Snippet Script">
6     <xpath expr="/t" position="inside">
7         <script type="text/javascript" src="/website_event/static/src/js/website_geolocation.js"></script>
8     </xpath>
9 </template>
10
11 <template id="editor_head" inherit_id="website.assets_editor" name="Event Editor" groups="event.group_event_manager">
12     <xpath expr="." position="inside">
13         <script type="text/javascript" src="/website_event/static/src/js/website_event.editor.js"></script>
14         <script type="text/javascript" src="/website_event/static/src/js/website.tour.event.js"></script>
15     </xpath>
16 </template>
17
18 <!-- Layout add nav and footer -->
19 <template id="header_footer_custom" inherit_id="website.layout" name="Footer Events Link">
20     <xpath expr="//footer//ul[@name='products']" position="inside">
21         <li><a href="/event">Events</a></li>
22     </xpath>
23 </template>
24
25 <!-- Page -->
26 <template id="index" name="Events">
27     <t t-call="website.layout">
28       <div id="wrap">
29         <div class="oe_structure"/>
30         <div class="container">
31             <div class="row mt8">
32                 <div class="col-sm-5">
33                     <ol class="breadcrumb mb0">
34                         <li>
35                             <a href="/event">Our Events</a>
36                         </li>
37                         <li t-if="current_date"><t t-esc="current_date"/></li>
38                         <li t-if="current_type"><t t-esc="current_type.name"/></li>
39                         <li t-if="current_country"><t t-esc="current_country.name"/></li>
40                     </ol>
41                 </div><div class="col-sm-7">
42                     <t t-call="website.pager" >
43                         <t t-set="classname">pull-right</t>
44                     </t>
45                 </div>
46             </div>
47             <div class="row mt32 mb32">
48                 <div class="col-md-9" id="middle_column">
49                     <div class="text-center text-muted" t-if="not event_ids">
50                       <h1>No event found</h1>
51                       <t groups="base.group_website_publisher">
52                           <p groups="event.group_event_manager">Use the top menu <i>'Content'</i> to create your first event.</p>
53                       </t>
54                     </div>
55                     <ul class="media-list">
56                         <li t-foreach="event_ids" t-as="event" class="media">
57                             <div itemscope="itemscope" itemtype="http://schema.org/Event" class="media-body">
58                                 <h4 class="media-heading">
59                                     <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>
60                                     <small t-if="not event.website_published" class="label label-danger">not published</small>
61                                 </h4>
62                                 <div>
63                                     <t t-if="event.organizer_id">
64                                         Organized by: <span t-field="event.organizer_id"> </span>
65                                     </t>
66                                 </div>
67                                 <div>
68                                     <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>
69                                 </div>
70                                 <div itemprop="location" t-field="event.address_id" t-field-options='{
71                                     "widget": "contact",
72                                     "fields": ["city"]
73                                     }'/>
74                                 <div class="text-muted" t-if="event.type">
75                                     <i class="fa fa-tag"></i> <span t-field="event.type"/>
76                                 </div>
77                             </div>
78                         </li>
79                     </ul>
80                 </div>
81                 <div class="col-md-3 oe_structure" id="right_column">
82                 </div>
83             </div>
84         </div>
85         <div class="oe_structure"/>
86       </div>
87     </t>
88 </template>
89
90 <template id="event_right_photos" inherit_option_id="website_event.index" name="Photos">
91     <xpath expr="//div[@id='right_column']" position="inside">
92         <div class="row">
93             <div class="col-md-12 mb16">
94                 <div class="oe_demo">
95                     <img src="/website_event/static/src/img/openerp_enterprise_of_the_year.png" class="img-rounded"/>
96                     <div class="text-center"><a href="/event">Photos of Past Events</a></div>
97                 </div>
98             </div>
99             <div class="col-md-12 mb16">
100                 <div class="oe_demo">
101                     <img src="/website_event/static/src/img/training.jpg" class="img-rounded"/>
102                     <div class="text-center"><a href="/event">Our Trainings</a></div>
103                 </div>
104             </div>
105         </div>
106     </xpath>
107 </template>
108
109 <template id="event_right_quotes" inherit_option_id="website_event.index" name="Quotes">
110     <xpath expr="//div[@id='right_column']" position="inside">
111         <div class="row">
112             <div class="col-md-12 mb16">
113                 <blockquote class="oe_snippet_body">
114                     <p>
115                         Write here a quote from one of your attendees.
116                         It gives confidence in your
117                         events.
118                     </p>
119                     <small>Author</small>
120                 </blockquote>
121             </div>
122         </div>
123     </xpath>
124 </template>
125
126 <template id="event_right_country_event" inherit_option_id="website_event.index" name="Country Events">
127     <xpath expr="//div[@id='right_column']" position="inside">
128         <div class="row">
129             <div class="col-md-12 mb16 mt16 country_events">
130                 <div class="country_events_list">
131                     <div class="text-muted text-center">
132                         <h1>
133                             <i class="fa fa-flag fa-5x"></i>
134                         </h1>
135                         <h1>Events from Your Country</h1>
136                     </div>
137                 </div>
138             </div>
139         </div>
140     </xpath>
141 </template>
142
143 <template id="event_left_column" inherit_option_id="website_event.index" inherit_id="website_event.index" name="Filters">
144     <xpath expr="//div[@id='middle_column']" position="attributes">
145         <attribute name="class">col-md-6</attribute>
146     </xpath>
147     <xpath expr="//div[@id='middle_column']" position="before">
148         <div class="col-md-3 css_noprint" id="left_column">
149             <ul class="nav nav-pills nav-stacked">
150                 <t t-foreach="dates" t-as="date">
151                     <li t-att-class="searches.get('date') == date[0] and 'active' or ''" t-if="date[3] or (date[0] in ('old','all'))">
152                         <a t-attf-href="/event?{{ keep_query('country', 'type', date=date[0]) }}"><t t-esc="date[1]"/>
153                             <span t-if="date[3]" class="badge pull-right"><t t-esc="date[3]"/></span>
154                         </a>
155                     </li>
156                 </t>
157             </ul>
158         </div>
159     </xpath>
160 </template>
161
162 <template id="event_category" inherit_option_id="website_event.event_left_column" name="Filter by Category">
163     <xpath expr="//div[@id='left_column']" position="inside">
164         <ul class="nav nav-pills nav-stacked mt32">
165             <t t-foreach="types">
166                 <li t-if="type" t-att-class="searches.get('type') == str(type and type[0]) and 'active' or ''">
167                     <a t-attf-href="/event?{{ keep_query('country', 'date', type=type[0]) }}"><t t-esc="type[1]"/>
168                         <span class="badge pull-right"><t t-esc="type_count"/></span>
169                     </a>
170                 </li>
171             </t>
172         </ul>
173     </xpath>
174 </template>
175
176 <template id="event_location" inherit_option_id="website_event.event_left_column" name="Filter by Country">
177     <xpath expr="//div[@id='left_column']" position="inside">
178         <ul class="nav nav-pills nav-stacked mt32">
179             <t t-foreach="countries">
180                 <li t-if="country_id" t-att-class="searches.get('country') == str(country_id and country_id[0]) and 'active' or ''">
181                     <a t-attf-href="/event?{{ keep_query('type', 'data', country=country_id[0]) }}"><t t-esc="country_id[1]"/>
182                         <span class="badge pull-right"><t t-esc="country_id_count"/></span>
183                     </a>
184                 </li>
185             </t>
186         </ul>
187     </xpath>
188 </template>
189
190 <template id="layout">
191     <t t-call="website.layout">
192       <div id="wrap" class="js_event">
193         <div class="container">
194             <div class="row mt8">
195                 <div class="col-sm-7" id="event_menu">
196                     <ol class="breadcrumb mb0" t-if="not event.menu_id">
197                         <li><a href="/event">All Events</a></li>
198                         <li t-if="event.type">
199                             <a t-attf-href="/event?type=#{event.type.id}" t-esc="event.type.name"/>
200                         </li>
201                         <li t-if="event.country_id">
202                             <a t-attf-href="/event?country=#{event.country_id.id}" t-esc="event.country_id.name"/>
203                         </li>
204                         <li class="active">
205                             <span t-field="event.name"/>
206                         </li>
207                     </ol>
208                     <ol class="breadcrumb mb0" id="event_menu" t-if="event.menu_id">
209                         <t t-foreach="event.menu_id.child_id" t-as="submenu">
210                             <t t-call="website.submenu"/>
211                         </t>
212                     </ol>
213                 </div>
214                 <div class="col-sm-5" groups="event.group_event_manager">
215                     <t t-call="website.publish_management">
216                       <t t-set="object" t-value="event"/>
217                       <t t-set="publish_edit" t-value="True"/>
218                       <t t-set="action" t-value="'event.action_event_view'"/>
219                     </t>
220                 </div>
221             </div>
222         </div>
223         <t t-raw="0"/>
224         <div class="oe_structure"/>
225       </div>
226     </t>
227 </template>
228
229 <template id="template_location">
230     <t t-call="website_event.layout">
231         <section class="container" data-snippet-id="title">
232             <h1 class="text-center">Event Location</h1>
233         </section>
234         <div class="oe_structure oe_empty"/>
235     </t>
236 </template>
237
238 <template id="template_intro">
239     <t t-call="website_event.layout">
240         <section class="container" data-snippet-id="title">
241             <h1 class="text-center">Event Introduction</h1>
242         </section>
243         <div class="oe_structure oe_empty"/>
244     </t>
245 </template>
246
247 <template id="event_details">
248     <t t-call="website_event.layout">
249         <div itemscope="itemscope" itemtype="http://schema.org/Event" class="container">
250             <h1 itemprop="name" class="text-center" t-field="event.name"></h1>
251             <h4 class="text-center text-muted">
252                 <i class="fa fa-clock-o"></i> <span itemprop="startDate" t-field="event.date_begin" t-field-options='{"hide_seconds":"True"}'/> to
253                 <span itemprop="endDate" t-field="event.date_end" t-field-options='{"hide_seconds":"True"}'/>
254             </h4>
255             <h4 class="text-center text-muted"
256                 t-field="event.address_id" t-field-options='{
257                 "widget": "contact",
258                 "fields": ["city"]
259                 }'/>
260             <div class="row mt32 mb32">
261                 <t t-raw="0"/>
262             </div>
263         </div>
264     </t>
265 </template>
266
267 <template id="404">
268     <t t-call="website.layout">
269         <div id="wrap">
270             <div class="oe_structure oe_empty">
271                 <div class="container">
272                     <h1 class="mt32">Event not found!</h1>
273                     <p>Sorry, the requested event is not available anymore.</p>
274                     <p><a t-attf-href="/event">Return to the event list.</a></p>
275                 </div>
276             </div>
277         </div>
278     </t>
279 </template>
280
281 <template id="event_description_full">
282     <t t-call="website_event.event_details">
283         <div class="col-md-8">
284             <div itemprop="description" t-field="event.description"></div>
285             <div class="clearfix"/>
286             <ul class="media-list" id="comment">
287                 <li t-foreach="event.website_message_ids" t-as="comment" class="media">
288                     <div class="media-body">
289                         <t t-call="website.publish_management">
290                             <t t-set="object" t-value="comment"/>
291                             <t t-set="publish_edit" t-value="True"/>
292                         </t>
293                         <t t-raw="comment.body"/>
294                         <small class="pull-right muted text-right">
295                             <div t-field="comment.author_id"/>
296                             <div t-field="comment.date" t-field-options='{"hide_seconds":"True"}'/>
297                         </small>
298                     </div>
299                 </li>
300             </ul>
301         </div>
302         <div class="col-md-4 css_noprint">
303             <div class="clearfix"/>
304
305             <div class="panel panel-default" t-if="event.address_id">
306                 <div class="panel-heading">
307                     <h4>Where</h4>
308                 </div>
309                 <div class="panel-body">
310                     <a t-att-href="event.google_map_link()" target="_BLANK">
311                         <img t-att-src="event.google_map_img()" width="100%%"/>
312                     </a>
313                     <div itemprop="location" class="mt16 mb8" t-field="event.address_id" t-field-options='{
314                         "widget": "contact",
315                         "fields": ["address", "phone", "mobile", "fax", "email"]
316                         }'/>
317                 </div>
318             </div>
319
320             <div class="panel panel-default">
321                 <div class="panel-heading">
322                     <h4>When</h4>
323                 </div>
324                 <div class="panel-body">
325                     <i class="fa fa-clock-o"></i> From <span t-field="event.date_begin" t-field-options='{"hide_seconds":"True"}'> </span><br/>
326                     <i class="fa fa-clock-o"></i> To <span t-field="event.date_end" t-field-options='{"hide_seconds":"True"}'> </span>
327                 </div>
328             </div>
329
330             <div class="panel panel-default" t-if="event.organizer_id">
331                 <div class="panel-heading">
332                     <h4>Organizer</h4>
333                 </div>
334                 <div class="panel-body" t-field="event.organizer_id" t-field-options='{
335                     "widget": "contact",
336                     "fields": ["name", "phone", "mobile", "fax", "email"]
337                     }'/>
338             </div>
339
340             <div class="panel panel-default">
341                 <div class="panel-heading">
342                     <h4>Social Stream</h4>
343                 </div>
344                 <div class="panel-body">
345                     <t t-call="website_mail.follow"><t t-set="object" t-value="event"/></t>
346                     <div t-if="event.twitter_hashtag" class="mt16">
347                         <p><strong>Participate on Twitter</strong></p>
348                         <p class="text-muted">
349                             Find out what people see and say about this event, 
350                             and join the conversation.
351                         </p>
352                         <p><strong>Use this tag:
353                             <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>
354                         </strong></p>
355                     </div>
356                 </div>
357             </div>
358         </div>
359     </t>
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 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 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: <span t-esc="country.name"></span></b></h4>
401                     </t>
402                     <t t-if="not country">
403                         <img 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>