Skip to content

Commit

Permalink
[IMP] website: rename 'choose a theme' to 'pick a theme'
Browse files Browse the repository at this point in the history
closes odoo#58446

X-original-commit: af99455
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
  • Loading branch information
JKE-be committed Sep 24, 2020
1 parent 2b93dc9 commit d86a1fa
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
9 changes: 8 additions & 1 deletion addons/website/static/src/js/theme_preview_kanban.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ var KanbanController = require('web.KanbanController');
var KanbanView = require('web.KanbanView');
var ViewRegistry = require('web.view_registry');
const ThemePreviewControllerCommon = require('website.theme_preview_form').ThemePreviewControllerCommon;
var core = require('web.core');
var _lt = core._lt;

var ThemePreviewKanbanController = KanbanController.extend(ThemePreviewControllerCommon, {
/**
Expand All @@ -18,12 +20,17 @@ var ThemePreviewKanbanController = KanbanController.extend(ThemePreviewControlle
href: '/',
innerHTML: '<i class="fa fa-close"></i>',
});
const smallBreadcumb = Object.assign(document.createElement('small'), {
className: 'mx-2 text-muted',
innerHTML: _lt("Don't worry, you can switch later."),
});
this._controlPanelWrapper.el.querySelector('.o_cp_top').appendChild(websiteLink);
this._controlPanelWrapper.el.querySelector('div.o_cp_top_left li').appendChild(smallBreadcumb);
},
/**
* Called when user click on any button in kanban view.
* Targeted buttons are selected using name attribute value.
*
*
* @override
*/
_onButtonClicked: function (ev) {
Expand Down
2 changes: 1 addition & 1 deletion addons/website/views/res_config_settings_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<div class="row mt16 o_settings_container" id="website_settings" attrs="{'invisible': [('website_id', '=', False)]}">
<div class="col-12 o_setting_box" id="website_action_setting" style="margin-left: 30px; margin-bottom: 16px;">
<button name="website_go_to" type="object" string="Go to Website" class="btn btn-primary" icon="fa-globe"/>
<button name="install_theme_on_current_website" type="object" string="Choose a theme" class="ml-2 btn btn-primary" icon="fa-paint-brush"/>
<button name="install_theme_on_current_website" type="object" string="Pick a Theme" class="ml-2 btn btn-primary" icon="fa-paint-brush"/>
<button name="%(website.action_website_add_features)d" type="action" string="Add features" class="ml-2 btn btn-secondary" icon="fa-plus"/>
</div>
<div class="col-12 col-lg-6 o_setting_box" id="domain_setting">
Expand Down
4 changes: 2 additions & 2 deletions addons/website/views/website_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
<field name="arch" type="xml">
<xpath expr="//form" position="inside">
<footer>
<button name="create_and_redirect_to_theme" type="object" string="Choose a theme" class="btn btn-primary" icon="fa-paint-brush"/>
<button name="create_and_redirect_to_theme" type="object" string="Pick a Theme" class="btn btn-primary" icon="fa-paint-brush"/>
<button string="Cancel" class="btn btn-secondary" special="cancel"/>
</footer>
</xpath>
Expand Down Expand Up @@ -420,7 +420,7 @@
</record>

<record id="theme_install_kanban_action" model="ir.actions.act_window">
<field name="name">Choose a theme for your website</field>
<field name="name">Pick a Theme</field>
<field name="res_model">ir.module.module</field>
<field name="view_mode">kanban,form</field>
<field name="view_id" ref="website.theme_view_kanban" />
Expand Down
2 changes: 1 addition & 1 deletion doc/howtos/themes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ To install your theme, you just place your theme folder inside addons in your Od
After that, navigate to the Odoo **Website** module, go to
:menuselection:`Configuration --> Settings`.

Under **Website** section click the **Choose a theme** button, then hover over
Under **Website** section click the **Pick a Theme** button, then hover over
your theme and click **Use this theme**.

Structure of an Odoo page
Expand Down

0 comments on commit d86a1fa

Please sign in to comment.