diff --git a/application/dashboard.class.inc.php b/application/dashboard.class.inc.php index 753144b0f..5bd83fe1a 100644 --- a/application/dashboard.class.inc.php +++ b/application/dashboard.class.inc.php @@ -1021,20 +1021,21 @@ EOF */ protected function RenderSelector(WebPage $oPage, $aAjaxParams = array()) { + if (!$this->HasCustomDashboard()) { + return; + } $sId = $this->GetId(); $sDivId = utils::Sanitize($sId, '', 'element_identifier'); $sExtraParams = json_encode($aAjaxParams); - $sSelectorHtml = '
'; - if ($this->HasCustomDashboard()) { - $bStandardSelected = appUserPreferences::GetPref('display_original_dashboard_'.$sId, false); - $sStandard = Dict::S('UI:Toggle:StandardDashboard'); - $sSelectorHtml .= '
'.$sStandard.'
'; - $sSelectorHtml .= ''; - $sCustom = Dict::S('UI:Toggle:CustomDashboard'); - $sSelectorHtml .= '
'.$sCustom.'
'; - } + $sSwitchToStandard = Dict::S('UI:Toggle:SwitchToStandardDashboard'); + $sSwitchToCustom = Dict::S('UI:Toggle:SwitchToCustomDashboard'); + $bStandardSelected = appUserPreferences::GetPref('display_original_dashboard_'.$sId, false); + + $sSelectorHtml = '
'; + $sSelectorHtml .= ''; $sSelectorHtml .= '
'; + $sFile = addslashes($this->GetDefinitionFile()); $sReloadURL = $this->GetReloadURL(); @@ -1043,19 +1044,26 @@ EOF $oToolbar->AddHtml($sSelectorHtml); $oPage->add_script( - << 'A4 Landscape', 'UI:PrintResolution:LetterPortrait' => 'Letter Portrait', 'UI:PrintResolution:LetterLandscape' => 'Letter Landscape', - 'UI:Toggle:StandardDashboard' => 'Standard', - 'UI:Toggle:CustomDashboard' => 'Custom', + 'UI:Toggle:SwitchToStandardDashboard' => 'Switch to standard dashboard', + 'UI:Toggle:SwitchToCustomDashboard' => 'Switch to custom dashboard', 'UI:ConfigureThisList' => 'Configure This List...', 'UI:ListConfigurationTitle' => 'List Configuration', diff --git a/dictionaries/fr.dictionary.itop.ui.php b/dictionaries/fr.dictionary.itop.ui.php index 7758ddd30..7da18c0f1 100644 --- a/dictionaries/fr.dictionary.itop.ui.php +++ b/dictionaries/fr.dictionary.itop.ui.php @@ -1154,8 +1154,8 @@ Lors de l\'association à un déclencheur, on attribue à chaque action un numé 'UI:PrintResolution:A4Landscape' => 'A4 Paysage', 'UI:PrintResolution:LetterPortrait' => 'US Letter Portrait', 'UI:PrintResolution:LetterLandscape' => 'US Letter Paysage', - 'UI:Toggle:StandardDashboard' => 'Standard', - 'UI:Toggle:CustomDashboard' => 'Modifié', + 'UI:Toggle:SwitchToStandardDashboard' => 'Basculer sur le tableau de bord standard', + 'UI:Toggle:SwitchToCustomDashboard' => 'Basculer sur le tableau de bord modifié', 'UI:ConfigureThisList' => 'Configurer Cette Liste...', 'UI:ListConfigurationTitle' => 'Configuration de la liste',