diff options
| author | aca <aca@odoo.com> | 2019-06-19 09:14:43 +0000 |
|---|---|---|
| committer | Yannick Tivisse <yti@odoo.com> | 2019-07-26 09:53:46 +0000 |
| commit | 78565b1dc933692abba46a73f2298b7ea8e03c88 (patch) | |
| tree | 05006de48a2099a35c39dc5571d4929ab0135a3b /addons/base_setup/static/src/xml | |
| parent | a8893ad2994aad05961bdddcecb3e2c55f301ed5 (diff) | |
[REM] web_settings_dashboard: Merge module into base_setup
Purpose
=======
Currently, when we click on “Settings” on the Home Dashboard, we arrive
on a new Dashboard with several pieces of information like Installed Apps,
invite new users, or translations. Some informations are reachable in
several ways, which is not necessary.
We would like to remove this page and replace it with the General Settings
page directly. That makes more sense to the user who click on “Settings”. The
present informations will be dispatched in the menu or in the general settings
for a better usability.
Specification
=============
This commit move code from web_settings_dashboard in order to put the features
in settings directly. To do so, we choose to move code to base_setup, and create
widget on the settings form view to keep features. Concerned features are: invite
users, dev tools, odoo edition number and IAP account link.
TaskID: 2006910
closes odoo/odoo#34290
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Diffstat (limited to 'addons/base_setup/static/src/xml')
3 files changed, 97 insertions, 0 deletions
diff --git a/addons/base_setup/static/src/xml/res_config_dev_tool.xml b/addons/base_setup/static/src/xml/res_config_dev_tool.xml new file mode 100644 index 00000000000..ab108bd2518 --- /dev/null +++ b/addons/base_setup/static/src/xml/res_config_dev_tool.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<template> + <div t-name='res_config_dev_tool'> + <div id="developer_tool"> + <h2>Developer Tools</h2> + <div class="row mt16 o_settings_container"> + <div class="col-12 col-lg-6 o_setting_box" id="devel_tool"> + <div class="o_setting_right_pane"> + <a t-if="!widget.isDebug" class="d-block" href="?debug=1">Activate the developer mode</a> + <a t-if="!widget.isAssets" class="d-block" href="?debug=assets">Activate the developer mode (with assets)</a> + <a t-if="!widget.isTests" class="d-block" href="?debug=assets,tests">Activate the developer mode (with tests assets)</a> + <a t-if="widget.isDebug" class="d-block" href="?debug=">Deactivate the developer mode</a> + <a t-if="!widget.isDebug && !widget.demo_active" class="o_web_settings_force_demo" href="#">Load demo data</a> + </div> + </div> + </div> + </div> + </div> +</template> diff --git a/addons/base_setup/static/src/xml/res_config_edition.xml b/addons/base_setup/static/src/xml/res_config_edition.xml new file mode 100644 index 00000000000..31485c33ab9 --- /dev/null +++ b/addons/base_setup/static/src/xml/res_config_edition.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- TODO See if this has to be editable in some way, see if it is easy for someone to change this --> +<!-- TODO Also see what is done to override the (Community Edition) --> +<template> + <div t-name='res_config_edition'> + <div class="col-12 o_setting_box" id="edition"> + <div class="o_setting_right_pane"> + <div class="user-heading"> + <h3> + Odoo <t t-esc="widget.server_version"/> + (Community Edition) + </h3> + </div> + <div> + <div class="tab-content"> + <div role="tabpanel" id="settings" class="tab-pane active text-muted o_web_settings_compact_subtitle"> + <small>Copyright © 2004 <a target="_blank" href="https://www.odoo.com" style="text-decoration: underline;">Odoo S.A.</a> <a target="_blank" href="http://www.gnu.org/licenses/lgpl.html" style="text-decoration: underline;">GNU LGPL Licensed</a></small> + </div> + </div> + </div> + </div> + </div> + </div> +</template> diff --git a/addons/base_setup/static/src/xml/res_config_invite_users.xml b/addons/base_setup/static/src/xml/res_config_invite_users.xml new file mode 100644 index 00000000000..ba9bd5fbc7e --- /dev/null +++ b/addons/base_setup/static/src/xml/res_config_invite_users.xml @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="utf-8"?> +<templates> + <div t-name='res_config_invite_users'> + <div class="row mt16 o_settings_container"> + <div class='col-12 col-lg-6 o_setting_box'> + <div class='o_setting_right_pane'> + <t t-if="widget.active_users"> + <div class='o_form_label'> + <t t-esc="widget.active_users"></t> + <t t-if="widget.active_users <= 1"> Active User</t> + <t t-if="widget.active_users > 1">Active Users</t> + </div> + </t> + <br/> + <a href="#" class="o_web_settings_access_rights d-flex"> + <i class='fa fa-fw o_button_icon fa-arrow-right'></i> + Manage Users + </a> + </div> + </div> + <div class="col-12 col-lg-6 o_setting_box"> + <div class="o_setting_right_pane"> + <t t-if="widget.pending_users.length"> + <p class="o_form_label">Pending Invitations:</p> + <span t-foreach="widget.pending_users" t-as="pending"> + <a href="#" class="badge badge-pill o_web_settings_user" t-att-data-user-id="pending[0]"> <t t-esc="pending[1]"/> </a> + </span> + <t t-if="widget.pending_users.length < widget.pending_count"> + <br/> + <a href="#" class="o_web_settings_more"><t t-esc="widget.pending_count - widget.pending_users.length"/> more </a> + </t> + </t> + </div> + </div> + <div class='col-12 col-lg-6 o_setting_box'> + <div class='o_setting_right_pane'> + <span class="o_form_label">Invite New Users:</span> + <span class="o_web_settings_invitation_form"/> + <input class="o_user_emails o_input mt8" type="text" placeholder="Enter e-mail addresses"/> + <button class="btn btn-primary btn-block o_web_settings_invite mt16" data-loading-text="Inviting..."><strong>Invite</strong></button> + </div> + </div> + </div> + </div> + + <t t-name="EmailBadge"> + <span t-foreach="emails" t-as="email" class="badge badge-pill"> + <span class="o_badge_text"> + <t t-esc='email'/> + </span> + <a href="#" class="fa fa-times o_badge_remove" title="Remove Email" aria-label="Remove Email" role="button"/> + </span> + </t> +</templates> |
