[FIX] Some fixes for base_import_module
[odoo/odoo.git] / addons / website_event_track / views / website_event.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3 <data>
4
5 <template name="Sponsors" id="event_sponsor" customize_show="True" inherit_id="website_event.layout">
6     <xpath expr="//t[@t-call='website.layout']" position="inside">
7         <t t-set="head">
8             <link rel='stylesheet' href='/website_event_track/static/src/css/website_event_track.css'/>
9             <t t-raw="head or ''"/>
10         </t>
11     </xpath>
12     <xpath expr="//div[@id='wrap']" position="inside">
13         <div class="container mt32 mb16 hidden-print" t-if="event.sponsor_ids">
14             <section data-snippet-id="title">
15                 <h2 class="text-center mb32">Our Sponsors</h2>
16             </section>
17             <div class="row">
18                 <div t-attf-class="col-md-#{(len(event.sponsor_ids) > 6) and 2 or (12/ len(event.sponsor_ids))} text-center mb16" t-foreach="event.sponsor_ids" t-as="sponsor">
19                     <t t-if="sponsor.url">
20                         <a t-att-href="sponsor.url" style="position: relative; display: inline-block;">
21                             <span t-field="sponsor.image_medium"
22                                 t-field-options='{"widget": "image", "class": "shadow"}'/>
23                             <div class="ribbon-wrapper">
24                                 <div t-field="sponsor.sponsor_type_id" t-attf-class="ribbon ribbon_#{sponsor.sponsor_type_id.name}"/>
25                             </div>
26                         </a>
27                     </t>
28                     <t t-if="not sponsor.url">
29                         <span style="position: relative; display: inline-block;">
30                             <span t-field="sponsor.image_medium"
31                                 t-field-options='{"widget": "image", "class": "shadow"}'/>
32                             <div class="ribbon-wrapper">
33                                 <div t-field="sponsor.sponsor_type_id" t-attf-class="ribbon ribbon_#{sponsor.sponsor_type_id.name}"/>
34                             </div>
35                         </span>
36                     </t>
37                 </div>
38             </div>
39         </div>
40     </xpath>
41 </template>
42
43 <template id="agenda">
44     <t t-call="website_event.layout">
45         <t t-set="head">
46           <script type="text/javascript" src="/website_event_track/static/src/js/website_event_track.js"></script>
47           <t t-raw="head or ''"/>
48         </t>
49         <section class="container">
50             <h1 class="text-center" t-field="event.name"/>
51             <div class="form-inline pull-right">
52                 <label class="invisible text-muted" id="search_summary"><span id="search_number">0</span> Found </label>
53                 <input type="text" class="form-control" placeholder="Filter Tracks..." id="event_track_search"/>
54             </div>
55         </section>
56         <t t-set="dayslist" t-value="days.keys()"/>
57         <t t-set="dayslist2" t-value="dayslist.sort()"/> <!-- display days in the right order -->
58         <section class="container" t-foreach="dayslist" t-as="day">
59             <t t-set="locations" t-value="days[day]['locations']"/>
60             <t t-set="dates" t-value="days[day]['dates']"/>
61             <h3 class="page-header mt0">
62                 <t t-esc="day"/>
63                 <small><t t-esc="days_nbr[day]"/> talks</small>
64             </h3>
65             <table id="table_search" class="table table-bordered table-condensed">
66             <tr>
67                 <th/>
68                 <t t-foreach="locations.keys()" t-as="location">
69                     <th t-if="location" class="active">
70                         <span t-esc="location and location.name or 'Unknown'"/>
71                     </th>
72                 </t>
73             </tr>
74             <tr t-foreach="dates" t-as="dt">
75                 <td class="active">
76                     <b t-esc="dt[0].strftime('%H:%M')"/>
77                 </td>
78                 <t t-if="dt[2]"> <!-- Not a multi location -->
79                     <t t-foreach="locations" t-as="location">
80                         <t t-if="location and dt[1].get(location, False)">
81                             <t t-set="track" t-value="dt[1][location][0]"/>
82                             <t t-if="track">
83                                 <td t-att-rowspan="dt[1][location][3]" t-attf-class="event_color_#{track.color} #{track and 'event_track' or ''}">
84                                     <t t-if="track">
85                                         <a t-attf-href="/event/#{ slug(event) }/track/#{ slug(track) }">
86                                             <span t-esc="track and track.name"/>
87                                         </a>
88                                         <div class="text-muted">
89                                             <small t-esc="speakers[track.id]"/>
90                                         </div>
91                                     </t>
92                                 </td>
93                             </t>
94                             <td t-if="not track" t-att-rowspan="dt[1][location][3]" class="event_track"/>
95                         </t>
96                     </t>
97                 </t><t t-if="not dt[2]">
98                     <t t-set="track" t-value="dt[1][False][0]"/>
99                     <td t-att-colspan="len(locations)-1" t-attf-class="text-center event_color_#{track.color} #{track and 'event_track' or ''}">
100                         <a t-attf-href="/event/#{ slug(event) }/track/#{ slug(track) }">
101                             <span t-esc="track.name"/>
102                         </a>
103                         <div class="text-muted">
104                             <small t-esc="speakers[track.id]"/>
105                         </div>
106                     </td>
107                 </t>
108             </tr>
109             </table>
110         </section>
111     </t>
112 </template>
113
114
115 <template id="tracks">
116     <t t-call="website_event.event_details">
117         <div id="left_column">
118         </div>
119         <div class="col-md-9">
120             <div class="alert alert-warning" t-if="not len(tracks)">
121                 No tracks found!
122             </div>
123             <div class="row mb32" t-foreach="tracks" t-as="track">
124                 <div class="col-sm-2">
125                     <t t-if="track.image">
126                         <span t-field="track.image"
127                             t-field-options='{"widget": "image", "class": "img-circle"}'/>
128                     </t>
129                 </div>
130                 <div class="col-sm-10">
131                     <h3 class="mt0 mb0">
132                         <a t-attf-href="/event/#{ slug(event) }/track/#{ slug(track) }"><span t-field="track.name"> </span></a>
133                         <small t-if="not track.website_published" class="label label-danger">not published</small>
134                     </h3>
135                     <ul class="list-inline mb0">
136                         <li t-if="track.speaker_ids" class="text-muted fa fa-user">
137                             <t t-esc="', '.join([speaker.name for speaker in track.speaker_ids])"></t>
138                         </li>
139                         <li class="text-muted fa fa-calendar"> <span t-field="track.date" t-field-options='{"hide_seconds":"True"}'/></li>
140                         <li class="text-muted fa fa-map-marker" t-if="track.location_id">
141                             <span t-field="track.location_id"/>
142                         </li>
143                     </ul>
144                     <ul class="list-inline">
145                         <li t-foreach="track.tag_ids" t-as="tag_id" class="text-muted fa fa-tags">
146                             <a t-attf-href="/event/#{ slug(event) }/track/tag/#{ slug(tag_id) }">
147                                 <span t-field="tag_id.name"/>
148                             </a>
149                         </li>
150                     </ul>
151                     <p class="mt8"><t t-esc="html2text(track.description or '')[0:500]"/>...</p>
152                 </div>
153             </div>
154         </div>
155     </t>
156 </template>
157
158 <template id="tracks_filter" inherit_id="website_event_track.tracks" customize_show="True" name="Filter on Tags">
159     <xpath expr="//div[@id='left_column']" position="inside">
160         <ul class="nav nav-pills nav-stacked">
161             <li t-att-class="'' if searches.get('tag') else 'active'"><a t-attf-href="/event/#{ slug(event) }/track">All Tags</a></li>
162             <t t-foreach="tags" t-as="tag">
163                 <li t-att-class="searches.get('tag') == tag.id and 'active' or ''">
164                     <a t-attf-href="/event/#{ slug(event) }/track/tag/#{ slug(tag) }">
165                         <t t-esc="tag.name"/>
166                     </a>
167                 </li>
168             </t>
169         </ul>
170     </xpath>
171     <xpath expr="//div[@id='left_column']" position="attributes">
172         <attribute name="class">col-md-3 css_no_print</attribute>
173     </xpath>
174 </template>
175
176
177
178 <template id="track_view">
179     <t t-call="website_event.layout">
180         <div class="container">
181             <t t-call="website.publish_management">
182                 <t t-set="object" t-value="track"/>
183                 <t t-set="publish_edit" t-value="True"/>
184             </t>
185             <div class="clearfix"/>
186
187             <h2 t-field="track.name" class="text-center"/>
188             <h3 t-field="event.name" class="text-center text-muted"/>
189             <ul t-if="track.tag_ids" class="text-center text-muted list-inline">
190                 <li t-foreach="track.tag_ids" t-as="tag_id">
191                     <span class="fa fa-tags"></span>
192                     <a t-attf-href="/event/#{ slug(event) }/track/tag/#{ slug(tag_id) }">
193                         <span t-field="tag_id.name"/>
194                     </a>
195                 </li>
196             </ul>
197
198             <section class="row mt32">
199                 <div class="col-md-8">
200                     <div t-field="track.description"/>
201                     <div t-foreach="track.speaker_ids" t-as="speaker" class="well mt32">
202                         <div class="row">
203                             <div class="col-sm-2">
204                                 <span t-field="track.image"
205                                     t-field-options='{"widget": "image", "class": "img-circle"}'/>
206                             </div><div class="col-sm-10">
207                                <h4 t-field="speaker.name" class="mb4"/>
208                                <div class="fa fa-home mb16" t-if="speaker.website">
209                                    <a t-att-href="speaker.website"><span t-field="speaker.website"/></a>
210                                </div>
211                                <div t-field="speaker.website_description"/>
212                             </div>
213                         </div>
214                     </div>
215                 </div>
216                 <div class="col-md-4" id="right_column">
217                     <div class="panel panel-default">
218                         <div class="panel-heading">
219                             <h4>Practical Info</h4>
220                         </div>
221                         <div class="panel-body">
222                             <b>Date</b><br/>
223                             <span t-field="track.date" t-field-options='{"hide_seconds":"True"}'/><br/>
224                             <b>Duration</b><br/>
225                             <span t-field="track.duration" t-field-options="{&quot;widget&quot;: &quot;duration&quot;, &quot;unit&quot;: &quot;hour&quot;}"/><br/>
226                             <b>Location</b><br/>
227                             <span t-field="track.location_id"/><br/>
228                         </div>
229                     </div>
230
231                     <div class="panel panel-default" t-if="False">
232                         <div class="panel-heading">
233                             <h4>Documents</h4>
234                         </div>
235                         <div class="panel-body">
236                             Put here the list of documents, like slides of
237                             the presentations. Remove the above t-if when
238                             it's implemented.
239                         </div>
240                     </div>
241                 </div>
242             </section>
243         </div>
244     </t>
245 </template>
246
247 <template id="event_track_social" name="Social Widgets" inherit_id="website_event_track.track_view" active="False" customize_show="True">
248     <xpath expr="//div[@id='right_column']" position="inside">
249         <div class="panel panel-default">
250             <div class="panel-heading">
251                 <h4>Social Stream</h4>
252             </div>
253             <div class="panel-body">
254                 <t t-call="website_mail.follow"><t t-set="object" t-value="event"/></t>
255                 <div t-if="event.twitter_hashtag" class="mt16">
256                     <p><strong>Participate on Twitter</strong></p>
257                     <p class="text-muted">
258                         Find out what people see and say about this event, 
259                         and join the conversation.
260                     </p>
261                     <p><strong>Use this tag:
262                         <a t-att-href="'http://twitter.com/search?q=#'+event.twitter_hashtag" class="label label-primary">#<span t-field="event.twitter_hashtag"/></a>
263                     </strong></p>
264                 </div>
265             </div>
266         </div>
267     </xpath>
268 </template>
269
270 <template id="event_track_proposal">
271     <t t-call="website_event.layout">
272         <div class="oe_structure"/>
273         <div class="container">
274             <section data-snippet-id="title">
275                 <h1 class="text-center mb0">Call for Proposals</h1>
276                 <h2 class="text-center text-muted mb32" t-esc="event.name"></h2>
277             </section>
278             <section id="forms" t-if="not event.show_track_proposal">
279                 <h1>Proposals are closed!</h1>
280                 <p>
281                     This event does not accept proposals.
282                 </p>
283             </section>
284             <section class="row">
285                 <div class="col-md-8">
286                     <div class="oe_structure">
287                         <section data-snippet-id="text">
288                             <h3 class="page-header mt16">
289                                 Introduction
290                             </h3>
291                             <p>
292                                 We will accept a broad range of
293                                 presentations, from reports on academic and
294                                 commercial projects to tutorials and case
295                                 studies. As long as the presentation is
296                                 interesting and potentially useful to the
297                                 audience, it will be considered for
298                                 inclusion in the programme.
299                             </p>
300                         </section>
301                         <section data-snippet-id="text">
302                             <h3 class="page-header">Application</h3>
303                             <p>
304                                 Fill this form to propose your talk.
305
306                             </p>
307                         </section>
308                     </div>
309                     <section id="forms" t-if="event.show_track_proposal">
310                         <form class="form-horizontal mt32" t-attf-action="/event/#{event.id}/track_proposal/post" method="post" enctype="multipart/form-data">
311                             <div class="form-group">
312                                 <label class="col-md-3 col-sm-4 control-label" for="partner_name">Your Name</label>
313                                 <div class="col-md-7 col-sm-8">
314                                     <input type="text" class="form-control" name="partner_name" required="True" />
315                                 </div>
316                             </div>
317                             <div class="form-group">
318                                 <label class="col-md-3 col-sm-4 control-label" for="email_from">Your Email</label>
319                                 <div class="col-md-7 col-sm-8">
320                                     <input type="email" class="form-control" name="email_from" required="True" />
321                                 </div>
322                             </div>
323                             <div class="form-group">
324                                 <label class="col-md-3 col-sm-4 control-label" for="phone">Your Phone</label>
325                                 <div class="col-md-7 col-sm-8">
326                                     <input type="text" class="form-control" name="phone" required="True" />
327                                 </div>
328                             </div>
329                             <div class="form-group" t-if="len(event.allowed_track_tag_ids)">
330                                 <label class="col-md-3 col-sm-4 control-label" for="phone">Tags</label>
331                                 <div class="col-md-9 col-sm-8">
332                                     <div class="row">
333                                         <label class="col-sm-4" t-foreach="event.allowed_track_tag_ids" t-as="tag">
334                                             <input type="checkbox" value="1" t-attf-name="tag_#{str(tag.id)}"/>
335                                             <t t-esc="tag.name"/>
336                                         </label>
337                                     </div>
338                                 </div>
339                             </div>
340                             <div class="form-group">
341                                 <label class="col-md-3 col-sm-4 control-label" for="track_name">Talk Title</label>
342                                 <div class="col-md-7 col-sm-8">
343                                     <input type="text" class="form-control" name="track_name" required="True"/>
344                                 </div>
345                             </div>
346                             <div class="form-group">
347                                 <label class="col-md-3 col-sm-4 control-label" for="phone">Speaker Biography</label>
348                                 <div class="col-md-7 col-sm-8">
349                                     <textarea  class="form-control" name="biography" style="min-height: 120px"/>
350                                 </div>
351                             </div>
352                             <div class="form-group">
353                                 <label class="col-md-3 col-sm-4 control-label" for="description">Talk Introduction</label>
354                                 <div class="col-md-7 col-sm-8">
355                                     <textarea  class="form-control" name="description" style="min-height: 120px"/>
356                                 </div>
357                             </div>
358                             <div class="form-group">
359                                 <div class="col-md-offset-3 col-sm-offset-4 col-sm-8 col-md-7">
360                                     <button type="submit" class="btn btn-primary">Submit Proposal</button>
361                                 </div>
362                             </div>
363                         </form>
364                     </section>
365                     <div class="oe_structure"/>
366                 </div><div class="col-md-3 col-md-offset-1">
367                     <div class="panel panel-default">
368                         <div class="panel-heading">
369                             <h4>Talks Types</h4>
370                         </div>
371                         <div class="panel-body">
372                             <ul class="list-unstyled">
373                                 <li>
374                                     <strong>Regular Talks</strong>. These are standard talks with slides,
375                                     alocated in slots of 60 minutes.
376                                 </li><li>
377                                     <strong>Lightning Talks</strong>. These are 30 minutes talks on many
378                                     different topics. Most topics are accepted in lightning talks.
379                                 </li>
380                             </ul>
381                         </div>
382                     </div>
383
384
385                     <div class="panel panel-default">
386                         <div class="panel-heading">
387                             <h4>Submission Agreement</h4>
388                         </div>
389                         <div class="panel-body">
390                             <p>
391                             We require speakers to accept an agreement in which they commit to:
392                             </p>
393                             <ul class="list-unstyled">
394                                 <li>
395                                     Timely release of presentation material (slides),
396                                     for publishing on our website.
397                                 </li><li>
398                                     Allow video and audio recording of their
399                                     presentation, for publishing on our website.
400                                 </li>
401                             </ul>
402                         </div>
403                     </div>
404                 </div>
405             </section>
406
407         </div>
408         <div class="oe_structure"/>
409     </t>
410 </template>
411
412 <template id="event_track_proposal_success">
413     <t t-call="website_event.event_details">
414         <p>
415             Thank you for your proposal.
416         </p><p>
417             We will evaluate your proposition and get back to you shortly.
418         </p>
419     </t>
420 </template>
421
422 </data>
423 </openerp>