[IMP] web,web_settings_dashboard: Move 'About' menu to settings dashboard
Fp request: In the user preferences menu, remove "About Us" and put the version number in the Settings dashboard somewhere, as well as the link to switch to developer mode. Odoo is not a desktop application anymore.
This commit is contained in:
@@ -46,28 +46,6 @@ var UserMenu = Widget.extend({
|
||||
on_menu_support: function () {
|
||||
window.open('https://www.odoo.com/buy', '_blank');
|
||||
},
|
||||
on_menu_about: function () {
|
||||
var self = this;
|
||||
if (odoo.db_info) {
|
||||
menu_help_about(odoo.db_info);
|
||||
} else {
|
||||
this.rpc("/web/webclient/version_info", {}).done(menu_help_about);
|
||||
}
|
||||
|
||||
function menu_help_about(db_info) {
|
||||
var $help = $(QWeb.render("UserMenu.about", {db_info: db_info, debug: core.debug}));
|
||||
$help.find('a.oe_activate_debug_mode').click(function (e) {
|
||||
e.preventDefault();
|
||||
window.location = $.param.querystring(window.location.href, 'debug');
|
||||
});
|
||||
new Dialog(self, {
|
||||
size: 'medium',
|
||||
dialogClass: 'o_act_window',
|
||||
title: _t("About"),
|
||||
$content: $help
|
||||
}).open();
|
||||
}
|
||||
},
|
||||
on_menu_settings: function() {
|
||||
var self = this;
|
||||
this.trigger_up('clear_uncommitted_changes', {
|
||||
|
||||
@@ -1276,7 +1276,6 @@
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><a href="#" data-menu="documentation">Documentation</a></li>
|
||||
<li><a href="#" data-menu="support">Support</a></li>
|
||||
<li><a href="#" data-menu="about">About</a></li>
|
||||
<li class="divider"/>
|
||||
<li><a href="#" data-menu="settings">Preferences</a></li>
|
||||
<li><a href="#" data-menu="account">My Odoo.com account</a></li>
|
||||
@@ -1285,50 +1284,6 @@
|
||||
</li>
|
||||
</t>
|
||||
|
||||
<div t-name="UserMenu.about">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-offset-2 col-sm-8">
|
||||
<div class="text-center">
|
||||
<img src="/web/static/src/img/logo2.png" alt="Odoo (Formerly OpenERP)" title="Odoo (Formerly OpenERP)" class="img-circle"/>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<div class="user-heading">
|
||||
<h3>
|
||||
Version <t t-esc="db_info.server_version"/>
|
||||
(Community Edition)
|
||||
</h3>
|
||||
<t t-if="db_info.expiration_date">
|
||||
<h5>Database expiration: <t t-esc="new moment(db_info.expiration_date).format('LL')"/></h5>
|
||||
</t>
|
||||
</div>
|
||||
<div>
|
||||
<div class="tab-content">
|
||||
<div id="settings" class="tab-pane active">
|
||||
<h4>Copyright © 2004-2015 Odoo S.A.</h4>
|
||||
<p>Odoo is a trademark of <a target="_blank" href="https://www.odoo.com" style="text-decoration: underline;">Odoo S.A.</a></p>
|
||||
<p>Licenced under the terms of <a target="_blank" href="http://www.gnu.org/licenses/lgpl.html" style="text-decoration: underline;">GNU Lesser General Public License</a></p>
|
||||
<p>For more information visit <a target="_blank" href="https://www.odoo.com" style="text-decoration: underline;">Odoo.com</a></p>
|
||||
<p>
|
||||
<a href="https://www.odoo.com/web/about/facebook"><i class="fa fa-facebook-square fa-3x social-fb"></i></a>
|
||||
<a href="https://www.odoo.com/web/about/twitter"><i class="fa fa-twitter-square fa-3x social-tw"></i></a>
|
||||
<a href="https://www.odoo.com/web/about/googleplus"><i class="fa fa-google-plus-square fa-3x social-gp"></i></a>
|
||||
<a href="https://www.odoo.com/web/about/linkedin"><i class="fa fa-linkedin-square fa-3x social-lk"></i></a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" t-if="!debug">
|
||||
<div class="col-md-12">
|
||||
<a class="oe_activate_debug_mode pull-right" href="?debug" >Activate the developer mode</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<t t-name="EnterpriseUpgrade">
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
|
||||
@@ -6,7 +6,7 @@ from datetime import datetime, timedelta
|
||||
from odoo import fields, http
|
||||
from odoo.exceptions import AccessError
|
||||
from odoo.http import request
|
||||
|
||||
from odoo import release
|
||||
|
||||
class WebSettingsDashboard(http.Controller):
|
||||
|
||||
@@ -50,6 +50,7 @@ class WebSettingsDashboard(http.Controller):
|
||||
limit_date = datetime.now() - timedelta(15)
|
||||
enterprise_users = request.env['res.users'].search_count([("login_date", ">=", fields.Datetime.to_string(limit_date)), ('share', '=', False)])
|
||||
|
||||
expiration_date = request.env['ir.config_parameter'].sudo().get_param('database.expiration_date')
|
||||
return {
|
||||
'apps': {
|
||||
'installed_apps': installed_apps,
|
||||
@@ -61,4 +62,9 @@ class WebSettingsDashboard(http.Controller):
|
||||
'pending_users': pending_users,
|
||||
'user_form_view_id': request.env['ir.model.data'].xmlid_to_res_id("base.view_users_form"),
|
||||
},
|
||||
'share': {
|
||||
'server_version': release.version,
|
||||
'expiration_date': expiration_date,
|
||||
'debug': request.debug,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ var Dashboard = Widget.extend({
|
||||
},
|
||||
|
||||
load_share: function(data){
|
||||
return new DashboardShare(this, {}).replace(this.$('.o_web_settings_dashboard_share'));
|
||||
return new DashboardShare(this, data.share).replace(this.$('.o_web_settings_dashboard_share'));
|
||||
},
|
||||
|
||||
load_invitations: function(data){
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
border-color: #CBCBCB;
|
||||
}
|
||||
|
||||
> div:first-child {
|
||||
> div {
|
||||
.o_web_settings_dashboard_card();
|
||||
padding: 25px 18px 18px 18px;
|
||||
.o_web_settings_dashboard_header {
|
||||
|
||||
@@ -5,16 +5,16 @@
|
||||
<div class="container-fluid o_web_settings_dashboard">
|
||||
<div class="row">
|
||||
<div class="o_web_settings_dashboard_enterprise"/>
|
||||
<div class="col-md-3 col-sm-6 col-xs-12 o_web_settings_dashboard_col">
|
||||
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12 o_web_settings_dashboard_col">
|
||||
<div class="text-center o_web_settings_dashboard_apps"></div>
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-6 col-xs-12 o_web_settings_dashboard_col">
|
||||
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12 o_web_settings_dashboard_col">
|
||||
<div class="text-center o_web_settings_dashboard_invitations"></div>
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-6 col-xs-12 o_web_settings_dashboard_col">
|
||||
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12 o_web_settings_dashboard_col">
|
||||
<div class="text-center o_web_settings_dashboard_planner"></div>
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-6 col-xs-12 o_web_settings_dashboard_col">
|
||||
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12 o_web_settings_dashboard_col">
|
||||
<div class="text-center o_web_settings_dashboard_share"></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -85,7 +85,7 @@
|
||||
</t>
|
||||
<t t-name="DashboardPlanner">
|
||||
<div class="text-center o_web_settings_dashboard_planner">
|
||||
<i class="fa fa-info-circle fa-4x text-muted"></i>
|
||||
<i class="fa fa-check-square-o fa-4x text-muted"></i>
|
||||
<div class="o_web_settings_dashboard_header">
|
||||
<span class="o_web_settings_dashboard_planner_overall_progress"><t t-esc="widget.overall_progress"></t></span>%
|
||||
Implementation
|
||||
@@ -134,12 +134,41 @@
|
||||
Help us spread the word: Share Odoo's awesomeness with your friends!
|
||||
</small>
|
||||
</div>
|
||||
<hr/>
|
||||
<div class="row mt16">
|
||||
<div class="col-xs-4"><a><i class="fa fa-twitter-square fa-4x tw_share"/></a></div>
|
||||
<div class="col-xs-4"><a><i class="fa fa-facebook-square fa-4x fb_share"/></a></div>
|
||||
<div class="col-xs-4"><a><i class="fa fa-linkedin-square fa-4x li_share"/></a></div>
|
||||
</div>
|
||||
<hr/>
|
||||
<t t-set="server_version" t-value="widget.data.server_version"/>
|
||||
<t t-set="debug" t-value="widget.data.debug"/>
|
||||
<div class="row">
|
||||
<div class="text-center">
|
||||
<div class="user-heading">
|
||||
<h3>
|
||||
Odoo <t t-esc="server_version"/>
|
||||
(Community Edition)
|
||||
</h3>
|
||||
</div>
|
||||
<div>
|
||||
<div class="tab-content">
|
||||
<div id="settings" class="tab-pane active text-muted text-center o_web_settings_dashboard_compact_subtitle">
|
||||
<small>Copyright © 2004-2016 <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 Licenced</a></small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<a t-if="debug != true" class="oe_activate_debug_mode pull-right" href="?debug" >Activate the developer mode</a>
|
||||
<br t-if="debug != true"/>
|
||||
<a t-if="debug != 'assets'" class="oe_activate_debug_mode pull-right" href="?debug=assets" >Activate the developer mode (with assets)</a>
|
||||
<br t-if="debug != 'assets'"/>
|
||||
<a t-if="debug != false" class="oe_activate_debug_mode pull-right" href="/web" >Deactivate the developer mode</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user