[IMP] clean sitemap, enumerate pages + fixes
[odoo/odoo.git] / addons / website / views / website_templates.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <!-- vim:fdn=3:
3 -->
4 <openerp>
5     <data>
6
7 <!-- Layout and generic templates -->
8
9 <template id="website.theme" name="Theme">
10     <link id="bootstrap_css" rel='stylesheet' href='/web/static/lib/bootstrap/css/bootstrap.css' t-ignore="true"/>
11     <link rel="stylesheet" href='/website/static/src/css/website.css' t-ignore="true"/>
12 </template>
13
14 <template id="website.assets_frontend" name="Website assets">
15     <t t-call="web.assets_common"/>
16     <t t-call="website.theme"/>
17
18     <script type="text/javascript" src="/web/static/src/js/watch.js"></script>
19     <script type="text/javascript" src="/web/static/lib/qweb/qweb2.js"></script>
20     <script type="text/javascript" src="/web/static/src/js/openerpframework.js"></script>
21
22     <script type="text/javascript" src="/website/static/src/js/website.js"></script>
23
24     <script type="text/javascript" src="/website/static/src/js/website.snippets.animation.js"></script>
25     <script type="text/javascript" src="/web/static/lib/bootstrap/js/bootstrap.js"></script>
26
27 </template>
28
29 <template id="assets_backend" name="website assets for backend" inherit_id="web.assets_backend">
30     <xpath expr="." position="inside">
31         <link rel="stylesheet" href="/website/static/src/css/website.backend.css"/>
32
33         <script type="text/javascript" src="/website/static/src/js/website.backend.js"></script>
34     </xpath>
35 </template>
36
37 <template id="website.submenu" name="Submenu">
38     <li t-if="not submenu.child_id" t-att-class="
39         ((submenu.url != '/' and request.httprequest.path.startswith(submenu.url)) or
40          request.httprequest.path == submenu.url) and 'active'
41         ">
42         <a t-att-href="(website.menu_id.child_id[0] == submenu) and '/' or submenu.url" t-ignore="true" t-att-target="'blank' if submenu.new_window else None">
43             <span t-field="submenu.name"/>
44         </a>
45     </li>
46     <li t-if="submenu.child_id" t-attf-class="dropdown #{
47         ((submenu.url != '/' and [1 for submenu in submenu.child_id if request.httprequest.path.startswith(submenu.url)]) or
48          request.httprequest.path == submenu.url) and 'active'
49         }">
50         <a class="dropdown-toggle" data-toggle="dropdown" href="#">
51             <span t-field="submenu.name"/> <span class="caret" t-ignore="true"></span>
52         </a>
53         <ul class="dropdown-menu" role="menu">
54             <t t-foreach="submenu.child_id" t-as="submenu">
55                 <t t-call="website.submenu"/>
56             </t>
57         </ul>
58     </li>
59 </template>
60
61 <template id="layout" name="Main layout">&lt;!DOCTYPE html&gt;
62     <html t-att-lang="lang and lang.replace('_', '-')"
63           t-att-data-website-id="website.id if editable else None"
64           t-att-data-editable="'1' if editable else None"
65           t-att-data-translatable="'1' if translatable else None"
66           t-att-data-view-xmlid="xmlid if editable else None"
67           t-att-data-main-object="repr(main_object) if editable else None">
68         <head>
69             <t t-if="main_object and 'website_meta_title' in main_object">
70                 <t t-set="title" t-value="main_object.website_meta_title"/>
71             </t>
72             <t t-if="not title and main_object and 'name' in main_object">
73                 <t t-set="additional_title" t-value="main_object.name"/>
74             </t>
75             <t t-if="not title">
76                 <t t-set="title"><t t-raw="res_company.name"/><t t-if="additional_title"> - <t t-raw="additional_title"/></t></t>
77             </t>
78             <meta name="viewport" content="initial-scale=1"/>
79             <meta name="openerp.company" t-att-value="res_company.name"/>
80             <meta name="description" t-att-value="main_object and 'website_meta_description' in main_object
81                 and main_object.website_meta_description or website_meta_description"/>
82             <meta name="keywords" t-att-value="main_object and 'website_meta_keywords' in main_object
83                 and main_object.website_meta_keywords or website_meta_keywords"/>
84             <title><t t-esc="title"/></title>
85
86             <t t-set="languages" t-value="website.get_languages()"/>
87             <t t-foreach="languages" t-as="lg">
88                 <t t-set="force_lang" t-value="lg[0] if lg[0] != website.default_lang_code else None"/>
89                 <link rel="alternate" t-att-href="url_for(request.httprequest.path + '?' + keep_query(), lang=force_lang)" t-att-hreflang="lg[0].replace('_', '-').lower()" />
90             </t>
91
92             <t t-call-assets="website.assets_frontend"/>
93
94             <t t-raw="head or ''" name='layout_head'/>
95         </head>
96         <body>
97             <div id="wrapwrap">
98                 <header>
99                     <div class="navbar navbar-default navbar-static-top">
100                         <div class="container">
101                             <div class="navbar-header">
102                                 <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-top-collapse">
103                                     <span class="sr-only">Toggle navigation</span>
104                                     <span class="icon-bar"></span>
105                                     <span class="icon-bar"></span>
106                                     <span class="icon-bar"></span>
107                                 </button>
108                                 <a class="navbar-brand" href="/" t-field="res_company.name"/>
109                             </div>
110                             <div class="collapse navbar-collapse navbar-top-collapse">
111                                 <ul class="nav navbar-nav navbar-right" id="top_menu">
112                                     <t t-foreach="website.menu_id.child_id" t-as="submenu">
113                                         <t t-call="website.submenu"/>
114                                     </t>
115                                     <li class="divider" groups="base.group_user,base.group_portal" t-ignore="true"/>
116                                     <li class="dropdown" t-ignore="true" groups="base.group_user,base.group_portal">
117                                         <a href="#" class="dropdown-toggle" data-toggle="dropdown">
118                                             <b>
119                                                 <span t-esc="user_id.name"/>
120                                                 <span class="caret"></span>
121                                             </b>
122                                         </a>
123                                         <ul class="dropdown-menu js_usermenu" role="menu">
124                                             <li><a href="/web" role="menuitem">My Account</a></li>
125                                             <li class="divider"/>
126                                             <li><a t-attf-href="/web/session/logout?redirect=/" role="menuitem">Logout</a></li>
127                                         </ul>
128                                     </li>
129                                 </ul>
130                             </div>
131                         </div>
132                     </div>
133                 </header>
134                 <main>
135                     <t t-raw="0"/>
136                 </main>
137                 <footer>
138                     <div class="container hidden-print" id="footer_container">
139                         <div class="row">
140                             <div class="col-md-3" name="product">
141                                 <h4>Our products &amp; Services</h4>
142                                 <ul class="list-unstyled" name="products">
143                                     <li><a href="/">Home</a></li>
144                                 </ul>
145                             </div>
146                             <div class="col-md-3" name="info">
147                                 <h4 name="info_title">Connect with us</h4>
148                                 <ul class="list-unstyled">
149                                     <li><a href="/page/website.contactus">Contact us</a></li>
150                                 </ul>
151                                 <ul class="list-unstyled">
152                                     <li t-ignore="true"><i class="fa fa-phone"></i> <span t-field="res_company.phone"></span></li>
153                                     <li t-ignore="true"><i class="fa fa-envelope"></i>  <span t-field="res_company.email"></span></li>
154                                 </ul>
155                                 <h2>
156                                     <a t-att-href="website.social_facebook" t-if="website.social_facebook"><i class="fa fa-facebook-square"/></a>
157                                     <a t-att-href="website.social_twitter" t-if="website.social_twitter"><i class="fa fa-twitter"/></a>
158                                     <a t-att-href="website.social_linkedin" t-if="website.social_linkedin"><i class="fa fa-linkedin"/></a>
159                                     <a t-att-href="website.social_youtube" t-if="website.social_youtube"><i class="fa fa-youtube-play"/></a>
160                                     <a t-att-href="website.social_googleplus" t-if="website.social_googleplus"><i class="fa fa-google-plus-square"/></a>
161                                     <a t-att-href="website.social_github" t-if="website.social_github"><i class="fa fa-github"/></a>
162                                 </h2>
163                             </div>
164                             <div class="col-md-5 col-lg-offset-1" name="about_us">
165                                 <div>
166                                     <h4>
167                                         <span t-field="res_company.name">Your Company</span>
168                                         <small> - <a href="/page/website.aboutus">About us</a></small>
169                                     </h4>
170                                     <p>
171                                         We are a team of passionate people whose goal is to improve everyone's
172                                         life through disruptive products. We build great products to solve your
173                                         business problems.
174                                     </p>
175                                     <p>
176                                         Our products are designed for small to medium size companies willing to optimize
177                                         their performance.
178                                     </p>
179                                 </div>
180                                 <ul class="list-inline js_language_selector mt16" t-if="(len(languages) &gt; 1 or editable)">
181                                     <li t-foreach="languages" t-as="lg">
182                                         <a t-att-href="url_for(request.httprequest.path + '?' + keep_query(), lang=lg[0])"
183                                            t-att-data-default-lang="editable and 'true' if lg[0] == website.default_lang_code else None">
184                                             <t t-esc="lg[1].split('/').pop()"/>
185                                         </a>
186                                     </li>
187                                     <li groups="base.group_website_publisher">
188                                         <t t-set="url_return" t-value="url_for('', '[lang]') + '?' + keep_query()"/>
189                                         <a t-attf-href="/web#action=base.action_view_base_language_install&amp;website_id=#{website.id}&amp;url_return=#{url_return}">
190                                             <i class="fa fa-plus-circle"/>
191                                             Add a language...
192                                         </a>
193                                     </li>
194                                 </ul>
195                             </div>
196                         </div>
197                     </div>
198                     <div class="container mt16 mb8">
199                         <div class="pull-right" t-ignore="true" t-if="not editable">
200                             Create a <a href="http://openerp.com/apps/website">free website</a> with
201                             <a class="label label-danger" href="https://openerp.com/apps/website">OpenERP</a>
202                         </div>
203                         <div class="pull-left text-muted">
204                             Copyright &amp;copy; <span t-field="res_company.name">Company name</span>
205                         </div>
206                     </div>
207                 </footer>
208             </div>
209             <t t-if="website.google_analytics_key">
210                 <script>
211                     (function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]=
212                     function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date;
213                     e=o.createElement(i);r=o.getElementsByTagName(i)[0];
214                     e.src='//www.google-analytics.com/analytics.js';
215                     r.parentNode.insertBefore(e,r)}(window,document,'script','ga'));
216                     ga('create','<t t-esc="website.google_analytics_key"/>');ga('send','pageview');
217                 </script>
218             </t>
219         </body>
220     </html>
221 </template>
222
223 <template id="layout_logo_show" inherit_id="website.layout" inherit_option_id="website.layout" name="Show Logo">
224     <xpath expr="//header//a[@class='navbar-brand']" position="replace">
225         <a href="/" class="navbar-brand logo">
226             <img src="/logo.png"/>
227         </a>
228     </xpath>
229 </template>
230
231 <template id="editor_head" inherit_id="website.layout" name="Editor" groups="base.group_website_publisher,base.group_website_designer">
232     <xpath expr="//body" position="attributes">
233         <attribute name="style">padding-top: 51px;</attribute>
234     </xpath>
235     <xpath expr="//body" position="inside">
236         <div id="website-top-navbar-placeholder" class="navbar navbar-inverse navbar-fixed-top hidden-xs">
237             <div class="navbar-header">
238                 <form class="navbar-form navbar-left">
239                     <button type="button" class="btn btn-primary">Edit</button>
240                 </form>
241             </div>
242             <div class="collapse navbar-collapse navbar-edit-collapse">
243                 <ul class="nav navbar-nav navbar-right">
244                     <li><a href="#" onclick="return false;"><i class="fa fa-mobile" title="Mobile preview"/></a></li>
245                     <li class="divider-vertical"/>
246                     <li><a href="#" onclick="return false;"><span title="Promote page on the web">Promote</span></a></li>
247                     <li class="dropdown">
248                         <a href="#" onclick="return false;">Content <span class="caret"/></a>
249                     </li>
250                     <li class="dropdown">
251                         <a href="#" onclick="return false;">Customize <span class="caret"/></a>
252                     </li>
253                     <li class="dropdown">
254                         <a href="#" onclick="return false;">Help <span class="caret"/></a>
255                     </li>
256                 </ul>
257             </div>
258         </div>
259     </xpath>
260     <xpath expr='//t[@t-call-assets="website.assets_frontend"]' position="after">
261         <t t-call-assets="website.assets_editor"/>
262     </xpath>
263 </template>
264
265 <template id="assets_editor" name="Editor assets">
266     <script type="text/javascript">
267         var CKEDITOR_BASEPATH = '/web/static/lib/ckeditor/';
268     </script>
269     <link rel='stylesheet' href='/website/static/src/css/snippets.css'/>
270     <link rel='stylesheet' href='/website/static/src/css/editor.css'/>
271
272     <link rel='stylesheet' href="/web/static/lib/jquery.ui/css/smoothness/jquery-ui-1.9.1.custom.css"/>
273
274     <link rel="stylesheet" href="/web/static/lib/select2/select2.css"/>
275     <link rel="stylesheet" href="/website/static/lib/select2-bootstrap-css/select2-bootstrap.css"/>
276
277     <script type="text/javascript" src="/web/static/lib/select2/select2.js"></script>
278
279     <script type="text/javascript" src="/web/static/lib/ckeditor/ckeditor.js"></script>
280     <script type="text/javascript" src="/website/static/lib/ace/ace.js"></script>
281     <script type="text/javascript" src="/website/static/lib/ace/theme-monokai.js"></script>
282     <script type="text/javascript" src="/website/static/lib/ace/mode-xml.js"></script>
283     <script type="text/javascript" src="/website/static/lib/vkbeautify/vkbeautify.0.99.00.beta.js"></script>
284     <t t-call="web.jqueryui_conflict">
285         <script type="text/javascript" src="/web/static/lib/jquery.ui/js/jquery-ui-1.9.1.custom.js"></script>
286     </t>
287     <!-- mutation observers shim backed by mutation events (8 < IE < 11, Safari < 6, FF < 14, Chrome < 17) -->
288     <script type="text/javascript" src="/website/static/lib//jquery.mjs.nestedSortable/jquery.mjs.nestedSortable.js"></script>
289     <script type="text/javascript" src="/website/static/lib/MutationObservers/test/sidetable.js"></script>
290     <script type="text/javascript" src='/website/static/lib/nearest/jquery.nearest.js'></script>
291     <script type="text/javascript" src="/website/static/lib/MutationObservers/MutationObserver.js"></script>
292
293     <script type="text/javascript" src="/website/static/src/js/website.editor.js"></script>
294     <script type="text/javascript" src="/website/static/src/js/website.editor.newpage.js"></script> <!-- groups="base.group_website_designer" -->
295     <script type="text/javascript" src="/website/static/src/js/website.menu.js"></script> <!-- groups="base.group_website_designer" -->
296     <script type="text/javascript" src="/website/static/src/js/website.mobile.js"></script>
297     <script type="text/javascript" src="/website/static/src/js/website.seo.js"></script>
298     <script type="text/javascript" src="/website/static/src/js/website.tour.js"></script>
299     <script type="text/javascript" src="/website/static/src/js/website.tour.banner.js"></script> <!-- groups="base.group_website_designer" -->
300     <script type="text/javascript" src="/website/static/src/js/website.snippets.editor.js"></script>
301     <script type="text/javascript" src="/website/static/src/js/website.ace.js"></script>
302     <script type="text/javascript" src="/website/static/src/js/website.translator.js"></script>
303
304     <script type="text/javascript" src="/website/static/src/js/jQuery.transfo.js"></script>
305 </template>
306
307 <template id="debugger" inherit_option_id="website.layout" name="Debugger &amp; Tests">
308     <xpath expr='//t[@name="layout_head"]' position="after">
309         <script type="text/javascript" src="/website/static/src/js/website.tour.js"></script>
310     </xpath>
311 </template>
312
313 <template id="login_layout" inherit_id="web.login_layout" name="Website Login Layout">
314     <xpath expr="t" position="replace">
315         <t t-call="website.layout">
316             <div class="oe_website_login_container" t-raw="0"/>
317         </t>
318     </xpath>
319 </template>
320
321 <template id="show_sign_in" inherit_option_id="website.layout" inherit_id="website.layout" name="Show Sign In" groups="base.group_public">
322     <xpath expr="//ul[@id='top_menu']" position="inside">
323         <li class="divider"/>
324         <li>
325             <a t-attf-href="/web/login">
326                 <b>Sign in</b>
327             </a>
328         </li>
329     </xpath>
330 </template>
331
332 <template id="footer_custom" inherit_option_id="website.layout" name="Custom Footer">
333     <xpath expr="//div[@id='footer_container']" position="before">
334         <div class="oe_structure">
335             <section data-snippet-id='three-columns' class="mt16 mb16">
336                 <div class="container">
337                     <div class="row">
338                         <div class="col-md-4">
339                             <h4 class="mt16">Subtitle</h4>
340                             <p>
341                                 <a href="/">Homepage</a>
342                             </p>
343                         </div>
344                         <div class="col-md-4">
345                             <h4 class="mt16">Subtitle 2</h4>
346                             <p>
347                                 ...
348                             </p>
349                         </div>
350                         <div class="col-md-4">
351                             <h4 class="mt16">Subtitle 3</h4>
352                             <p>
353                                 ...
354                             </p>
355                         </div>
356                     </div>
357                 </div>
358             </section>
359         </div>
360     </xpath>
361     <xpath expr="//div[@id='footer_container']" position="attributes">
362         <attribute name="style">display: none</attribute>
363     </xpath>
364 </template>
365
366 <template id="publish_management">
367     <div groups="base.group_website_publisher" t-ignore="true" class="pull-right css_editable_mode_hidden" t-att-style="style or ''">
368         <div t-attf-class="btn-group js_publish_management #{object.website_published and 'css_published' or 'css_unpublished'}" t-att-data-id="object.id" t-att-data-object="object._name" t-att-data-controller="publish_controller">
369             <button class="btn btn-danger js_publish_btn">Not Published</button>
370             <button class="btn btn-success js_publish_btn">Published</button>
371             <button type="button" t-attf-class="btn btn-default dropdown-toggle" t-att-id="'dopprod-%s' % object.id" data-toggle="dropdown">
372                 <span class="caret"></span>
373             </button>
374             <ul class="dropdown-menu" role="menu" t-att-aria-labelledby="'dopprod-%s' % object.id">
375                 <li>
376                     <a href="#" class="js_publish_btn">
377                         <span class="css_unpublish">Unpublish</span>
378                         <span class="css_publish">Publish</span>
379                     </a>
380                 </li>
381                 <t t-raw="0"/>
382                 <li t-if="publish_edit">
383                     <a t-attf-href="/web#return_label=Website&amp;view_type=form&amp;model=#{object._name}&amp;id=#{object.id}&amp;action=#{action}"
384                     title='Edit in backend'>Edit</a>
385                 </li>
386             </ul>
387         </div>
388     </div>
389 </template>
390
391 <template id="publish_short">
392     <t groups="base.group_website_publisher" t-ignore="true">
393         <div t-attf-class="btn-group pull-right js_publish_management #{object.website_published and 'css_published' or 'css_unpublished'}" t-att-data-id="object.id" t-att-data-object="object._name" t-att-data-controller="publish_controller">
394             <button t-attf-class="btn btn-sm btn-#{object.website_published and 'success' or 'danger'} js_publish_btn">
395                 <span class="css_publish">Not Published</span>
396                 <span class="css_unpublish">Published</span>
397             </button>
398         </div>
399     </t>
400 </template>
401
402 <template id="pager" name="Pager">
403     <ul t-if="pager['page_count'] > 1" t-attf-class="#{ classname or '' } pagination" t-att-style="style or ''">
404         <li t-att-class=" 'disabled' if pager['page']['num'] == 1 else '' ">
405             <a t-att-href=" pager['page_previous']['url'] if pager['page']['num'] != 1 else ''">Prev</a>
406         </li>
407         <t t-foreach="pager['pages']" t-as="page">
408             <li t-att-class=" 'active' if page['num'] == pager['page']['num'] else '' "> <a t-att-href="page['url']" t-raw="page['num']"></a></li>
409         </t>
410         <li t-att-class=" 'disabled' if pager['page']['num'] == pager['page_count'] else '' ">
411             <a t-att-href="pager['page_next']['url'] if pager['page']['num'] != pager['page_count'] else ''">Next</a>
412         </li>
413     </ul>
414 </template>
415
416 <template id="kanban">
417     <t t-set="step"><t t-esc="step or 0"/></t>
418     <t t-set="scope"><t t-esc="scope or 0"/></t>
419     <t t-set="orderby"><t t-esc="orderby or 'name'"/></t>
420     <t t-raw="website.kanban(model, domain, column, template, step=step, scope=scope, orderby=orderby)"/>
421 </template>
422
423 <template id="kanban_contain">
424     <table class="table js_kanban">
425         <thead>
426             <tr>
427                 <t t-set="width" t-value="str(round(100.0 / len(objects), 2)) + '%'"/>
428                 <t t-foreach="objects">
429                     <th t-att-width="width">
430                         <div t-field="column_id.name" class="text-center"></div>
431                     </th>
432                 </t>
433             </tr>
434         </thead>
435         <tbody>
436             <tr>
437                 <t t-foreach="objects">
438                     <td class="js_kanban_col" t-att-data-template="template" t-att-data-domain="domain" t-att-data-page_count="page_count" t-att-data-model="model" t-att-data-step="step" t-att-data-orderby="orderby">
439                         <t t-foreach="object_ids" t-as="object_id">
440                             <t t-call="#{ template }"></t>
441                         </t>
442                         <!-- pager -->
443                         <div t-if="1 != page_end" class="pagination pagination-centered">
444                             <ul>
445                                 <li t-attf-class="prev #{'active' if page == 1 else '' }"> <a t-att-href=" '%s,%s-%s' % (kanban_url, column_id.id, (page &gt; 1 and page-1 or 1)) ">Prev</a></li>
446                                 <t t-foreach="range(page_start, page_end+1)" t-as="p">
447                                     <li t-att-class=" 'active' if page == p else '' "> <a t-att-href=" '%s,%s-%s' % (kanban_url, column_id.id, p)" t-esc="p"></a></li>
448                                 </t>
449                                 <li t-attf-class="next #{'active' if page == page_end else '' }"> <a t-att-href=" '%s,%s-%s' % (kanban_url, column_id.id, (page &lt; page_end and page+1 or page_end) )">Next</a></li>
450                             </ul>
451                         </div>
452                     </td>
453                 </t>
454             </tr>
455         </tbody>
456     </table>
457 </template>
458
459 <!-- Error and special pages -->
460
461 <template id="default_page">
462     <t t-call="website.layout">
463       <div id="wrap" class="oe_structure oe_empty"></div>
464     </t>
465 </template>
466
467 <template id="page_404">
468     <t t-call="website.404">
469         <div class="container">
470             <div class="well mt32">
471                 <p>This page does not exists, but you can create it as you are administrator of this site.</p>
472                 <a class="btn btn-primary" t-attf-href="/website/add/#{ path }">Create Page</a>
473             </div>
474             <div class="text-center text-muted">Edit the content below this line to adapt the default "page not found" page.</div>
475         </div>
476         <hr/>
477     </t>
478 </template>
479
480 <template id="http_error">
481     <t t-call="website.layout">
482         <div id="wrap">
483             <div class="oe_structure">
484                 <h1 class="container mt32"><t t-esc="status_code"/>: <t t-esc="status_message"/></h1>
485             </div>
486
487             <t t-if="editable or request.debug">
488                 <t t-call="website.http_error_debug"/>
489             </t>
490         </div>
491     </t>
492 </template>
493
494 <template id="http_error_debug">
495     <div class="container panel-group mb32 mt32" id="debug_infos">
496         <div class="panel panel-default" t-if="exception">
497             <div class="panel-heading">
498                 <h4 class="panel-title">
499                     <a data-toggle="collapse" data-parent="#debug_infos" href="#error_main">
500                         Error
501                     </a>
502                 </h4>
503             </div>
504             <div id="error_main" class="panel-collapse collapse in">
505                 <div class="panel-body">
506                     <p t-if="website_controller">The following error was raised in the website controller <code t-esc="website_controller"/></p>
507                     <p>
508                         <strong>Error message:</strong>
509                         <pre t-esc="exception.message"/>
510                     </p>
511                 </div>
512             </div>
513         </div>
514         <div class="panel panel-default" t-if="qweb_exception">
515             <div class="panel-heading">
516                 <h4 class="panel-title">
517                     <a data-toggle="collapse" data-parent="#adebug_infos" href="#error_qweb">
518                         QWeb
519                     </a>
520                 </h4>
521             </div>
522             <div id="error_qweb" class="panel-collapse collapse">
523                 <div class="panel-body">
524                     <p t-if="exception.qweb.get('message')">
525                         <strong>Error message:</strong>
526                         <pre t-esc="exception.qweb.get('message')"/>
527                     </p>
528                     <p>
529                         The error occured while rendering the template <code t-esc="qweb_exception.qweb.get('template')"/>
530                         <t t-if="'expression' in qweb_exception.qweb">and evaluating the following expression: <code t-esc="qweb_exception.qweb['expression']"/></t>
531                     </p>
532                     <t t-if="'node' in qweb_exception.qweb">
533                         <pre id="exception_node" t-esc="qweb_exception.qweb['node'].toxml()"/>
534                     </t>
535                 </div>
536             </div>
537         </div>
538         <div class="panel panel-default" t-if="traceback">
539             <div class="panel-heading">
540                 <h4 class="panel-title">
541                     <a data-toggle="collapse" data-parent="#adebug_infos" href="#error_traceback">
542                         Traceback
543                     </a>
544                 </h4>
545             </div>
546             <div id="error_traceback" class="panel-collapse collapse">
547                 <div class="panel-body">
548                     <pre id="exception_traceback" t-esc="traceback"/>
549                 </div>
550             </div>
551         </div>
552     </div>
553 </template>
554
555 <template id="403">
556     <t t-call="website.layout">
557         <div id="wrap">
558             <div class="container">
559                 <h1 class="mt32">403: Forbidden</h1>
560                 <p>The page you were looking for could not be authorized.</p>
561                 <p>Maybe you were looking for one of these popular pages ?</p>
562                 <ul>
563                     <li><a href="/">Homepage</a></li>
564                     <li><a href="/page/website.contactus/">Contact Us</a></li>
565                 </ul>
566             </div>
567             <t t-if="editable or request.debug">
568                 <t t-call="website.http_error_debug"/>
569             </t>
570         </div>
571     </t>
572 </template>
573
574 <template id="404">
575     <t t-call="website.layout">
576         <div id="wrap">
577             <t t-raw="0"/>
578             <div class="oe_structure oe_empty">
579                 <div class="container">
580                     <h1 class="mt32">404: Page not found!</h1>
581                     <p>
582                         The page you were looking for could not be found; it is possible you have
583                         typed the address incorrectly, but it has most probably been removed due
584                         to the recent website reorganisation.
585                     </p>
586                     <p>Maybe you were looking for one of these popular pages ?</p>
587                     <ul>
588                         <li><a href="/">Homepage</a></li>
589                         <li><a href="/page/website.contactus/">Contact Us</a></li>
590                     </ul>
591                 </div>
592             </div>
593
594             <t t-if="request.debug">
595                 <t t-call="website.http_error_debug"/>
596             </t>
597         </div>
598     </t>
599 </template>
600
601 <template id="500">
602     <!-- This template should not use any variable except those provided by website.ir_http._handle_exception -->
603     <html>
604         <head>
605             <title t-esc="status_message">Internal Server Error</title>
606             <link rel='stylesheet' href='/web/static/lib/fontawesome/css/font-awesome.css'/>
607             <link rel='stylesheet' href='/web/static/lib/bootstrap/css/bootstrap.css'/>
608             <link rel='stylesheet' href='/website/static/src/css/website.css'/>
609             <script type="text/javascript" src="/web/static/lib/jquery/jquery.js"></script>
610             <script type="text/javascript" src="/web/static/lib/bootstrap/js/bootstrap.js"></script>
611             <script>
612                 $(document).ready(function() {
613                     var button = $('#reset_templates_button');
614                     button.click(function() {
615                         var dialog = $('#reset_template_confirmation').modal('show');
616                         var input = dialog.find('input[type="text"]').val('').focus();
617                         var dialog_form = dialog.find('form');
618                         dialog_form.submit(function() {
619                             if (input.val() == dialog.find('.confirm_word').text()) {
620                                 dialog.modal('hide');
621                                 button.prop('disabled', true).text('Working...');
622                                 $('#reset_templates_form').trigger('submit');
623                             } else {
624                                 input.val('').focus();
625                             }
626                             return false;
627                         });
628                         return false;
629                     });
630                 });
631             </script>
632         </head>
633         <body>
634             <div id="reset_template_confirmation" class="modal" tabindex="-1" role="dialog" aria-hidden="true" t-ignore="true">
635                 <div class="modal-dialog">
636                     <form class="form-horizontal" role="form">
637                     <div class="modal-content">
638                         <div class="modal-header">
639                             <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
640                             <h3 class="modal-title">Reset templates</h3>
641                         </div>
642                         <div class="modal-body">
643                             <div class="form-group mb0">
644                                 <label for="page-name" class="col-sm-9">
645                                     <p>The selected templates will be reset to their factory settings.</p>
646                                     <p>Type '<i class="confirm_word">yes</i>' in the box below if you want to confirm.</p>
647                                 </label>
648                                 <div class="col-sm-3 mt16">
649                                     <input type="text" class="form-control" required="required" placeholder="yes"/>
650                                 </div>
651                             </div>
652                         </div>
653                         <div class="modal-footer">
654                             <input type="submit" value="Confirm" class="btn btn-primary"/>
655                             <button type="button" class="btn" data-dismiss="modal" aria-hidden="true">Cancel</button>
656                         </div>
657                     </div>
658                     </form>
659                 </div>
660             </div>
661
662             <div id="wrapwrap">
663                 <div class="navbar navbar-default navbar-static-top">
664                     <div class="container">
665                         <div class="collapse navbar-collapse navbar-top-collapse">
666                             <ul class="nav navbar-nav pull-right">
667                                 <li><a href="/">Home</a></li>
668                                 <li><a href="javascript: window.history.back()">Back</a></li>
669                             </ul>
670                         </div>
671                     </div>
672                 </div>
673                 <div class="mb32">
674                     <div class="oe_structure">
675                         <h1 class="container mt32"><t t-esc="status_code"/>: <t t-esc="status_message"/></h1>
676                     </div>
677
678                     <div class="container" t-if="views">
679                         <div class="alert alert-danger" t-if="qweb_exception and editable">
680                             <h4>Template fallback</h4>
681                             <p>An error occured while rendering the template <code t-esc="qweb_exception.qweb['template']"/>.</p>
682                             <p>If this error is caused by a change of yours in the templates, you have the possibility to reset one or more templates to their <strong>factory settings</strong>.</p>
683                             <form action="/website/reset_templates" method="post" id="reset_templates_form">
684                                 <ul class="oe_template_fallback">
685                                     <li t-foreach="views" t-as="view">
686                                         <label>
687                                             <input type="checkbox" name="templates" t-att-value="view.id" t-att-checked="'checked' if view_first else None"/>
688                                             <t t-esc="view.name"/>
689                                         </label>
690                                     </li>
691                                 </ul>
692                                 <input type="hidden" name="redirect" t-att-value="request.httprequest.path"/>
693                                 <button id="reset_templates_button">Reset selected templates</button>
694                             </form>
695                         </div>
696                     </div>
697
698                     <t t-if="editable or request.debug">
699                         <t t-call="website.http_error_debug"/>
700                     </t>
701                 </div>
702             </div>
703         </body>
704     </html>
705 </template>
706
707 <template id="robots">
708 User-agent: *
709 Sitemap: <t t-esc="url_root"/>sitemap.xml
710 </template>
711
712 <template id="sitemap_xml">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
713 <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
714   <url t-foreach="pages" t-as="page">
715     <loc><t t-esc="url_root"/><t t-esc="page['loc']"/></loc><t t-if="page.get('lastmod', False)">
716     <lastmod t-esc="page['lastmod']"/></t><t t-if="page.get('priority', False)">
717     <priority t-esc="page['priority']"/></t><t t-if="page.get('changefreq', False)">
718     <changefreq t-esc="page['changefreq']"/></t>
719   </url>
720 </urlset>
721 </template>
722
723 <template id="sitemap_index_xml">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
724 <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
725   <sitemap t-foreach="pages" t-as="page">
726     <loc><t t-esc="url_root"/>sitemap-<t t-esc="page"/>.xml</loc>
727   </sitemap>
728 </sitemapindex>
729 </template>
730
731
732 <!-- Actual pages -->
733
734 <template id="homepage" name="Homepage" page="True" priority="29">
735     <t t-call="website.layout">
736       <div id="wrap" class="oe_structure oe_empty"></div>
737     </t>
738 </template>
739
740 <template id="company_description" name="Company Description">
741     <address itemscope="itemscope" itemtype="http://schema.org/Organization">
742         <!-- TODO widget contact must add itemprop attributes -->
743         <div t-field="res_company.partner_id" t-field-options='{
744                 "widget": "contact",
745                 "fields": ["name", "address", "phone", "mobile", "fax", "email"]}'/>
746     </address>
747      <a t-att-href="res_company.google_map_link()" target="_BLANK">
748         <img class="thumbnail img-responsive" t-att-src="res_company.google_map_img()" />
749     </a>
750 </template>
751
752 <template id="contactus" name="Contact us" page="True">
753     <t t-call="website.layout">
754       <div id="wrap">
755         <div class="oe_structure"/>
756         <div class="container">
757             <h1>Contact us</h1>
758             <div class="row">
759                 <div class="col-md-8">
760                     <div class="oe_structure">
761                         <div>
762                             <p>Contact us about anything related to our company or services.</p>
763                             <p>We'll do our best to get back to you as soon as possible.</p>
764                         </div>
765                     </div>
766                     <div class="text-center mt64" name="mail_button">
767                         <a t-attf-href="mailto:{{ res_company.email }}" class="btn btn-primary">Send us an email</a>
768                     </div>
769                 </div>
770                 <div class="col-md-4 mb32">
771                     <div groups="base.group_website_publisher" t-ignore="true" class="pull-right css_editable_mode_hidden" t-att-style="style or ''">
772                         <a class="btn btm-sm btn-default" t-att-href="'/web#return_label=Website&amp;model=%s&amp;id=%s' % (res_company._name, res_company.id)">Change address</a>
773                     </div>
774                     <t t-call="website.company_description"/>
775                 </div>
776             </div>
777         </div>
778         <div class="oe_structure"/>
779       </div>
780     </t>
781 </template>
782
783 <template id="aboutus" name="About us" page="True">
784     <t t-call="website.layout">
785         <div id="wrap">
786             <div class="oe_structure">
787
788                 <section data-snippet-id="title">
789                     <div class="container">
790                         <div class="row">
791                             <div class="col-md-12">
792                                 <h1 class="text-center">About us</h1>
793                                 <h3 class="text-muted text-center">Great products for great people</h3>
794                             </div>
795                         </div>
796                     </div>
797                 </section>
798
799                 <section data-snippet-id="text-image">
800                     <div class="container">
801                         <div class="row">
802                             <div class="col-md-6 mt32">
803                                 <p>
804                                       We are a team of passionate people whose goal is to improve everyone's
805                                       life through disruptive products. We build great products to solve your
806                                       business problems.
807                                 </p>
808                                 <p>
809                                       Our products are designed for small to medium size companies willing to optimize
810                                       their performance.
811                                 </p>
812                             </div>
813                             <div class="col-md-4 col-md-offset-2 mt16 mb16">
814                                 <img src="/website/static/src/img/library/business_conference.jpg" class="img img-responsive shadow" alt="Our Team"/>
815                             </div>
816                         </div>
817                     </div>
818                 </section>
819
820             </div>
821             <div class="oe_structure"></div>
822         </div>
823     </t>
824 </template>
825
826      </data>
827 </openerp>