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