Merge branch 'master' of github.com:ZoneMinder/zoneminder

pull/3003/head
Isaac Connor 2020-08-04 10:47:41 -04:00
commit 82542c569c
4 changed files with 32 additions and 8 deletions

View File

@ -212,10 +212,10 @@ mv -f CakePHP-Enum-Behavior-%{ceb_version} ./web/api/app/Plugin/CakePHP-Enum-Beh
-DZM_TARGET_DISTRO="%{zmtargetdistro}" \
.
%make_build
%cmake3_build
%install
%make_install
%cmake3_install
desktop-file-install \
--dir %{buildroot}%{_datadir}/applications \

View File

@ -1578,6 +1578,20 @@ our @options = (
type => $types{string},
category => 'web',
},
{
name => 'ZM_HOME_ABOUT',
default => 'yes',
description => 'Whether to 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',
default => '',

View File

@ -141,17 +141,17 @@ if ( $css != 'base' )
var mootoolsLoaded = (typeof MooTools != 'undefined');
if (bootstrapLoaded && mootoolsLoaded) {
Element.implement({
hide: function () {
hide: function() {
return this;
},
show: function (v) {
show: function(v) {
return this;
},
slide: function (v) {
slide: function(v) {
return this;
}
});
}
}
jQuery("#flip").click(function() {
jQuery("#panel").slideToggle("slow");
var flip = jQuery("#flip");
@ -607,11 +607,20 @@ function getZMVersionHTML() {
return $result;
}
// Returns the html representing the ZoneMinder logo
// Returns the html representing the ZoneMinder logo and about menu
function getNavBrandHTML() {
$result = '';
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/" target="_blank">ZoneMinder</a></li>'.PHP_EOL;
$result .= '<li><a class="dropdown-item" href="https://zoneminder.readthedocs.io/en/stable/" target="_blank">Documentation</a></li>'.PHP_EOL;
$result .= '<li><a class="dropdown-item" href="https://forums.zoneminder.com/" target="_blank">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;
}
return $result;
}

View File

@ -17,6 +17,7 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
global $running;
if ( !canEdit('System') ) {
$view = 'error';