diff --git a/application/itopwebpage.class.inc.php b/application/itopwebpage.class.inc.php index d41c142a0..3049e7639 100644 --- a/application/itopwebpage.class.inc.php +++ b/application/itopwebpage.class.inc.php @@ -547,6 +547,7 @@ EOF if ($this->GetOutputFormat() == 'html') { + $sHtml .= $this->output_dict_entries(true); // before any script so that they can benefit from the translations foreach($this->a_linked_scripts as $s_script) { // Make sure that the URL to the script contains the application's version number @@ -575,7 +576,6 @@ EOF } $sHtml .= "\n"; } - $this->output_dict_entries(); } if (count($this->a_styles)>0) diff --git a/application/webpage.class.inc.php b/application/webpage.class.inc.php index 9998606a3..a2d44f140 100644 --- a/application/webpage.class.inc.php +++ b/application/webpage.class.inc.php @@ -651,6 +651,7 @@ class WebPage implements Page { $sClass = isset($aAction['class']) ? " class=\"{$aAction['class']}\"" : ""; $sOnClick = isset($aAction['onclick']) ? " onclick=\"{$aAction['onclick']}\"" : ""; + $sTarget = isset($aAction['target']) ? " target=\"{$aAction['target']}\"" : ""; if (empty($aAction['url'])) { if ($sPrevUrl != '') // Don't output consecutively two separators... @@ -661,41 +662,51 @@ class WebPage implements Page } else { - $sHtml .= "
  • {$aAction['label']}
  • "; + $sHtml .= "
  • {$aAction['label']}
  • "; $sPrevUrl = $aAction['url']; } } $sHtml .= ""; foreach(array_reverse($aFavoriteActions) as $aAction) { - $sHtml .= "
    {$aAction['label']}
    "; + $sTarget = isset($aAction['target']) ? " target=\"{$aAction['target']}\"" : ""; + $sHtml .= "
    {$aAction['label']}
    "; } return $sHtml; } - protected function output_dict_entries() + protected function output_dict_entries($bReturnOutput = false) { if (count($this->a_dict_entries)>0) { - echo "\n"; + $sHtml .= "\n"; + } + + if ($bReturnOutput) + { + return $sHtml; + } + else + { + echo $sHtml; } } }