diff --git a/application/cmdbabstract.class.inc.php b/application/cmdbabstract.class.inc.php index 515159580..eeeb8ba83 100644 --- a/application/cmdbabstract.class.inc.php +++ b/application/cmdbabstract.class.inc.php @@ -506,14 +506,13 @@ HTML // Load the dashboard $oDashboard = $oAttDef->GetDashboard(); - if (is_null($oDashboard)) - { + if (is_null($oDashboard)) { throw new CoreException(Dict::S('UI:Error:InvalidDashboard')); } $bCanEdit = UserRights::IsAdministrator() || $oAttDef->IsUserEditable(); $sDivId = $oDashboard->GetId(); - $oPage->add('
'); + $oPage->add('
'); $aExtraParams = array( 'query_params' => $this->ToArgsForQuery(), 'dashboard_div_id' => $sDivId, diff --git a/application/dashboard.class.inc.php b/application/dashboard.class.inc.php index 6cbcd4633..045537eac 100644 --- a/application/dashboard.class.inc.php +++ b/application/dashboard.class.inc.php @@ -432,19 +432,16 @@ abstract class Dashboard $oPage->add('
'.Dict::S('UI:DashboardEdit:Properties').'
'); $sUrl = utils::GetAbsoluteUrlAppRoot(); - $oPage->add('
'.Dict::S('UI:DashboardEdit:Layout').'
'); - $oPage->add('
'); - foreach( get_declared_classes() as $sLayoutClass) - { - if (is_subclass_of($sLayoutClass, 'DashboardLayout')) - { + $oPage->add('
'.Dict::S('UI:DashboardEdit:Layout').'
'); + $oPage->add('
'); + foreach (get_declared_classes() as $sLayoutClass) { + if (is_subclass_of($sLayoutClass, 'DashboardLayout')) { $oReflection = new ReflectionClass($sLayoutClass); - if (!$oReflection->isAbstract()) - { + if (!$oReflection->isAbstract()) { $aCallSpec = array($sLayoutClass, 'GetInfo'); $aInfo = call_user_func($aCallSpec); $sChecked = ($this->sLayoutClass == $sLayoutClass) ? 'checked' : ''; - $oPage->add(''); // title="" on either the img or the label does nothing ! + $oPage->add(''); // title="" on either the img or the label does nothing ! } } } @@ -569,11 +566,10 @@ JS $oPage->add('
'.Dict::S('UI:DashboardEdit:Dashlets').'
'); $sUrl = utils::GetAbsoluteUrlAppRoot(); - $oPage->add('
'); + $oPage->add('
'); $aAvailableDashlets = $this->GetAvailableDashlets(); - foreach($aAvailableDashlets as $sDashletClass => $aInfo) - { - $oPage->add(''); + foreach ($aAvailableDashlets as $sDashletClass => $aInfo) { + $oPage->add(''); } $oPage->add('
'); @@ -1229,30 +1225,27 @@ EOF */ public function RenderEditor($oPage, $aExtraParams = array()) { - if (isset($aExtraParams['this->class'])) - { + if (isset($aExtraParams['this->class'])) { $oObj = MetaModel::GetObject($aExtraParams['this->class'], $aExtraParams['this->id']); $aRenderParams = array('query_params' => $oObj->ToArgsForQuery()); - } - else - { + } else { $aRenderParams = $aExtraParams; } $aRenderParams['dashboard_div_id'] = $aExtraParams['dashboard_div_id']; $sJSExtraParams = json_encode($aExtraParams); - $oPage->add('
'); + $oPage->add('
'); $oPage->add('
'); $this->SetCustomFlag(true); $this->Render($oPage, true, $aRenderParams); $oPage->add('
'); - $oPage->add('
'); + $oPage->add('
'); $this->RenderProperties($oPage, $aExtraParams); $this->RenderDashletsSelection($oPage); $this->RenderDashletsProperties($oPage, $aExtraParams); $oPage->add('
'); $oPage->add('
'); // For exchanging messages between the panes, same as in the designer $oPage->add('
'); - + $sDialogTitle = Dict::S('UI:DashboardEdit:Title'); $sOkButtonLabel = Dict::S('UI:Button:Save'); $sCancelButtonLabel = Dict::S('UI:Button:Cancel'); diff --git a/application/menunode.class.inc.php b/application/menunode.class.inc.php index 880138555..7640e2007 100644 --- a/application/menunode.class.inc.php +++ b/application/menunode.class.inc.php @@ -1462,15 +1462,14 @@ class DashboardMenuNode extends MenuNode if ($oDashboard != null) { $sDivId = utils::Sanitize($this->sMenuId, '', 'element_identifier'); - $oPage->add('
'); + $oPage->add('
'); $aExtraParams['dashboard_div_id'] = $sDivId; $oDashboard->SetReloadURL($this->GetHyperlink($aExtraParams)); $oDashboard->Render($oPage, false, $aExtraParams); $oPage->add('
'); $bEdit = utils::ReadParam('edit', false); - if ($bEdit) - { + if ($bEdit) { $sId = addslashes($this->sMenuId); $oPage->add_ready_script("EditDashboard('$sId');"); } diff --git a/templates/base/layouts/dashboard/column/layout.html.twig b/templates/base/layouts/dashboard/column/layout.html.twig index 40e644a6c..8361e11c0 100644 --- a/templates/base/layouts/dashboard/column/layout.html.twig +++ b/templates/base/layouts/dashboard/column/layout.html.twig @@ -12,6 +12,7 @@ {% set sCellClass = "dashboard" %} {% endif %}
{% for oSubBlock in oUIBlock.GetSubBlocks() %} diff --git a/templates/base/layouts/dashboard/layout.html.twig b/templates/base/layouts/dashboard/layout.html.twig index a1ce91dbc..81c590b00 100644 --- a/templates/base/layouts/dashboard/layout.html.twig +++ b/templates/base/layouts/dashboard/layout.html.twig @@ -2,7 +2,7 @@ {# @license http://opensource.org/licenses/AGPL-3.0 #} {# Dashboard Layout #} {% apply spaceless %} -
+
{% for oSubBlock in oUIBlock.GetSubBlocks() %} {{ render_block(oSubBlock, {aPage: aPage}) }} {% endfor %} diff --git a/templates/base/layouts/dashboard/row/layout.html.twig b/templates/base/layouts/dashboard/row/layout.html.twig index 2c65da4f2..97de95de3 100644 --- a/templates/base/layouts/dashboard/row/layout.html.twig +++ b/templates/base/layouts/dashboard/row/layout.html.twig @@ -2,7 +2,7 @@ {# @license http://opensource.org/licenses/AGPL-3.0 #} {# Dashboard Row #} {% apply spaceless %} -
+
{% for oSubBlock in oUIBlock.GetSubBlocks() %} {{ render_block(oSubBlock, {aPage: aPage}) }} {% endfor %}