mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-12 23:14:18 +01:00
Merge remote-tracking branch 'origin/develop' into feature/MVCTwigTags3.0
This commit is contained in:
@@ -1412,6 +1412,19 @@ class Config
|
||||
return $this->m_aSettings[$sPropCode]['value'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the $sPropCode parameter has a custom value or the default one.
|
||||
*
|
||||
* @param string $sPropCode
|
||||
*
|
||||
* @return bool true if the $sPropCode parameter has been customized, false if it is the default value.
|
||||
* @since 3.0.0
|
||||
*/
|
||||
public function IsCustomValue(string $sPropCode): bool
|
||||
{
|
||||
return $this->m_aSettings[$sPropCode]['value'] !== $this->m_aSettings[$sPropCode]['default'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Event log options (see LOG_... definition)
|
||||
*/
|
||||
|
||||
@@ -41,20 +41,25 @@ $ibo-quick-create--drawer--top: -1 * ($ibo-quick-create--drawer--max-height) !de
|
||||
$ibo-quick-create--drawer--top--is-opened: 100% !default;
|
||||
$ibo-quick-create--drawer--background-color: $ibo-color-white-100 !default;
|
||||
|
||||
$ibo-quick-create--compartment-title--margin-bottom: 8px !default;
|
||||
$ibo-quick-create--compartment-title--margin-top: 8px !default;
|
||||
$ibo-quick-create--compartment-title--margin-bottom: $ibo-quick-create--compartment-title--margin-top !default;
|
||||
$ibo-quick-create--compartment-title--padding-left: 32px !default;
|
||||
$ibo-quick-create--compartment-title--text-color: $ibo-color-grey-600 !default;
|
||||
$ibo-quick-create--compartment-title--line-spacing: 8px !default;
|
||||
|
||||
$ibo-quick-create--compartment-content--text-color: $ibo-color-grey-900 !default;
|
||||
|
||||
$ibo-quick-create--compartment-element--margin-bottom: 8px !default;
|
||||
|
||||
$ibo-quick-create--compartment-results--element--option: $ibo-quick-create--compartment-element--margin-bottom !default;
|
||||
$ibo-quick-create--compartment-element--padding-x: 8px !default;
|
||||
$ibo-quick-create--compartment-element--padding-y: 4px !default;
|
||||
$ibo-quick-create--compartment-element--margin-x: -1 * $ibo-quick-create--compartment-element--padding-x !default;
|
||||
$ibo-quick-create--compartment-element--background-color--is-active: $ibo-color-grey-200 !default;
|
||||
$ibo-quick-create--compartment-element--border-radius--is-active: $ibo-border-radius-300 !default;
|
||||
|
||||
$ibo-quick-create--compartment-element-image--margin-right: 8px !default;
|
||||
$ibo-quick-create--compartment-element-image--width: 20px !default;
|
||||
|
||||
$ibo-quick-create--compartment-results--container--width: 100% !important !default;
|
||||
|
||||
$ibo-quick-create--compartment--placeholder-image--margin-top: 24px !default;
|
||||
$ibo-quick-create--compartment--placeholder-image--margin-bottom: 16px !default;
|
||||
$ibo-quick-create--compartment--placeholder-image--margin-x: auto !default;
|
||||
@@ -168,6 +173,7 @@ $ibo-quick-create--compartment--placeholder-hint--text-color: $ibo-color-grey-70
|
||||
@extend %ibo-font-ral-nor-100;
|
||||
}
|
||||
.ibo-quick-create--compartment-title{
|
||||
margin-top: $ibo-quick-create--compartment-title--margin-top;
|
||||
margin-bottom: $ibo-quick-create--compartment-title--margin-bottom;
|
||||
padding-left: $ibo-quick-create--compartment-title--padding-left;
|
||||
overflow-x: hidden;
|
||||
@@ -202,27 +208,41 @@ $ibo-quick-create--compartment--placeholder-hint--text-color: $ibo-color-grey-70
|
||||
.ibo-quick-create--compartment-element{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: $ibo-quick-create--compartment-element--padding-y $ibo-quick-create--compartment-element--padding-x;
|
||||
margin-left: $ibo-quick-create--compartment-element--margin-x;
|
||||
margin-right: $ibo-quick-create--compartment-element--margin-x;
|
||||
color: inherit;
|
||||
|
||||
@extend %ibo-text-truncated-with-ellipsis;
|
||||
|
||||
&:not(:last-child){
|
||||
margin-bottom: $ibo-quick-create--compartment-element--margin-bottom;
|
||||
}
|
||||
}
|
||||
.ibo-quick-create--compartment-element-image{
|
||||
margin-right: $ibo-quick-create--compartment-element-image--margin-right;
|
||||
width: $ibo-quick-create--compartment-element-image--width;
|
||||
}
|
||||
|
||||
.ibo-quick-create--compartment-results--container{
|
||||
width: $ibo-quick-create--compartment-results--container--width;
|
||||
}
|
||||
.ibo-quick-create--compartment-results--element > .option{
|
||||
margin-bottom: $ibo-quick-create--compartment-element--margin-bottom;
|
||||
padding: $ibo-quick-create--compartment-element--padding-y $ibo-quick-create--compartment-element--padding-x;
|
||||
margin-left: $ibo-quick-create--compartment-element--margin-x;
|
||||
margin-right: $ibo-quick-create--compartment-element--margin-x;
|
||||
color: inherit;
|
||||
|
||||
|
||||
@extend %ibo-text-truncated-with-ellipsis;
|
||||
|
||||
&.active{
|
||||
background-color: $ibo-quick-create--compartment-element--background-color--is-active;
|
||||
border-radius: $ibo-quick-create--compartment-element--border-radius--is-active;
|
||||
}
|
||||
&:hover{
|
||||
cursor: pointer;
|
||||
@extend a:hover;
|
||||
}
|
||||
|
||||
.highlight{
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
.ibo-quick-create--compartment--placeholder{
|
||||
|
||||
@@ -31,15 +31,6 @@ $ibo-navigation-menu--top-part--padding-y: $ibo-navigation-menu--body--padding-y
|
||||
$ibo-navigation-menu--top-part--padding-x: $ibo-navigation-menu--body--padding-x !default;
|
||||
$ibo-navigation-menu--top-part--elements-spacing: 20px !default;
|
||||
|
||||
$ibo-navigation-menu--silo-selection--width: 70% !default;
|
||||
$ibo-navigation-menu--silo-selection--margin-left: 15px !default;
|
||||
$ibo-navigation-menu--silo-selection--input--action-button--hierarchy--padding-right: -42px !default;
|
||||
$ibo-navigation-menu--silo-selection--input--padding-right: 38px !default;
|
||||
$ibo-navigation-menu--silo-selection--input-select--action-button--hierarchy--margin-left: -42px !default;
|
||||
$ibo-navigation-menu--silo-selection--input-select-autocomplete--padding-left: 60px !default;
|
||||
$ibo-navigation-menu--silo-selection--input-select-autocomplete--action-button--search--margin-left: -42px !default;
|
||||
$ibo-navigation-menu--silo-selection--input-select-autocomplete--action-button--hierarchy--margin-left: -60px !default;
|
||||
|
||||
$ibo-navigation-menu--middle-part--padding-top: 24px !default;
|
||||
$ibo-navigation-menu--middle-part--padding-bottom: 16px !default;
|
||||
$ibo-navigation-menu--middle-part--padding-x: $ibo-navigation-menu--body--padding-x !default;
|
||||
@@ -58,6 +49,26 @@ $ibo-navigation-menu--bottom-part--background-color: $ibo-color-grey-800 !defaul
|
||||
$ibo-navigation-menu--bottom-part--is-expanded--padding-top: 24px !default;
|
||||
$ibo-navigation-menu--bottom-part--is-expanded--padding-bottom: 12px !default;
|
||||
|
||||
$ibo-navigation-menu--visual-hint--size: 16px !default;
|
||||
$ibo-navigation-menu--visual-hint--background-color: $ibo-color-red-600 !default;
|
||||
$ibo-navigation-menu--visual-hint--border-radius: $ibo-border-radius-full !default;
|
||||
|
||||
$ibo-navigation-menu--silo-selection--width: 70% !default;
|
||||
$ibo-navigation-menu--silo-selection--margin-left: 15px !default;
|
||||
$ibo-navigation-menu--silo-selection--input--action-button--hierarchy--padding-right: -42px !default;
|
||||
$ibo-navigation-menu--silo-selection--input--padding-right: 38px !default;
|
||||
$ibo-navigation-menu--silo-selection--input-select--action-button--hierarchy--margin-left: -42px !default;
|
||||
$ibo-navigation-menu--silo-selection--input-select-autocomplete--padding-left: 60px !default;
|
||||
$ibo-navigation-menu--silo-selection--input-select-autocomplete--action-button--search--margin-left: -42px !default;
|
||||
$ibo-navigation-menu--silo-selection--input-select-autocomplete--action-button--hierarchy--margin-left: -60px !default;
|
||||
|
||||
$ibo-navigation-menu--silo-visual-hint--top: 2px !default;
|
||||
$ibo-navigation-menu--silo-visual-hint--right: 0 !default;
|
||||
$ibo-navigation-menu--silo-visual-hint--size: $ibo-navigation-menu--visual-hint--size !default;
|
||||
$ibo-navigation-menu--silo-visual-hint--background-color: $ibo-navigation-menu--visual-hint--background-color !default;
|
||||
$ibo-navigation-menu--silo-visual-hint--border: 2px solid $ibo-navigation-menu--body--background-color !default;
|
||||
$ibo-navigation-menu--silo-visual-hint--border-radius: $ibo-navigation-menu--visual-hint--border-radius !default;
|
||||
|
||||
$ibo-navigation-menu--action--padding-x: 8px !default;
|
||||
$ibo-navigation-menu--action--padding-y: 10px !default;
|
||||
$ibo-navigation-menu--action--border-radius: $ibo-border-radius-500 !default;
|
||||
@@ -163,13 +174,12 @@ $ibo-navigation-menu--notifications-toggler--color: $ibo-color-grey-600 !default
|
||||
$ibo-navigation-menu--notifications-toggler--color--is-loaded: $ibo-color-grey-300 !default;
|
||||
$ibo-navigation-menu--notifications-toggler--color--on-hover: $ibo-color-white-200 !default;
|
||||
|
||||
$ibo-navigation-menu--notifications-toggler--new-messages--width: 16px !default;
|
||||
$ibo-navigation-menu--notifications-toggler--new-messages--height: 16px !default;
|
||||
$ibo-navigation-menu--notifications-toggler--new-messages--top: -2px !default;
|
||||
$ibo-navigation-menu--notifications-toggler--new-messages--right: -7px !default;
|
||||
$ibo-navigation-menu--notifications-toggler--new-messages--background-color: $ibo-color-red-600 !default;
|
||||
$ibo-navigation-menu--notifications-toggler--new-messages--border: solid 2px $ibo-navigation-menu--bottom-part--background-color !default;
|
||||
$ibo-navigation-menu--notifications-toggler--new-messages--border-radius: $ibo-border-radius-full !default;
|
||||
$ibo-navigation-menu--notifications-toggler--new-messages--size: $ibo-navigation-menu--visual-hint--size !default;
|
||||
$ibo-navigation-menu--notifications-toggler--new-messages--background-color: $ibo-navigation-menu--visual-hint--background-color !default;
|
||||
$ibo-navigation-menu--notifications-toggler--new-messages--border: 2px solid $ibo-navigation-menu--bottom-part--background-color !default;
|
||||
$ibo-navigation-menu--notifications-toggler--new-messages--border-radius: $ibo-navigation-menu--visual-hint--border-radius !default;
|
||||
|
||||
$ibo-navigation-menu--user-notifications--notifications-toggler--new-messages--width: 10px !default;
|
||||
$ibo-navigation-menu--user-notifications--notifications-toggler--new-messages--height: 10px !default;
|
||||
@@ -215,6 +225,9 @@ $ibo-navigation-menu--user-info--height--is-expanded: 100% !default;
|
||||
.ibo-navigation-menu--silo-selection{
|
||||
display: inline-block;
|
||||
}
|
||||
.ibo-navigation-menu--silo-visual-hint{
|
||||
display: none;
|
||||
}
|
||||
.ibo-navigation-menu--body{
|
||||
width: $ibo-navigation-menu--body--width-expanded;
|
||||
|
||||
@@ -383,6 +396,7 @@ $ibo-navigation-menu--user-info--height--is-expanded: 100% !default;
|
||||
}
|
||||
/* - Toggler */
|
||||
.ibo-navigation-menu--toggler{
|
||||
position: relative; /* For the silo visual hint to be placed relatively to it */
|
||||
display: inline-flex;
|
||||
/* Width is define here in addition of the icon so we can fix its width whether the menu is collapsed or expanded */
|
||||
width: $ibo-navigation-menu--toggler--width;
|
||||
@@ -447,6 +461,16 @@ $ibo-navigation-menu--user-info--height--is-expanded: 100% !default;
|
||||
}
|
||||
}
|
||||
}
|
||||
.ibo-navigation-menu--silo-visual-hint{
|
||||
position: absolute;
|
||||
top: $ibo-navigation-menu--silo-visual-hint--top;
|
||||
right: $ibo-navigation-menu--silo-visual-hint--right;
|
||||
width: $ibo-navigation-menu--silo-visual-hint--size;
|
||||
height: $ibo-navigation-menu--silo-visual-hint--size;
|
||||
background-color: $ibo-navigation-menu--silo-visual-hint--background-color;
|
||||
border: $ibo-navigation-menu--silo-visual-hint--border;
|
||||
border-radius: $ibo-navigation-menu--silo-visual-hint--border-radius;
|
||||
}
|
||||
|
||||
|
||||
/* - Menu groups */
|
||||
@@ -698,8 +722,8 @@ $ibo-navigation-menu--user-info--height--is-expanded: 100% !default;
|
||||
.ibo-navigation-menu--notifications-toggler--new-messages{
|
||||
top: $ibo-navigation-menu--notifications-toggler--new-messages--top;
|
||||
right: $ibo-navigation-menu--notifications-toggler--new-messages--right;
|
||||
width: $ibo-navigation-menu--notifications-toggler--new-messages--width;
|
||||
height: $ibo-navigation-menu--notifications-toggler--new-messages--height;
|
||||
width: $ibo-navigation-menu--notifications-toggler--new-messages--size;
|
||||
height: $ibo-navigation-menu--notifications-toggler--new-messages--size;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,21 @@
|
||||
/*
|
||||
/*!
|
||||
* Copyright (C) 2013-2020 Combodo SARL
|
||||
*
|
||||
* This file is part of iTop.
|
||||
*
|
||||
* iTop is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* iTop is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
*/
|
||||
/*!
|
||||
* Copyright (C) 2013-2020 Combodo SARL
|
||||
*
|
||||
* This file is part of iTop.
|
||||
@@ -15,11 +32,22 @@
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
*/
|
||||
|
||||
/*!
|
||||
* Combodo portal theme v2.7.0
|
||||
* Based on Bootswatch Simplex
|
||||
*/
|
||||
/*!
|
||||
* bootswatch v3.3.5
|
||||
* Homepage: http://bootswatch.com
|
||||
* Copyright 2012-2015 Thomas Park
|
||||
* Licensed under MIT
|
||||
* Based on Bootstrap
|
||||
*/
|
||||
/*!
|
||||
* Bootstrap v3.3.5 (http://getbootstrap.com)
|
||||
* Copyright 2011-2015 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
*/
|
||||
* {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -943,15 +943,15 @@ $hr-border: $gray-lighter !default;
|
||||
//
|
||||
//##
|
||||
|
||||
$messaging-self-primary-color: $white !default;
|
||||
$messaging-self-secondary-color: $gray-dark !default;
|
||||
$messaging-1st-peer-primary-color: $combodo-orange !default;
|
||||
$messaging-1st-peer-secondary-color: $white !default;
|
||||
$messaging-2nd-peer-primary-color: #e9a537 !default;
|
||||
$messaging-2nd-peer-secondary-color: $white !default;
|
||||
$messaging-3rd-peer-primary-color: darken($combodo-orange, 7%) !default;
|
||||
$messaging-3rd-peer-secondary-color: $white !default;
|
||||
$messaging-4th-peer-primary-color: #e3952c !default;
|
||||
$messaging-4th-peer-secondary-color: $white !default;
|
||||
$messaging-5th-peer-primary-color: darken($combodo-orange, 14%) !default;
|
||||
$messaging-5th-peer-secondary-color: $white !default;
|
||||
$messaging-self-primary-color: $combodo-dark-gray !default;
|
||||
$messaging-self-secondary-color: $white !default;
|
||||
$messaging-1st-peer-primary-color: $white !default;
|
||||
$messaging-1st-peer-secondary-color: $gray-dark !default;
|
||||
$messaging-2nd-peer-primary-color: $white !default;
|
||||
$messaging-2nd-peer-secondary-color: $gray-dark !default;
|
||||
$messaging-3rd-peer-primary-color: $white !default;
|
||||
$messaging-3rd-peer-secondary-color: $gray-dark !default;
|
||||
$messaging-4th-peer-primary-color: $white !default;
|
||||
$messaging-4th-peer-secondary-color: $gray-dark !default;
|
||||
$messaging-5th-peer-primary-color: $white !default;
|
||||
$messaging-5th-peer-secondary-color: $gray-dark !default;
|
||||
|
||||
@@ -21,10 +21,11 @@
|
||||
Dict::Add('EN US', 'English', 'English', array(
|
||||
'UI:Layout:NavigationMenu:CompanyLogo:AltText' => 'Company logo',
|
||||
'UI:Layout:NavigationMenu:Toggler:Tooltip' => 'Expand / Collapse',
|
||||
'UI:Layout:NavigationMenu:Toggler:TooltipWithSiloLabel' => 'Expand / Collapse (Filtered on %1$s)',
|
||||
'UI:Layout:NavigationMenu:MenuFilter:Input:Placeholder' => 'Filter...',
|
||||
'UI:Layout:NavigationMenu:MenuFilter:Input:Tooltip' => 'Type your keywords to filter menus',
|
||||
'UI:Layout:NavigationMenu:MenuFilter:Input:Hotkey' => 'Alt + M',
|
||||
'UI:Layout:NavigationMenu:MenuFilter:Input:Hint' => 'Matches from all menu groups will be displayed, not only those from this one',
|
||||
'UI:Layout:NavigationMenu:MenuFilter:Input:Hint' => 'Matches from all menu groups will be displayed',
|
||||
'UI:Layout:NavigationMenu:MenuFilter:Placeholder:Hint' => 'No result for this menu filter',
|
||||
'UI:Layout:NavigationMenu:UserInfo:WelcomeMessage:Text' => 'Hi %1$s!',
|
||||
'UI:Layout:NavigationMenu:UserInfo:Picture:AltText' => '%1$s\'s contact picture'
|
||||
|
||||
@@ -31,6 +31,7 @@ $(function()
|
||||
css_classes:
|
||||
{
|
||||
opened: 'ibo-is-opened',
|
||||
hidden: 'ibo-is-hidden',
|
||||
},
|
||||
js_selectors:
|
||||
{
|
||||
@@ -143,11 +144,14 @@ $(function()
|
||||
},
|
||||
_openDrawer: function()
|
||||
{
|
||||
this.element.find(this.js_selectors.compartment_element).removeClass(this.css_classes.hidden);
|
||||
this.element.addClass(this.css_classes.opened);
|
||||
},
|
||||
_closeDrawer: function()
|
||||
{
|
||||
this.element.removeClass(this.css_classes.opened);
|
||||
//Note: Elements are hidden to avoid having the keyboard navigation "TAB" passing throught them when they are not displayed
|
||||
this.element.find(this.js_selectors.compartment_element).addClass(this.css_classes.hidden);
|
||||
},
|
||||
_setFocusOnInput: function()
|
||||
{
|
||||
|
||||
@@ -31,6 +31,7 @@ $(function()
|
||||
css_classes:
|
||||
{
|
||||
opened: 'ibo-is-opened',
|
||||
hidden: 'ibo-is-hidden',
|
||||
},
|
||||
js_selectors:
|
||||
{
|
||||
@@ -157,11 +158,14 @@ $(function()
|
||||
},
|
||||
_openDrawer: function()
|
||||
{
|
||||
this.element.find(this.js_selectors.compartment_element).removeClass(this.css_classes.hidden);
|
||||
this.element.addClass(this.css_classes.opened);
|
||||
},
|
||||
_closeDrawer: function()
|
||||
{
|
||||
this.element.removeClass(this.css_classes.opened);
|
||||
//Note: Elements are hidden to avoid having the keyboard navigation "TAB" passing throught them when they are not displayed
|
||||
this.element.find(this.js_selectors.compartment_element).addClass(this.css_classes.hidden);
|
||||
},
|
||||
_setFocusOnInput: function()
|
||||
{
|
||||
|
||||
@@ -123,7 +123,12 @@ $(function()
|
||||
oEvent.preventDefault();
|
||||
|
||||
var sMenuGroupId = oMenuGroupElem.attr('data-menu-group-id');
|
||||
this._openDrawer(sMenuGroupId);
|
||||
if(this._getActiveMenuGroupId() === sMenuGroupId) {
|
||||
this._closeDrawer();
|
||||
}
|
||||
else {
|
||||
this._openDrawer(sMenuGroupId);
|
||||
}
|
||||
},
|
||||
_onBodyClick: function(oEvent)
|
||||
{
|
||||
|
||||
@@ -630,6 +630,7 @@ try
|
||||
$sQueryLabel = $sFullText;
|
||||
}
|
||||
GlobalSearchHelper::AddQueryToHistory($sQuery, $sQueryIconUrl, $sQueryLabel);
|
||||
$oP->GetTopBarLayout()->GetGlobalSearch()->SetLastQueries(GlobalSearchHelper::GetLastQueries());
|
||||
|
||||
// Check the needle length
|
||||
$iMinLenth = MetaModel::GetConfig()->Get('full_text_needle_min');
|
||||
|
||||
@@ -213,7 +213,7 @@ EOF
|
||||
null,
|
||||
null,
|
||||
true
|
||||
);
|
||||
)->SetTooltip(Dict::S('UI:Button:Evaluate:Title'));
|
||||
$oQueryForm->AddSubBlock($oQuerySubmit);
|
||||
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ class GlobalSearchHelper
|
||||
// Add HTML label if missing
|
||||
if(!isset($aHistoryEntries[$iIdx]['label_html']))
|
||||
{
|
||||
$aHistoryEntries[$iIdx]['label_html'] = utils::HtmlEntities($aHistoryEntries[$iIdx]['query']);
|
||||
$aHistoryEntries[$iIdx]['label_html'] = utils::EscapeHtml($aHistoryEntries[$iIdx]['query']);
|
||||
}
|
||||
|
||||
// Set absolute URL
|
||||
|
||||
@@ -108,7 +108,7 @@ class QuickCreateHelper
|
||||
// Add class label
|
||||
if(!isset($aHistoryEntries[$iIdx]['label_html']))
|
||||
{
|
||||
$aHistoryEntries[$iIdx]['label_html'] = utils::HtmlEntities(MetaModel::GetName($sClass));
|
||||
$aHistoryEntries[$iIdx]['label_html'] = utils::EscapeHtml(MetaModel::GetName($sClass));
|
||||
}
|
||||
|
||||
// Add url
|
||||
|
||||
@@ -61,14 +61,18 @@ class NavigationMenu extends UIBlock
|
||||
|
||||
/** @var string $sAppRevisionNumber */
|
||||
protected $sAppRevisionNumber;
|
||||
/** @var string $sAppSquareIconUrl */
|
||||
/** @var string Logo to display when the menu is collapsed */
|
||||
protected $sAppSquareIconUrl;
|
||||
/** @var string $sAppFullIconUrl */
|
||||
/** @var string Logo to display when the menu is expanded */
|
||||
protected $sAppFullIconUrl;
|
||||
/** @var string $sAppIconLink */
|
||||
/** @var string URL of the link on both $AppXXXIconUrl */
|
||||
protected $sAppIconLink;
|
||||
/** @var array $aSiloSelection */
|
||||
/** @var array Data to render the silo selection area */
|
||||
protected $aSiloSelection;
|
||||
/** @var bool Whether a silo is currently selected or not */
|
||||
protected $bHasSiloSelected;
|
||||
/** @var string|null Current silo label */
|
||||
protected $sSiloLabel;
|
||||
/** @var array $aMenuGroups */
|
||||
protected $aMenuGroups;
|
||||
/** @var array $aUserData */
|
||||
@@ -110,6 +114,7 @@ class NavigationMenu extends UIBlock
|
||||
$this->oUserMenu = $oUserMenu;
|
||||
$this->oNewsroomMenu = $oNewsroomMenu;
|
||||
|
||||
$this->ComputeAppIconLink();
|
||||
$this->ComputeExpandedState();
|
||||
$this->ComputeMenuFilterHintState();
|
||||
$this->ComputeUserData();
|
||||
@@ -125,6 +130,7 @@ class NavigationMenu extends UIBlock
|
||||
}
|
||||
|
||||
/**
|
||||
* @uses $sAppSquareIconUrl
|
||||
* @return string
|
||||
*/
|
||||
public function GetAppSquareIconUrl()
|
||||
@@ -133,6 +139,7 @@ class NavigationMenu extends UIBlock
|
||||
}
|
||||
|
||||
/**
|
||||
* @uses $sAppFullIconUrl
|
||||
* @return string
|
||||
*/
|
||||
public function GetAppFullIconUrl()
|
||||
@@ -141,6 +148,7 @@ class NavigationMenu extends UIBlock
|
||||
}
|
||||
|
||||
/**
|
||||
* @uses $sAppIconLink
|
||||
* @return string
|
||||
*/
|
||||
public function GetAppIconLink()
|
||||
@@ -155,6 +163,24 @@ class NavigationMenu extends UIBlock
|
||||
{
|
||||
return $this->aSiloSelection;
|
||||
}
|
||||
|
||||
/**
|
||||
* @uses $bHasSiloSelected
|
||||
* @return bool
|
||||
*/
|
||||
public function HasSiloSelected(): bool
|
||||
{
|
||||
return $this->bHasSiloSelected;
|
||||
}
|
||||
|
||||
/**
|
||||
* @uses $sSiloLabel
|
||||
* @return string|null
|
||||
*/
|
||||
public function GetSiloLabel()
|
||||
{
|
||||
return $this->sSiloLabel;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
@@ -223,6 +249,24 @@ class NavigationMenu extends UIBlock
|
||||
return MetaModel::GetConfig()->Get('newsroom_enabled');
|
||||
}
|
||||
|
||||
/**
|
||||
* @uses $sAppIconLink
|
||||
* @return void
|
||||
*/
|
||||
public function ComputeAppIconLink(): void
|
||||
{
|
||||
$sPropCode = 'app_icon_url';
|
||||
|
||||
// Try if a custom URL was set in the configuration file
|
||||
if(MetaModel::GetConfig()->IsCustomValue($sPropCode)) {
|
||||
$this->sAppIconLink = MetaModel::GetConfig()->Get('app_icon_url');
|
||||
}
|
||||
// Otherwise use the home page
|
||||
else {
|
||||
$this->sAppIconLink = MetaModel::GetConfig()->Get('app_root_url');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
* @throws \CoreException
|
||||
@@ -231,6 +275,9 @@ class NavigationMenu extends UIBlock
|
||||
*/
|
||||
public function ComputeSiloSelection()
|
||||
{
|
||||
$this->bHasSiloSelected = false;
|
||||
$this->sSiloLabel = null;
|
||||
|
||||
//TODO 3.0 Use components if we have the time to build select/autocomplete components before release
|
||||
// List of visible Organizations
|
||||
$iCount = 0;
|
||||
@@ -263,6 +310,13 @@ class NavigationMenu extends UIBlock
|
||||
default:
|
||||
$oAppContext = new ApplicationContext();
|
||||
$iCurrentOrganization = $oAppContext->GetCurrentValue('org_id');
|
||||
|
||||
if(!empty($iCurrentOrganization)) {
|
||||
$oCurrentOrganization = MetaModel::GetObject('Organization', $iCurrentOrganization, true, true);
|
||||
$this->bHasSiloSelected = true;
|
||||
$this->sSiloLabel = $oCurrentOrganization->GetRawName();
|
||||
}
|
||||
|
||||
$this->aSiloSelection['html'] = '<form data-role="ibo-navigation-menu--silo-selection--form" action="'.utils::GetAbsoluteUrlAppRoot().'pages/UI.php">'; //<select class="org_combo" name="c[org_id]" title="Pick an organization" onChange="this.form.submit();">';
|
||||
|
||||
$oPage = new \CaptureWebPage();
|
||||
|
||||
@@ -7,12 +7,19 @@
|
||||
<a class="ibo-navigation-menu--full-company-logo" title="{{ oUIBlock.AppRevisionNumber }}" href="{{ oUIBlock.AppIconLink }}">
|
||||
<img src="{{ oUIBlock.AppFullIconUrl }}" alt="{{ 'UI:Layout:NavigationMenu:CompanyLogo:AltText'|dict_s }}">
|
||||
</a>
|
||||
<a class="ibo-navigation-menu--toggler" data-role="ibo-navigation-menu--toggler" data-tooltip-content="{{ 'UI:Layout:NavigationMenu:Toggler:Tooltip'|dict_s }}" data-tooltip-placement="right" data-tooltip-distance-offset="20" href="#">
|
||||
<a class="ibo-navigation-menu--toggler" data-role="ibo-navigation-menu--toggler"
|
||||
data-tooltip-content="{% if oUIBlock.HasSiloSelected() %}{{ 'UI:Layout:NavigationMenu:Toggler:TooltipWithSiloLabel'|dict_format(oUIBlock.GetSiloLabel()) }}{% else %}{{ 'UI:Layout:NavigationMenu:Toggler:Tooltip'|dict_s }}{% endif %}"
|
||||
data-tooltip-placement="right"
|
||||
data-tooltip-distance-offset="20"
|
||||
href="#">
|
||||
<span class="ibo-navigation-menu--toggler-icon">
|
||||
<span class="ibo-navigation-menu--toggler-bar"></span>
|
||||
<span class="ibo-navigation-menu--toggler-bar"></span>
|
||||
<span class="ibo-navigation-menu--toggler-bar"></span>
|
||||
</span>
|
||||
{% if oUIBlock.HasSiloSelected() %}
|
||||
<span class="ibo-navigation-menu--silo-visual-hint"></span>
|
||||
{% endif %}
|
||||
</a>
|
||||
<div class="ibo-navigation-menu--silo-selection">
|
||||
{{ oUIBlock.GetSiloSelection().html|raw }}
|
||||
|
||||
Reference in New Issue
Block a user