summaryrefslogtreecommitdiff
path: root/addons/web_unsplash/views
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
committerstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
commit3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch)
treea44932296ef4a9b71d5f010906253d8c53727726 /addons/web_unsplash/views
parent0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff)
initial commit 2
Diffstat (limited to 'addons/web_unsplash/views')
-rw-r--r--addons/web_unsplash/views/res_config_settings_view.xml23
-rw-r--r--addons/web_unsplash/views/web_unsplash_templates.xml15
2 files changed, 38 insertions, 0 deletions
diff --git a/addons/web_unsplash/views/res_config_settings_view.xml b/addons/web_unsplash/views/res_config_settings_view.xml
new file mode 100644
index 00000000..5f61ee8e
--- /dev/null
+++ b/addons/web_unsplash/views/res_config_settings_view.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <record id="res_config_settings_view_form" model="ir.ui.view">
+ <field name="name">res.config.settings.view.form.inherit.web.unsplash</field>
+ <field name="model">res.config.settings</field>
+ <field name="inherit_id" ref="base_setup.res_config_settings_view_form"/>
+ <field name="arch" type="xml">
+ <div id="web_unsplash_warning" position="replace">
+ <div attrs="{'invisible': [('module_web_unsplash', '=', False)]}">
+ <div class="content-group mt16">
+ <label for="unsplash_access_key" class="o_light_label"/>
+ <field name="unsplash_access_key"/>
+ </div>
+ <div>
+ <a href="https://www.odoo.com/documentation/14.0/applications/general/unsplash/unsplash_access_key.html" class="oe_link" target="_blank">
+ <i class="fa fa-arrow-right"/> Generate an Access Key
+ </a>
+ </div>
+ </div>
+ </div>
+ </field>
+ </record>
+</odoo>
diff --git a/addons/web_unsplash/views/web_unsplash_templates.xml b/addons/web_unsplash/views/web_unsplash_templates.xml
new file mode 100644
index 00000000..e6201eaa
--- /dev/null
+++ b/addons/web_unsplash/views/web_unsplash_templates.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <template id="web_unsplash_assets" inherit_id="web_editor.assets_wysiwyg" name="Unsplash Images Editor Assets">
+ <xpath expr="." position="inside">
+ <link rel="stylesheet" type="text/scss" href="/web_unsplash/static/src/scss/unsplash.scss"/>
+ <script type="text/javascript" src="/web_unsplash/static/src/js/unsplashapi.js"></script>
+ <script type="text/javascript" src="/web_unsplash/static/src/js/unsplash_image_widget.js"></script>
+ </xpath>
+ </template>
+ <template id="assets_frontend" inherit_id="web.assets_frontend" name="Unsplash Images Assets">
+ <xpath expr="." position="inside">
+ <script type="text/javascript" src="/web_unsplash/static/src/js/unsplash_beacon.js"></script>
+ </xpath>
+ </template>
+</odoo>