ui: add "Documentation" button to main view

Similar to PVE and PMG, for quick access when one has the basic
webinterface open anyway. Should move to the "proxmoxHelpButton" once
we have an onlineHelp mapping to the docs.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2019-12-16 18:16:06 +01:00 committed by Dietmar Maurer
parent 2d694f8f1f
commit 9c01e73c2f
2 changed files with 10 additions and 0 deletions

View File

@ -48,6 +48,7 @@ async fn run() -> Result<(), Error> {
config.add_alias("xtermjs", "/usr/share/pve-xtermjs"); config.add_alias("xtermjs", "/usr/share/pve-xtermjs");
config.add_alias("widgettoolkit", "/usr/share/javascript/proxmox-widget-toolkit"); config.add_alias("widgettoolkit", "/usr/share/javascript/proxmox-widget-toolkit");
config.add_alias("css", "/usr/share/javascript/proxmox-backup/css"); config.add_alias("css", "/usr/share/javascript/proxmox-backup/css");
config.add_alias("docs", "/usr/share/doc/proxmox-backup/html");
let rest_server = RestServer::new(config); let rest_server = RestServer::new(config);

View File

@ -133,6 +133,15 @@ Ext.define('PBS.MainView', {
padding: '0 5', padding: '0 5',
tpl: Ext.String.format(gettext("You are logged in as {0}"), "'{username}'") tpl: Ext.String.format(gettext("You are logged in as {0}"), "'{username}'")
}, },
{
xtype: 'button',
baseCls: 'x-btn',
cls: 'x-btn-default-toolbar-small proxmox-inline-button',
iconCls: 'fa fa-book x-btn-icon-el-default-toolbar-small ',
text: gettext('Documentation'),
href: '/docs/index.html',
margin: '0 5 0 0',
},
{ {
reference: 'logoutButton', reference: 'logoutButton',
xtype: 'button', xtype: 'button',