Commit 282c36e4 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Make settings, inbox, logout tabs less prominent


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent 44eaf065
...@@ -381,6 +381,7 @@ EOF; ...@@ -381,6 +381,7 @@ EOF;
$smarty->assign('LOGGEDIN', $USER->is_logged_in()); $smarty->assign('LOGGEDIN', $USER->is_logged_in());
if ($USER->is_logged_in()) { if ($USER->is_logged_in()) {
$smarty->assign('MAINNAV', main_nav()); $smarty->assign('MAINNAV', main_nav());
$smarty->assign('RIGHTNAV', right_nav());
} }
else { else {
$smarty->assign('sitedefaultlang', get_string('sitedefault', 'admin') . ' (' . $smarty->assign('sitedefaultlang', get_string('sitedefault', 'admin') . ' (' .
...@@ -1906,36 +1907,6 @@ function mahara_standard_nav() { ...@@ -1906,36 +1907,6 @@ function mahara_standard_nav() {
'title' => get_string('findfriends'), 'title' => get_string('findfriends'),
'weight' => 40, 'weight' => 40,
), ),
array(
'path' => 'inbox',
'url' => 'account/activity/',
'title' => get_string('inbox'),
'weight' => 50,
),
array(
'path' => 'settings',
'url' => 'account/',
'title' => get_string('settings'),
'weight' => 60,
),
array(
'path' => 'settings/account',
'url' => 'account/',
'title' => get_string('account'),
'weight' => 10,
),
array(
'path' => 'settings/notifications',
'url' => 'account/activity/preferences/',
'title' => get_string('notifications'),
'weight' => 30,
),
array(
'path' => 'settings/institutions',
'url' => 'account/institutions.php',
'title' => get_string('institutionmembership'),
'weight' => 40,
),
); );
$menu = array_filter($menu, create_function('$a', 'return empty($a["ignore"]);')); $menu = array_filter($menu, create_function('$a', 'return empty($a["ignore"]);'));
...@@ -1978,6 +1949,43 @@ function main_nav() { ...@@ -1978,6 +1949,43 @@ function main_nav() {
return $menu_structure; return $menu_structure;
} }
function right_nav() {
$menu = array(
array(
'path' => 'settings',
'url' => 'account/',
'title' => get_string('settings'),
'weight' => 10,
),
array(
'path' => 'inbox',
'url' => 'account/activity',
'title' => get_string('inbox'),
'weight' => 20,
),
array(
'path' => 'settings/account',
'url' => 'account/',
'title' => get_string('account'),
'weight' => 10,
),
array(
'path' => 'settings/notifications',
'url' => 'account/activity/preferences/',
'title' => get_string('notifications'),
'weight' => 30,
),
array(
'path' => 'settings/institutions',
'url' => 'account/institutions.php',
'title' => get_string('institutionmembership'),
'weight' => 40,
),
);
$menu_structure = find_menu_children($menu, '');
return $menu_structure;
}
/** /**
* Given a menu structure and a path, returns a data structure representing all * Given a menu structure and a path, returns a data structure representing all
* of the child menu items of the path, and removes those items from the menu * of the child menu items of the path, and removes those items from the menu
......
...@@ -384,6 +384,21 @@ input#myfriends_addfriend_add { ...@@ -384,6 +384,21 @@ input#myfriends_addfriend_add {
} }
/**************** TOP NAVIGATION ****************/ /**************** TOP NAVIGATION ****************/
#right-nav ul {
margin: 1.5em 1em 0 0;
}
#right-nav li {
padding: 0 0 0 1em;
}
#right-nav li a {
color: #fff;
}
#right-nav li.selected a {
color: #fff;
font-weight: normal;
text-decoration: underline;
}
#main-nav { #main-nav {
float:right; float:right;
padding: 0; padding: 0;
......
...@@ -371,6 +371,15 @@ input#myfriends_addfriend_add { ...@@ -371,6 +371,15 @@ input#myfriends_addfriend_add {
} }
/**************** TOP NAVIGATION ****************/ /**************** TOP NAVIGATION ****************/
#right-nav ul {
float: right;
text-align: right;
margin: 2.5em 0.5em 0 0;
}
#right-nav li {
padding: 0 0.5em;
}
#main-nav { #main-nav {
} }
#main-nav ul { #main-nav ul {
......
...@@ -409,6 +409,20 @@ input#myfriends_addfriend_add { ...@@ -409,6 +409,20 @@ input#myfriends_addfriend_add {
} }
/**************** TOP NAVIGATION ****************/ /**************** TOP NAVIGATION ****************/
#right-nav ul {
margin: 2em 1em 0 0;
}
#right-nav li {
padding: 0 0 0 1em;
}
#right-nav li a {
color: #fff;
}
#right-nav li.selected a {
color: #fff;
font-weight: normal;
text-decoration: underline;
}
#main-nav { #main-nav {
float:right; float:right;
padding: 0; padding: 0;
......
...@@ -613,6 +613,20 @@ div.rbuttons .small-logo { ...@@ -613,6 +613,20 @@ div.rbuttons .small-logo {
} }
/**************** TOP NAVIGATION ****************/ /**************** TOP NAVIGATION ****************/
#right-nav ul {
float: right;
text-align: right;
}
#right-nav li {
display: inline;
padding: 0 0.5em;
}
#right-nav li.selected a {
color: #333;
text-decoration: none;
font-weight: bold;
}
#main-nav { #main-nav {
clear: left; clear: left;
font-size: 1.2em; font-size: 1.2em;
......
{if $RIGHTNAV}
<div id="right-nav">
<ul>{strip}
{foreach from=$RIGHTNAV item=item}
<li{if $item.selected}{assign var=MAINNAVSELECTED value=$item} class="selected"{/if}><a href="{if $item.url=='account/' && get_config('httpswwwroot')}{$HTTPSWWWROOT}{else}{$WWWROOT}{/if}{$item.url|escape}">{$item.title|escape}</a></li>
{/foreach}
<li><a href="{$WWWROOT}?logout" accesskey="l">{str tag="logout"}</a></li>
{/strip}</ul>
</div>
{/if}
{if $MAINNAV} {if $MAINNAV}
<div id="main-nav"> <div id="main-nav">
<ul>{strip} <ul>{strip}
{foreach from=$MAINNAV item=item} {foreach from=$MAINNAV item=item}
<li{if $item.selected}{assign var=MAINNAVSELECTED value=$item} class="selected"{/if}><a href="{if get_config('httpswwwroot') && $item.url=='account/'}{$HTTPSWWWROOT}{else}{$WWWROOT}{/if}{$item.url|escape}"{if $item.accesskey} accesskey="{$item.accesskey}"{/if}>{$item.title|escape}</a></li> <li{if $item.selected}{assign var=MAINNAVSELECTED value=$item} class="selected"{/if}><a href="{$WWWROOT}{$item.url|escape}"{if $item.accesskey} accesskey="{$item.accesskey}"{/if}>{$item.title|escape}</a></li>
{/foreach} {/foreach}
{if $LOGGEDIN}{if $USER->get('admin') || $USER->is_institutional_admin()}
{if $ADMIN || $INSTITUTIONALADMIN} {if $ADMIN || $INSTITUTIONALADMIN}
<li><a href="{$WWWROOT}" accesskey="h">{str tag="returntosite"}</a></li> <li><a href="{$WWWROOT}" accesskey="h">{str tag="returntosite"}</a></li>
{elseif $USER->get('admin')} {elseif $USER->get('admin')}
<li><a href="{$WWWROOT}admin/" accesskey="a">{str tag="siteadministration"}</a></li> <li><a href="{$WWWROOT}admin/" accesskey="a">{str tag="siteadministration"}</a></li>
{else} {elseif $USER->is_institutional_admin()}
<li><a href="{$WWWROOT}admin/users/search.php" accesskey="a">{str tag="useradministration"}</a></li> <li><a href="{$WWWROOT}admin/users/search.php" accesskey="a">{str tag="useradministration"}</a></li>
{/if}
{/if}
<li><a href="{$WWWROOT}?logout" accesskey="l">{str tag="logout"}</a></li>
{/if} {/if}
{/strip}</ul> {/strip}</ul>
</div> </div>
<div id="sub-nav"> <div id="sub-nav">
{if $MAINNAVSELECTED.submenu} {if $MAINNAVSELECTED.submenu}
<ul>{strip} <ul>{strip}
......
...@@ -396,6 +396,21 @@ input#myfriends_addfriend_add { ...@@ -396,6 +396,21 @@ input#myfriends_addfriend_add {
} }
/**************** TOP NAVIGATION ****************/ /**************** TOP NAVIGATION ****************/
#right-nav ul {
margin: 1.1em 1em 0 0;
}
#right-nav li {
padding: 0 0 0 1em;
}
#right-nav li a {
color: #f7be23;
}
#right-nav li.selected a {
color: #f7be23;
font-weight: normal;
text-decoration: underline;
}
#main-nav { #main-nav {
float:right; float:right;
padding: 0; padding: 0;
......
...@@ -403,6 +403,21 @@ input#myfriends_addfriend_add { ...@@ -403,6 +403,21 @@ input#myfriends_addfriend_add {
} }
/**************** TOP NAVIGATION ****************/ /**************** TOP NAVIGATION ****************/
#right-nav ul {
margin: 1.1em 1em 0 0;
}
#right-nav li {
padding: 0 0 0 1em;
}
#right-nav li a {
color: #e8c1ea;
}
#right-nav li.selected a {
color: #e8c1ea;
font-weight: normal;
text-decoration: underline;
}
#main-nav { #main-nav {
float:right; float:right;
padding: 0; padding: 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment