summaryrefslogtreecommitdiff
path: root/addons/website_mail_channel
diff options
context:
space:
mode:
authorKishan Gajjar <kig@odoo.com>2017-03-21 11:48:02 +0530
committerqsm-odoo <qsm@odoo.com>2017-07-04 10:54:20 +0200
commitaaeef14903d4a3f359fcd6dd61a4f8ee41c947a4 (patch)
tree60f858c1ee67be6cdcc0918f1f59a48f8d956c48 /addons/website_mail_channel
parent79c9f0a7a52b0d88339efcb69296ab3b66f44442 (diff)
[IMP] web_editor, website(_*): show all snippets even if module is not installed
* mail_channel, mass_mailing, twitter, event - t-install attribute holds the technical name of the module that needs to be install to use a particular snippet. - Disable the drag & drop feature for these dummy snippets. - Move some images to website module. - Installed snippets display at the top of the list. - Hide not-installed module snippets if user don't have rights to install module.
Diffstat (limited to 'addons/website_mail_channel')
-rw-r--r--addons/website_mail_channel/static/src/img/blocks/button_channel_subscribe.pngbin2726 -> 0 bytes
-rw-r--r--addons/website_mail_channel/views/snippets.xml11
2 files changed, 6 insertions, 5 deletions
diff --git a/addons/website_mail_channel/static/src/img/blocks/button_channel_subscribe.png b/addons/website_mail_channel/static/src/img/blocks/button_channel_subscribe.png
deleted file mode 100644
index 204239a8e0c..00000000000
--- a/addons/website_mail_channel/static/src/img/blocks/button_channel_subscribe.png
+++ /dev/null
Binary files differ
diff --git a/addons/website_mail_channel/views/snippets.xml b/addons/website_mail_channel/views/snippets.xml
index 1cada8717b2..4c5268cb775 100644
--- a/addons/website_mail_channel/views/snippets.xml
+++ b/addons/website_mail_channel/views/snippets.xml
@@ -1,12 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
-<template id="subscribe" inherit_id="website.snippets" name="Snippet Subscribe">
+<template id="remove_external_snippets" inherit_id="website.external_snippets">
+ <xpath expr="//t[@t-install='website_mail_channel']" position="replace"/>
+</template>
- <xpath expr="//div[@id='snippet_content']/div[@class='o_panel_body']" position="inside">
+<template id="subscribe" inherit_id="website.snippets" name="Snippet Subscribe">
+ <xpath expr="//div[@id='snippet_content']//t[@t-snippet][last()]" position="after">
<div>
<div class="oe_snippet_thumbnail">
- <img class="oe_snippet_thumbnail_img" src="/website_mail_channel/static/src/img/blocks/button_channel_subscribe.png"/>
+ <img class="oe_snippet_thumbnail_img" src="/website/static/src/img/blocks/button_channel_subscribe.png"/>
<span class="oe_snippet_thumbnail_title">Discussion Group</span>
</div>
@@ -32,9 +35,7 @@
<p class="js_mg_confirmation hidden well well-sm">
a confirmation email has been sent.
</p>
-
</div>
-
</div>
</xpath>