[WIP] website: Cleaning up the snippet editor
[odoo/odoo.git] / addons / website / views / views.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <!-- vim:fdn=3:
3 -->
4 <openerp>
5     <data>
6         <!--
7             Files used in the generic theme, mostly bootstrap and a few OpenERP tags
8         -->
9         <template id="website.theme" name="Theme">
10             <link id="bootstrap_css" rel='stylesheet' href='/website/static/lib/bootstrap/css/bootstrap.css' t-ignore="true"/>
11             <link id="website_css" rel='stylesheet' href='/website/static/src/css/website.css' t-ignore="true"/>
12         </template>
13
14         <template id="website.theme_flatly" name="Flat Theme" inherit_option_id="website.theme">
15             <xpath expr="//link[@id='bootstrap_css']" position="replace">
16                 <link rel='stylesheet' href='/website/static/lib/bootstrap/css/bootstrap-flatly.css' t-ignore="true"/>
17                 <link rel='stylesheet' href='/website/static/src/css/website-flatly.css' t-ignore="true"/>
18             </xpath>
19         </template>
20
21         <template id="layout">
22                 &lt;!DOCTYPE html&gt;
23                 <html t-att-data-view-xmlid="__stack__[0]">
24                     <head>
25                         <title><t t-esc="title or res_company.name"/></title>
26                         <script type="text/javascript" src="/web/static/lib/jquery/jquery.js"></script>
27                         <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/ckeditor/4.2/ckeditor.js"></script>
28                         <script type="text/javascript" src="/website/static/lib/ckeditor.sharedspace/plugin.js"></script>
29                         <script type="text/javascript">
30                             CKEDITOR.disableAutoInline = true;
31                             // EDIT ALL THE THINGS
32                             CKEDITOR.dtd.$editable = $.extend( {}, CKEDITOR.dtd.$block, CKEDITOR.dtd.$inline);
33                         </script>
34
35                         <t t-if="editable">
36                             <t t-raw="css"/>
37                             <t t-raw="script"/>
38                             <link rel='stylesheet' href='/website/static/src/css/snippets.css'/>
39                             <script type="text/javascript" src="/website/static/src/js/website_bootstrap.js"></script>
40                         </t>
41                         <t t-raw="head or ''"/>
42                         <t t-call="website.theme"/>
43
44                         <link rel='stylesheet' href='/web/static/lib/fontawesome/css/font-awesome.css'/>
45                         <link rel='stylesheet' href='/website/static/lib/bootstrap/css/bootstrap-responsive.css'/>
46                     </head>
47                     <body>
48                         <header class='navbar navbar-static-top'>
49                             <div class='navbar-inner'>
50                                 <div class="container">
51                                     <a href='/page/website.homepage' class='brand'>
52                                         <em>Open</em><b>ERP</b>
53                                         <!--<img t-att-alt="res_company.name" src='/web/binary/company_logo'/></a>-->
54                                     </a>
55                                     <ul class="nav pull-right" id="top_menu">
56                                         <li><a href="/page/website.contactus">Contact us</a></li>
57                                         <li><a href="/admin">Sign in</a></li>
58                                     </ul>
59                                 </div>
60                             </div>
61                         </header>
62                         <div t-raw="0" id="wrap">
63                             <div class="container">
64                                 <h1>Main Layout</h1>
65                             </div>
66                         </div>
67                         <footer>
68                             <div class="container" id="footer_container">
69                                 <div class="row">
70                                     <div class="span3" name="product">
71                                         <h5>Our products</h5>
72                                         <ul class='unstyled' name="products">
73                                             <li><a href="/">Home</a></li>
74                                         </ul>
75                                     </div>
76                                     <div class="span3" name="info">
77                                         <h5 name="info_title">Connect with us</h5>
78                                         <ul class='unstyled'>
79                                             <li><a href="/page/website.aboutus">About us</a></li>
80                                             <li><a href="/page/website.contactus">Contact us</a></li>
81                                         </ul>
82                                         <ul class='unstyled'>
83                                             <li><i class="icon-phone"></i> <span t-field="res_company.phone"/></li>
84                                             <li><i class="icon-envelope"></i> <span t-field="res_company.email"></span></li>
85                                         </ul>
86                                     </div>
87                                     <div class="span5 offset1" name="about_us">
88                                         <h5 t-field="res_company.name">About us</h5>
89                                         <p>
90                                             We are a team of passionated people whose goal
91                                             is to improve everyone's life through
92                                             disruptive products. We build great products to
93                                             solve your business problems.
94                                         </p><p>
95                                             Our products are designed for small to medium
96                                             companies willing to optimize their
97                                             performance.
98                                         </p>
99                                         <h1 style="padding: 12px 24px">
100                                             <a href="http://twitter.com/openerp"><i class="icon-twitter-sign"></i></a>
101                                             <a href="http://facebook.com/OpenERP"><i class="icon-facebook-sign"></i></a>
102                                             <a href="https://plus.google.com/+openerp/posts"><i class="icon-google-plus-sign"></i></a>
103                                         </h1>
104                                     </div>
105                                 </div>
106                             </div>
107                             <div class="container mt16">
108                                 <div class="pull-right" t-ignore="1">
109                                     Create a <a href="http://openerp.com/apps/website">free website</a> with <a class="label label-important" href="https://openerp.com/apps/website">OpenERP</a>
110                                 </div>
111                                 <div class="pull-left muted">
112                                     Copyright &amp;copy; <span t-field="res_company.name">Company name</span> - <a href="/sitemap">Sitemap</a>
113                                 </div>
114                             </div>
115                         </footer>
116
117                     </body>
118                 </html>
119         </template>
120
121         <template id="footer_custom" inherit_option_id="website.layout" name="Custom Footer">
122             <xpath expr="//div[@id='footer_container']" position="attributes">
123                 <attribute name="style">display: none</attribute>
124             </xpath>
125         </template>
126
127         <template id="homepage">
128             <t t-call="website.layout">
129
130                 <section>
131                     <div id="myCarousel" class="carousel slide" data-interval='1000000'>
132                         <div class="oe_carousel_options js_carousel_options" t-ignore="1">
133                             <span class="label js_add"><i class="icon-plus-sign"></i></span>
134                             <span class="label js_remove"><i class="icon-minus-sign"></i></span>
135                         </div>
136                         <!-- Carousel items -->
137                         <div class="carousel-inner">
138                             <div class="item active" style="background-image: url(/website/static/src/img/greenfields.jpg); background-size: cover;" >
139                                 <div class='container'>
140                                     <div class="mt64"> </div>
141                                     <h1>Create Awesome Websites</h1>
142                                     <h3>Super easy, fully flexible</h3>
143                                     <a href='/page/website.contactus' class='btn btn-success btn-large mt16'>Contact us</a>
144                                 </div>
145                             </div>
146                         </div>
147                         <!-- Carousel nav -->
148                         <a class="carousel-control left" href="#myCarousel" data-slide="prev" t-ignore="1">&amp;lsaquo;</a>
149                         <a class="carousel-control right" href="#myCarousel" data-slide="next" t-ignore="1">&amp;rsaquo;</a>
150                     </div>
151                 </section>
152
153                 <div>
154                     <section class="container">
155                         <div class="row">
156                             <div class="span12 text-center">
157                                 <h1 class='mt64'>Welcome To Your New Homepage,</h1>
158                                 <h2 class='mt32 subheader'>where <b><em>everything</em></b> can be customized </h2>
159                             </div>
160                         </div>
161                     </section>
162
163                     <div class='dark mt64'>
164                     <section class="container">
165                         <div class="row">
166                             <div class="span5">
167                                 <img class='img-rounded' src="/website/static/src/img/island.jpg"/>
168                             </div>
169                             <div class="span6 offset1">
170                                 <p class='mt16'>
171                                     Lorem ipsum dolor sit amet, consectetur adipisicing elit,
172                                     sed do eiusmod tempor incididunt ut labore et dolore magna 
173                                     aliqua. Ut enim ad minim veniam, quis nostrud exercitation 
174                                     ullamco laboris nisi ut aliquip ex ea commodo consequat. 
175                                 </p>
176                                 <p>
177                                     Duis aute irure dolor in reprehenderit in voluptate velit 
178                                     esse cillum dolore eu fugiat nulla pariatur. Excepteur sint 
179                                     occaecat cupidatat non proident, sunt in culpa qui officia 
180                                     deserunt mollit anim id est laborum
181                                 </p>
182                                 <div class="text-center">
183                                     <a href="http://www.openerp.com/start" class="btn mt16 btn-large btn-primary">Call To  <em>Action</em></a>
184                                 </div>
185                             </div>
186                         </div>
187                     </section>
188                     </div>
189
190                     <section class="container">
191                         <div class="row">
192                             <div class="span12 text-center">
193                                 <h2 class='mt48'>Ut enim ad minim veniam</h2>
194                             </div>
195                         </div>
196                         <div class="row mt32">
197                             <div class="span4">
198                                 <img class='img-rounded' src="/website/static/src/img/china_thumb.jpg"/>
199                                 <h4 class='mt16'>Cillum Dolore</h4>
200                                 <p>
201                                     Lorem ipsum dolor sit amet, consectetur adipisicing elit,
202                                     sed do eiusmod tempor incididunt ut labore et dolore magna 
203                                     aliqua. Ut enim ad minim veniam, quis nostrud exercitation 
204                                     ullamco laboris nisi ut aliquip ex ea commodo consequat. 
205                                 </p>
206                             </div>
207                             <div class="span4">
208                                 <img class='img-rounded' src="/website/static/src/img/desert_thumb.jpg"/>
209                                 <h4 class='mt16'>Mollit Anim</h4>
210                                 <p>
211                                     Duis aute irure dolor in reprehenderit in voluptate velit 
212                                     esse cillum dolore eu fugiat nulla pariatur. Excepteur sint 
213                                     occaecat cupidatat non proident, sunt in culpa qui officia 
214                                     deserunt mollit anim id est laborum
215                                 </p>
216                             </div>
217                             <div class="span4">
218                                 <img class='img-rounded' src="/website/static/src/img/deers_thumb.jpg"/>
219                                 <h4 class='mt16'>Nemo Enim Ipsam</h4>
220                                 <p>
221                                     Sed ut perspiciatis unde omnis iste natus error sit voluptatem
222                                     accusantium doloremque laudantium, totam rem aperiam, eaque ipsa 
223                                     quae ab illo inventore veritatis et quasi architecto beatae vitae
224                                     dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas 
225                                 </p>
226                             </div>
227                         </div>
228                     </section>
229                 </div>
230             </t>
231         </template>
232
233         <template id="default_page">
234             <t t-call="website.layout">
235                 <div class="container">
236                     <div class="row">
237                         <div class="span12">
238                             <h1>New Page</h1>
239                             <p>Write your text here...</p>
240                         </div>
241                     </div>
242                 </div>
243             </t>
244         </template>
245
246
247         <template id="404">
248                 <t t-call="website.layout">
249                     <div class="container" t-if="editable">
250                         <div class="well mt32">
251                             <p>
252                                 This page does not exists, but you can create
253                                 it as you are administrator of this site.
254                             </p>
255                             <a class="btn btn-primary" t-att-href="'/pagenew/'+path">Create Page</a> <span class="muted"> or </span> <a href="/sitemap">Search a Page</a>
256                         </div>
257
258                         <div class="text-center muted">
259                             Edit the content bellow this line to adapt the default "page not found" page.
260                         </div>
261                     </div>
262                     <hr/>
263                     <div class="container">
264                         <h1 class="mt32">404: Page not found!</h1>
265                         <p>
266                             The page you were looking for could not be
267                             found; it is possible you have typed the
268                             address incorrectly, but it has most
269                             probably been removed due to the recent
270                             website reorganisation.
271                         </p><p>
272                             Maybe you were looking for one of these
273                             popular pages ?
274                         </p>
275                         <ul>
276                             <li><a href="/">Homepage</a></li>
277                             <li><a href="/">Contact Us</a></li>
278                         </ul>
279                     </div>
280                 </t>
281         </template>
282
283         <template id="contactus" name="Contact us">
284             <t t-call="website.layout">
285                 <t t-set="title">Contact us - <t t-raw="res_company.name"/></t>
286                 <div class="container">
287                     <h2>Contact us</h2>
288                     <div class="row">
289                         <div class="span8">
290                             <p>
291                                 Contact us about anything related to our company or services.
292                             </p><p>
293                                 We'll do our best to get back to you as soon as possible.
294                             </p>
295                             <div class="text-center mt64" name="mail_button">
296                                 <a t-att-href="'mailto:'+res_company.email" class="btn btn-primary">Send us an email</a>
297                             </div>
298                         </div>
299                         <div class="span4">
300                             <address>
301                                 <strong t-field="res_company.name">Name</strong><br/>
302                                 <span t-field="res_company.street"/> <span t-field="res_company.state_id"/><br/>
303                                 <span t-field="res_company.zip"/> <span t-field="res_company.city"/><br/>
304                                 <span t-field="res_company.country_id"> </span><br/>
305                                 <br/>
306                                 <span>&amp;#x2706; <span t-field="res_company.phone"></span></span><br/>
307                                 <i class="icon-envelope"></i> <span t-field="res_company.email"></span>
308                             </address>
309                             <a t-att-href="res_company.partner_id.google_map_link()" target="_BLANK">
310                                 <img class="thumbnail" t-att-src="res_company.partner_id.google_map_img()"/>
311                             </a>
312                         </div>
313                     </div>
314                 </div>
315             </t>
316         </template>
317
318         <template id="aboutus">
319             <t t-call="website.layout">
320                 <t t-set="title">About us - <t t-raw="res_company.name"/></t>
321                 <div class="container">
322                     <h2>About us</h2>
323                     <div class="row">
324                         <div class="span4">
325                             <h3>Our vision</h3>
326                             <p>
327                                 Contact us about anything related to our company or services.
328                             </p><p>
329                                 We'll do our best to get back to you as soon as possible.
330                             </p>
331                         </div>
332                         <div class="span8">
333                         </div>
334                     </div>
335                 </div>
336             </t>
337         </template>
338
339         <template id="pager">
340             <div t-if="pager['page_count'] > 1" t-attf-class="#{ classname or '' } pagination">
341                 <ul>
342                     <li t-att-class=" 'disabled' if pager['page']['num'] == 1 else '' " >
343                         <a t-att-href=" pager['page_start']['url'] if pager['page']['num'] != 1 else '' ">Prev</a>
344                     </li>
345                     <t t-foreach="pager['pages']">
346                         <li t-att-class=" 'active' if num == pager['page']['num'] else '' ">
347                             <a t-att-href="url" t-raw="num"></a>
348                         </li>
349                     </t>
350                     <li t-att-class=" 'disabled' if pager['page']['num'] == pager['page_count'] else '' " >
351                         <a t-att-href=" pager['page_end']['url'] if pager['page']['num'] != pager['page_count'] else '' ">Next</a>
352                     </li>
353                 </ul>
354             </div>
355         </template>
356
357         <template id="publish">
358             <a href="#" t-att-data-id="object.id" t-att-data-object="object._name" class="pull-right" t-if="editable" t-ignore="true">
359                 <span t-att-class="'label label-success js_unpublish %%s' %% (not object.website_published and 'hidden' or '')">Unpublish</span>
360                 <span t-att-class="'label label-important js_publish %%s' %% (object.website_published and 'hidden' or '')">Publish</span>
361             </a>
362         </template>
363
364         <template id="snippets">
365             <div class='oe_snippet' name='FooBar'>
366                 <div class='oe_snippet_thumbnail'>
367                     foobar
368                 </div>
369                 <div class='oe_snippet_body' data-selector-siblings='[class*="span"]' data-selector-childs=''>
370                     FOOBAR
371                 </div>
372             </div>
373         </template>
374
375      </data>
376 </openerp>