diff options
author | Philip Häusler <msquare@notrademark.de> | 2014-09-24 15:11:50 +0200 |
---|---|---|
committer | Philip Häusler <msquare@notrademark.de> | 2014-09-24 15:11:50 +0200 |
commit | 07b65412043c89a6a3176f202498f8a603c15dfb (patch) | |
tree | e513a5e183d87e4142dacee4e0c16dbfa05c277b /includes | |
parent | 094715e6eea83c56891716c24b652b35f18337bd (diff) |
move language to submenu
Diffstat (limited to 'includes')
-rw-r--r-- | includes/helper/internationalization_helper.php | 2 | ||||
-rw-r--r-- | includes/sys_menu.php | 5 | ||||
-rw-r--r-- | includes/sys_template.php | 4 |
3 files changed, 7 insertions, 4 deletions
diff --git a/includes/helper/internationalization_helper.php b/includes/helper/internationalization_helper.php index 6a1f172d..836bbc6a 100644 --- a/includes/helper/internationalization_helper.php +++ b/includes/helper/internationalization_helper.php @@ -48,7 +48,7 @@ function make_langselect() { $items = array(); foreach ($locales as $locale => $name) $items[] = toolbar_item_link(htmlspecialchars($URL) . $locale, '', '<img src="pic/flag/' . $locale . '.png" alt="' . $name . '" title="' . $name . '"> ' . $name); - return toolbar_dropdown('', '<img src="pic/flag/' . $_SESSION['locale'] . '.png" alt="' . $locales[$_SESSION['locale']] . '" title="' . $locales[$_SESSION['locale']] . '">', $items); + return $items; } ?>
\ No newline at end of file diff --git a/includes/sys_menu.php b/includes/sys_menu.php index 8b3e7f5e..5ff415fb 100644 --- a/includes/sys_menu.php +++ b/includes/sys_menu.php @@ -21,15 +21,14 @@ function header_toolbar() { if (isset($user)) $toolbar_items[] = toolbar_item_link('#', 'time', User_shift_state_render($user)); - $toolbar_items[] = make_langselect(); - if (! isset($user) && in_array('register', $privileges)) $toolbar_items[] = toolbar_item_link(page_link_to('register'), 'plus', register_title(), $p == 'register'); if (in_array('login', $privileges)) $toolbar_items[] = toolbar_item_link(page_link_to('login'), 'log-in', login_title(), $p == 'login'); - $user_submenu = array(); + $user_submenu = make_langselect(); + $user_submenu[] = toolbar_item_divider(); if (in_array('user_myshifts', $privileges)) $toolbar_items[] = toolbar_item_link(page_link_to('users') . '&action=view', ' icon-icon_angel', $user['Nick'], $p == 'users'); diff --git a/includes/sys_template.php b/includes/sys_template.php index b18abe53..aaa79993 100644 --- a/includes/sys_template.php +++ b/includes/sys_template.php @@ -36,6 +36,10 @@ function toolbar_item_link($href, $glyphicon, $label, $selected = false) { return '<li class="' . ($selected ? 'active' : '') . '"><a href="' . $href . '">' . ($glyphicon != '' ? '<span class="glyphicon glyphicon-' . $glyphicon . '"></span> ' : '') . $label . '</a></li>'; } +function toolbar_item_divider() { + return '<li class="divider"></li>'; +} + function toolbar_dropdown($glyphicon, $label, $submenu) { return '<li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">' . ($glyphicon != '' ? '<span class="glyphicon glyphicon-' . $glyphicon . '"></span> ' : '') . $label . ' <span class="caret"></span></a> |