34c515e3843a247bb7988948b883be90aea9432f
[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="event.group_event_manager">
6     <xpath expr="//script[@id='website_tour_js']" 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                         <div class="text-center text-muted">
48                           <h3 class="css_editable_display">No event found</h3>
49                           <h3 class="css_editable_hidden">There isn't available events right now, <t t-if="current_date or current_country or current_type">click <a t-attf-href="/event">here</a> to check all events or</t> click <a t-attf-href="/page/website.contactus">here</a> to contact us</h3>
50                           <t groups="base.group_website_publisher">
51                             <t groups="event.group_event_manager">
52                                 <p>Click on "Content" to define a new event or "Help" for more informations.</p>
53                                 <img src="/website/static/src/img/content_here.png"/>
54                                 <p>In the backend's event form contains information to customize your events: location, oranizer, tikets, registrations, etc.</p>
55                               </t>
56                           </t>
57                         </div>
58                     </t>
59                     <ul class="media-list">
60                         <li t-foreach="event_ids" t-as="event" class="media">
61                             <div class="media-body">
62                                 <h4 class="media-heading">
63                                     <a t-att-class="event.state == 'done' and 'text-success'" t-attf-href="/event/#{ slug(event) }/#{(not event.menu_id) and 'register/' or ''}"><span t-field="event.name"> </span></a>
64                                     <small t-if="not event.website_published" class="label label-danger">not published</small>
65                                 </h4>
66                                 <div>
67                                     <t t-if="event.organizer_id">
68                                         Organized by: <span t-field="event.organizer_id"> </span>
69                                     </t>
70                                 </div>
71                                 <div>
72                                     <i class="fa fa-clock-o"></i> <span t-field="event.date_begin"> </span> <i>to</i> <span t-field="event.date_end"> </span>
73                                 </div>
74                                 <div t-field="event.address_id" t-field-options='{
75                                     "widget": "contact",
76                                     "fields": ["city"]
77                                     }'/>
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_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_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-attf-href="/event/?{{ keep_query('country', 'type', 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
149 <template id="event_category" inherit_option_id="website_event.event_left_column" name="Filter by Category">
150     <xpath expr="//div[@id='left_column']" position="inside">
151         <ul class="nav nav-pills nav-stacked mt32">
152             <t t-foreach="types">
153                 <li t-if="type" t-att-class="searches.get('type') == str(type and type[0]) and 'active' or ''">
154                     <a t-attf-href="/event/?{{ keep_query('country', 'date', type=type[0] }}"><t t-esc="type[1]"/>
155                         <span class="badge pull-right"><t t-esc="type_count"/></span>
156                     </a>
157                 </li>
158             </t>
159         </ul>
160     </xpath>
161 </template>
162 <template id="event_location" inherit_option_id="website_event.event_left_column" name="Filter by Country">
163     <xpath expr="//div[@id='left_column']" position="inside">
164         <ul class="nav nav-pills nav-stacked mt32">
165             <t t-foreach="countries">
166                 <li t-if="country_id" t-att-class="searches.get('country') == str(country_id and country_id[0]) and 'active' or ''">
167                     <a t-attf-href="/event/?{{ keep_query('type', 'data', country=country_id[0] }}"><t t-esc="country_id[1]"/>
168                         <span class="badge pull-right"><t t-esc="country_id_count"/></span>
169                     </a>
170                 </li>
171             </t>
172         </ul>
173     </xpath>
174 </template>
175
176 <template id="layout">
177     <t t-call="website.layout">
178       <div id="wrap" class="js_event">
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-attf-href="/event?type=#{event.type.id}" t-esc="event.type.name"/>
186                         </li>
187                         <li t-if="event.country_id">
188                             <a t-attf-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" groups="event.group_event_manager">
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 class="text-center text-muted"
242                 t-field="event.address_id" t-field-options='{
243                 "widget": "contact",
244                 "fields": ["city"]
245                 }'/>
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-attf-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             <div t-field="event.description"></div>
271             <div class="clearfix"/>
272             <ul class="media-list" id="comment">
273                 <li t-foreach="event.website_message_ids" t-as="comment" class="media">
274                     <div class="media-body">
275                         <t t-call="website.publish_management">
276                             <t t-set="object" t-value="comment"/>
277                             <t t-set="publish_edit" t-value="True"/>
278                             <t t-set="publish_controller">/event/publish</t>
279                         </t>
280                         <t t-raw="comment.body"/>
281                         <small class="pull-right muted text-right">
282                             <div t-field="comment.author_id"/>
283                             <div t-field="comment.date"/>
284                         </small>
285                     </div>
286                 </li>
287             </ul>
288         </div>
289         <div class="col-md-4 css_noprint">
290             <div class="clearfix"/>
291
292             <div class="panel panel-default" t-if="event.address_id">
293                 <div class="panel-heading">
294                     <h4>Where</h4>
295                 </div>
296                 <div class="panel-body">
297                     <a t-att-href="event.google_map_link()" target="_BLANK">
298                         <img t-att-src="event.google_map_img()" width="100%%"/>
299                     </a>
300                     <div class="mt16 mb8" t-field="event.address_id" t-field-options='{
301                         "widget": "contact",
302                         "fields": ["address", "phone", "mobile", "fax", "email"]
303                         }'/>
304                 </div>
305             </div>
306
307             <div class="panel panel-default">
308                 <div class="panel-heading">
309                     <h4>When</h4>
310                 </div>
311                 <div class="panel-body">
312                     <i class="fa fa-clock-o"></i> <span t-field="event.date_begin"> </span><br/>
313                     <i class="fa fa-clock-o"></i> <span t-field="event.date_end"> </span>
314                 </div>
315             </div>
316
317             <div class="panel panel-default" t-if="event.organizer_id">
318                 <div class="panel-heading">
319                     <h4>Organizer</h4>
320                 </div>
321                 <div class="panel-body" t-field="event.organizer_id" t-field-options='{
322                     "widget": "contact",
323                     "fields": ["name", "phone", "mobile", "fax", "email"]
324                     }'/>
325             </div>
326
327             <div class="panel panel-default">
328                 <div class="panel-heading">
329                     <h4>Social Stream</h4>
330                 </div>
331                 <div class="panel-body">
332                     <t t-call="website_mail.follow"><t t-set="object" t-value="event"/></t>
333                     <div t-if="event.twitter_hashtag" class="mt16">
334                         <p><strong>Participate on Twitter</strong></p>
335                         <p class="text-muted">
336                             Find out what people see and say about this event, 
337                             and join the conversation.
338                         </p>
339                         <p><strong>Use this tag:
340                             <a t-att-href="'http://twitter.com/search?q=#'+event.twitter_hashtag" class="label label-primary">#<span t-field="event.twitter_hashtag"/></a>
341                         </strong></p>
342                     </div>
343                 </div>
344             </div>
345         </div>
346     </t>
347 </template>
348 </data>
349 </openerp>