6483413ed05ae82ab6b8c8ddc9014023a3959ac7
[odoo/odoo.git] / addons / website / static / src / xml / website.editor.xml
1 <templates id="template" xml:space="preserve">
2     <t t-extend="website.editorbar">
3         <t t-jquery="#website-top-view" t-operation="after">
4             <div class="navbar-inner" id="website-top-edit">
5                 <form class="navbar-form pull-left">
6                     <button type="button" data-action="save"
7                             class="btn btn-primary">Save</button>
8                     <button type="button" data-action="cancel"
9                             class="btn">Cancel</button>
10                 </form>
11                 <ul class="nav navbar-nav pull-right">
12                     <li class="navbar-form"><button type="button" data-action="snippet" class="btn btn-primary">Building Blocks</button></li>
13                 </ul>
14             </div>
15         </t>
16     </t>
17     <t t-name="website.editor.dialog">
18         <div class="modal" tabindex="-1" role="dialog" aria-hidden="true">
19             <div class="modal-dialog">
20                 <div class="modal-content">
21                     <div class="modal-header">
22                         <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
23                         <h3 class="modal-title"><t t-esc="title"/></h3>
24                     </div>
25                     <div class="modal-body"><t t-raw="__content__"/></div>
26                     <div class="modal-footer">
27                         <button type="button" class="btn" data-dismiss="modal" aria-hidden="true">Discard</button>
28                         <button type="button" class="btn btn-primary save">Save Changes</button>
29                     </div>
30                 </div>
31             </div>
32         </div>
33     </t>
34     <t t-name="website.editor.dialog.link">
35         <t t-call="website.editor.dialog">
36             <t t-set="title">Link to</t>
37             <form>
38                 <ul class="nav nav-pills nav-justified">
39                     <li class="active">
40                         <a href="#link-existing" data-toggle="pill">Your website</a>
41                     </li>
42                     <li><a href="#link-new" data-toggle="pill">New page</a></li>
43                     <li><a href="#link-external" data-toggle="pill">External Page</a></li>
44                     <li><a href="#link-email" data-toggle="pill">Email Address</a></li>
45                 </ul>
46                 <div class="tab-content">
47                     <div id="link-existing" class="tab-pane active form-group">
48                         <select id="link-existing-select"
49                                 class="form-control url-source">
50                             <option disabled="disabled">Select existing page:</option>
51                         </select>
52                     </div>
53                     <div id="link-new" class="tab-pane form-group">
54                         <input type="text" class="form-control pages url-source"
55                                 placeholder="Enter the name of the new page"/>
56                     </div>
57                     <div id="link-external" class="tab-pane">
58                         <input type="text" class="form-control url url-source"
59                                placeholder="example: http://openerp.com"/>
60                         <div class="pull-right">
61                             <label>
62                                 <input type="checkbox" class="window-new"/>
63                                 Open in new window
64                             </label>
65                         </div>
66                     </div>
67                     <div id="link-email" class="tab-pane">
68                         <input type="email" class="form-control email-address url-source"
69                                placeholder="example: you@yourwebsite.com"/>
70                     </div>
71                 </div>
72             </form>
73         </t>
74     </t>
75     <t t-name="website.editor.dialog.image">
76         <t t-call="website.editor.dialog">
77             <t t-set="title">Image:</t>
78             <div class="row">
79                 <form method="POST" action="/website/attach"
80                       enctype="multipart/form-data"
81                       target="fileframe"
82                       class="col-sm-8">
83                     <div class="well">
84                         <!-- a href="#" class="pull-left">Find image</a -->
85                         <h3 class="list-group-item-heading">Image URL</h3>
86                         <input type="text" class="form-control url"
87                                placeholder="http://openerp.com"/>
88                     </div>
89                     <div class="text-center">
90                         <p class="">— or —</p>
91                         <input type="file" name="upload" style="position: absolute; opacity: 0; width: 1px; height: 1px;"/>
92                         <button type="button" class="btn btn-primary btn-lg filepicker">
93                             Upload an image from your computer
94                         </button>
95                     </div>
96                     <p class="text-center">— or —</p>
97                     <div class="well">
98                         <h3 class="list-group-item-heading">Pick an existing attachment</h3>
99                         <div class="existing-attachments"/>
100                     </div>
101                     <input type="hidden" name="func"/>
102                 </form>
103                 <div class="col-sm-4">
104                     <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAC0lEQVQIHWP4zwAAAgEBAMVfG14AAAAASUVORK5CYII%3D"
105                          class="pull-right img-rounded image-preview"
106                          width="100%"/>
107                 </div>
108             </div>
109             <iframe src="about:blank" name="fileframe" class="hidden"/>
110         </t>
111     </t>
112     <t t-name="website.editor.dialog.image.existing">
113         <div class="existing-attachments">
114             <div class="row" t-foreach="rows" t-as="row">
115                 <div class="col-md-4" t-foreach="row" t-as="attachment">
116                     <t t-set="url">/website/attachment/<t t-esc="attachment.id"/></t>
117                     <a t-att-href="url" class="thumbnail">
118                         <img t-att-src="url" t-att-alt="attachment.name"/>
119                     </a>
120                 </div>
121             </div>
122         </div>
123     </t>
124     <t t-name="website.editor.table.panel">
125         <table class="editorbar-panel">
126             <tr t-foreach="rows"><td t-foreach="cols">&#8203;</td></tr>
127         </table>
128     </t>
129     <t t-name="website.editor.table">
130         <table class="table table-bordered table-responsive">
131             <tbody>
132                 <tr t-foreach="rows"><td t-foreach="cols">&#8203;</td></tr>
133             </tbody>
134         </table>
135     </t>
136 </templates>