implement zm about menu
This commit is contained in:
parent
ab9a135759
commit
9d88f8ee73
|
@ -1578,6 +1578,20 @@ our @options = (
|
||||||
type => $types{string},
|
type => $types{string},
|
||||||
category => 'web',
|
category => 'web',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name => 'ZM_HOME_ABOUT',
|
||||||
|
default => 'yes',
|
||||||
|
description => 'Whether enable the ZoneMinder About menu.',
|
||||||
|
help => q`
|
||||||
|
When enabled, the ZoneMinder logo in the top left corner of the
|
||||||
|
navigation bar becomes a menu with links to: the ZoneMinder
|
||||||
|
website, ZoneMinder Documentation, and the ZoneMinder forum.
|
||||||
|
End users wishing to rebrand their system may want to disable this
|
||||||
|
as the menu items are currently hard coded.
|
||||||
|
`,
|
||||||
|
type => $types{boolean},
|
||||||
|
category => 'web',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name => 'ZM_WEB_CONSOLE_BANNER',
|
name => 'ZM_WEB_CONSOLE_BANNER',
|
||||||
default => '',
|
default => '',
|
||||||
|
|
|
@ -605,11 +605,21 @@ function getZMVersionHTML() {
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns the html representing the ZoneMinder logo
|
// Returns the html representing the ZoneMinder logo and about menu
|
||||||
function getNavBrandHTML() {
|
function getNavBrandHTML() {
|
||||||
$result = '';
|
$result = '';
|
||||||
|
|
||||||
|
$zm_home_about = true;
|
||||||
|
if ( $zm_home_about ) {
|
||||||
|
$result .= '<a id="getNavBrandHTML" class="dropdown" data-toggle="dropdown" href="#">ZoneMinder</a>'.PHP_EOL;
|
||||||
|
$result .= '<ul style="background-color:#485460" class="dropdown-menu">'.PHP_EOL;
|
||||||
|
$result .= '<li><a class="dropdown-item" href="https://zoneminder.com/">ZoneMinder</a></li>'.PHP_EOL;
|
||||||
|
$result .= '<li><a class="dropdown-item" href="https://zoneminder.readthedocs.io/en/stable/">Documentation</a></li>'.PHP_EOL;
|
||||||
|
$result .= '<li><a class="dropdown-item" href="https://forums.zoneminder.com/">Support</a></li>'.PHP_EOL;
|
||||||
|
$result .= '</ul>'.PHP_EOL;
|
||||||
|
} else {
|
||||||
$result .= '<a id="getNavBrandHTML" href="' .validHtmlStr(ZM_HOME_URL). '" target="' .validHtmlStr(ZM_WEB_TITLE). '">' .ZM_HOME_CONTENT. '</a>'.PHP_EOL;
|
$result .= '<a id="getNavBrandHTML" href="' .validHtmlStr(ZM_HOME_URL). '" target="' .validHtmlStr(ZM_WEB_TITLE). '">' .ZM_HOME_CONTENT. '</a>'.PHP_EOL;
|
||||||
|
}
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue