diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-02-12 18:08:27 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-02-12 18:08:27 +0100 |
| commit | 0f02dcb63918228d48df50f2d5805b7fda25c14a (patch) | |
| tree | 9f83e1687755404c5cd7b5e1a12ae85d29f2d483 /addons/web_editor/static/src/xml/editor.xml | |
| parent | 83354c2b24bc6c9db1fb63440115d2d4db5bd4ef (diff) | |
| parent | c69d00157ed2162b873a07a9f317016f109f802a (diff) | |
[MERGE] forward port branch saas-11.1 up to c69d00157ed
Diffstat (limited to 'addons/web_editor/static/src/xml/editor.xml')
| -rw-r--r-- | addons/web_editor/static/src/xml/editor.xml | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/addons/web_editor/static/src/xml/editor.xml b/addons/web_editor/static/src/xml/editor.xml index 81abb435f2b..425c1bf1bce 100644 --- a/addons/web_editor/static/src/xml/editor.xml +++ b/addons/web_editor/static/src/xml/editor.xml @@ -86,6 +86,8 @@ target="fileframe"> <input type="hidden" name="csrf_token" t-att-value="csrf_token"/> <input type="hidden" name="filters" t-att-value="widget.firstFilters.join('_')"/> + <input t-if="widget.options.res_id" type="hidden" name="res_id" t-att-value="widget.options.res_id"/> + <input t-if="widget.options.res_model" type="hidden" name="res_model" t-att-value="widget.options.res_model"/> <div class="well"> <div class="form-group pull-left"> <input type="file" class="hidden" name="upload" t-att-accept="widget.accept" multiple="multiple"/> @@ -142,8 +144,9 @@ <div class="existing-attachments"> <div class="row mt16" t-as="row" t-foreach="rows"> <div class="col-sm-2 o_existing_attachment_cell" t-as="attachment" t-foreach="row"> - <i class="fa fa-times o_existing_attachment_remove" t-att-data-id="attachment.id"/> - <div class="o_attachment_border"><div t-att-data-src="attachment.src" t-att-data-url="attachment.url" t-att-alt="attachment.name" t-att-title="attachment.name" t-att-data-id="attachment.id" t-att-data-mimetype="attachment.mimetype" class="o_image o_image_loading"/></div> + <i t-if="attachment.res_model === 'ir.ui.view'" class="fa fa-times o_existing_attachment_remove" title="This file is a public view attachment" t-att-data-id="attachment.id"/> + <i t-else="" class="fa fa-times o_existing_attachment_remove" title="This file is attached to the current record" t-att-data-id="attachment.id"/> + <div class="o_attachment_border" t-att-style="attachment.res_model === 'ir.ui.view' ? null : 'border: 1px solid #5cb85c;'"><div t-att-data-src="attachment.src" t-att-data-url="attachment.url" t-att-alt="attachment.name" t-att-title="attachment.name" t-att-data-id="attachment.id" t-att-data-mimetype="attachment.mimetype" class="o_image o_image_loading"/></div> </div> </div> </div> |
