summaryrefslogtreecommitdiff
path: root/addons/website_slides/static/src/xml
diff options
context:
space:
mode:
authormcm-odoo <mcm@odoo.com>2019-08-08 09:09:48 +0000
committerThibault Delavallée <tde@odoo.com>2019-08-12 15:40:36 +0000
commit2ab0bd3236c178bdec60bb050bda87f3090fe4b6 (patch)
tree585d96b127592c8875f2094eb4b837bd19818198 /addons/website_slides/static/src/xml
parent9554e9d3f8bc11d681111fff113c64469001b837 (diff)
[IMP] website_slides: add button to install Surveys application in Slide Upload modal
PURPOSE Ease discovering of eLearning features by allowing to install surveys directly from frontend in order to allow certification. SPECIFICATIONS Add a button in Upload a document to install Surveys. This button only appears if surveys is not installed. When button is clicked, ask for confirmation before installing survey. LImitate this feature to group system: system people should see the button and use standard ACLS about module installation. LINK Task ID 2026846
Diffstat (limited to 'addons/website_slides/static/src/xml')
-rw-r--r--addons/website_slides/static/src/xml/website_slides_upload.xml20
1 files changed, 18 insertions, 2 deletions
diff --git a/addons/website_slides/static/src/xml/website_slides_upload.xml b/addons/website_slides/static/src/xml/website_slides_upload.xml
index 877e8b9d967..d790242a96f 100644
--- a/addons/website_slides/static/src/xml/website_slides_upload.xml
+++ b/addons/website_slides/static/src/xml/website_slides_upload.xml
@@ -24,13 +24,22 @@
</a>
</div>
</div>
+ <t t-if="widget.modulesToInstall">
+ <t t-foreach="widget.modulesToInstall" t-as="module_info">
+ <a class="o_wslides_js_upload_install_button w-100 text-center mb-4 btn rounded border text-600 p-3"
+ href="#" t-att-title="module_info['name']"
+ t-att-data-module-id="module_info['id']">
+ <i class="fa fa-trophy"></i> <t t-esc="module_info['motivational']"/>
+ </a>
+ </t>
+ </t>
</t>
<!--
Uploading template
-->
<t t-name="website.slide.upload.modal.uploading">
- <div class="oe_slides_upload_loading text-center" aria-hidden="true" role="status">
+ <div class="text-center" aria-hidden="true" role="status">
<div class="fa-3x">
<i class="fas fa-spinner fa-pulse"></i>
</div>
@@ -39,6 +48,13 @@
</t>
<!--
+ Import module template
+ -->
+ <t t-name="website.slide.upload.modal.import">
+ <p id="o_wslides_install_module_text"/>
+ </t>
+
+ <!--
Slide Type common form part template
-->
<t t-name="website.slide.upload.modal.common">
@@ -172,7 +188,7 @@
<h3 class="modal-title">Upload Image</h3>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</header>
- <div class="oe_slides_upload_loading text-center" style="display:none" aria-hidden="true" role="status">
+ <div class="text-center" style="display:none" aria-hidden="true" role="status">
<h4><i class='fa fa-spinner fa-spin'></i> Uploading Image... </h4>
</div>
<main class="modal-body">