Skip to content

Commit 592e02b

Browse files
trasherorthagh
authored andcommitted
Use same HTML for helpHeader and header; add language switch; refs glpi-project#1480 (glpi-project#1562)
1 parent 9474af6 commit 592e02b

File tree

1 file changed

+18
-12
lines changed

1 file changed

+18
-12
lines changed

inc/html.class.php

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1433,7 +1433,7 @@ static function header($title, $url='', $sector="none", $item="none", $option=""
14331433
echo "<li id='preferences_link'><a href='".$CFG_GLPI["root_doc"]."/front/preference.php' title=\"".
14341434
__s('My settings')."\">";
14351435
echo "<span id='preferences_icon' title=\"".__s('My settings').
1436-
"\" class='button-icon'></span>";
1436+
"\" class='button-icon'></span>";
14371437

14381438
// check user id : header used for display messages when session logout
14391439
if (Session::getLoginUserID()) {
@@ -1941,7 +1941,7 @@ static function helpHeader($title, $url='') {
19411941
echo "<li id='preferences_link'><a href='".$CFG_GLPI["root_doc"]."/front/preference.php' title=\"".
19421942
__s('My settings')."\">";
19431943
echo "<span id='preferences_icon' title=\"".__s('My settings').
1944-
"\" class='button-icon' /></span>";
1944+
"\" class='button-icon'></span>";
19451945

19461946
// check user id : header used for display messages when session logout
19471947
if (Session::getLoginUserID()) {
@@ -1952,23 +1952,29 @@ static function helpHeader($title, $url='') {
19521952
}
19531953
echo "</a></li>";
19541954

1955-
echo "<li>";
1955+
/// Bookmark load
1956+
echo "<li id='bookmark_link'>";
19561957
Ajax::createIframeModalWindow('loadbookmark',
19571958
$CFG_GLPI["root_doc"]."/front/bookmark.php?action=load",
19581959
array('title' => __('Load a bookmark'),
19591960
'reloadonclose' => true));
19601961
echo "<a href='#' onClick=\"".Html::jsGetElementbyID('loadbookmark').".dialog('open'); return false;\">";
1961-
echo "<img src='".$CFG_GLPI["root_doc"]."/pics/bookmark.png' title=\"".__s('Load a bookmark').
1962-
"\" class='button-icon'>";
1962+
echo "<span id='bookmark_icon' title=\"".__s('Load a bookmark').
1963+
"\" class='button-icon'></span>";
1964+
echo "</a></li>";
1965+
1966+
echo "<li id='help_link'><a href='".
1967+
(empty($CFG_GLPI["helpdesk_doc_url"])
1968+
? "http://glpi-project.org/help-helpdesk"
1969+
: $CFG_GLPI["helpdesk_doc_url"])."' target='_blank' title=\"".__s('Help')."\">".
1970+
"<span id='help_icon' title=\"".__s('Help').
1971+
"\" class='button-icon'></span>";
19631972
echo "</a></li>";
19641973

1965-
echo "<li id='help_link'>".
1966-
"<a href='".(empty($CFG_GLPI["helpdesk_doc_url"])
1967-
? "http://glpi-project.org/help-helpdesk"
1968-
: $CFG_GLPI["helpdesk_doc_url"])."' target='_blank' title=\"".__s('Help')."\">".
1969-
"<img src='".$CFG_GLPI["root_doc"]."/pics/help.png' title=\"".__s('Help').
1970-
"\" class='button-icon'>";
1971-
"</a></li>";
1974+
echo "<li id='language_link'><a href='".$CFG_GLPI["root_doc"].
1975+
"/front/preference.php?forcetab=User\$1' title=\"".
1976+
addslashes(Dropdown::getLanguageName($_SESSION['glpilanguage']))."\">".
1977+
Dropdown::getLanguageName($_SESSION['glpilanguage'])."</a></li>";
19721978

19731979
echo "</ul>";
19741980
echo "</div>"; // c_preference

0 commit comments

Comments
 (0)