Commit eae441d8 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Remove username from profile box & use it for settings link, add settings/email icons


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent 9b21cccf
......@@ -1950,7 +1950,7 @@ function main_nav() {
}
function right_nav() {
global $USER;
global $USER, $THEME;
safe_require('notification', 'internal');
$unread = call_static_method(generate_class_name('notification', 'internal'), 'unread_count', $USER->get('id'));
......@@ -1958,14 +1958,18 @@ function right_nav() {
$menu = array(
array(
'path' => 'settings',
'wwwroot' => get_config('httpswwwroot'),
'url' => 'account/',
'title' => get_string('settings'),
'title' => $USER->get('username'),
'icon' => $THEME->get_url('images/settings.png'),
'alt' => get_string('settings'),
'weight' => 10,
),
array(
'path' => 'inbox',
'url' => 'account/activity',
'title' => get_string('inbox'),
'icon' => $THEME->get_url('images/email.gif'),
'alt' => get_string('inbox'),
'count' => $unread,
'weight' => 20,
),
......
......@@ -374,7 +374,7 @@ input#myfriends_addfriend_add {
margin: 2.5em 0.5em 0 0;
}
#right-nav li {
padding: 0 0.5em;
padding: 0 0.25em;
}
#main-nav {
......
......@@ -613,19 +613,15 @@ div.rbuttons .small-logo {
#right-nav ul {
float: right;
text-align: right;
margin-right: 1em;
}
#right-nav li {
display: inline;
padding: 0 0.5em;
padding: 0 0.25em;
}
#right-nav li .navcount {
padding: 0 0 0 0.15em;
}
#right-nav li.selected a {
color: #333;
text-decoration: none;
font-weight: bold;
}
#main-nav {
clear: left;
......@@ -863,10 +859,6 @@ div.sideblock ul {
}
/* Side Profile */
#profile-sideblock-username {
font-size: .9em;
font-weight: normal;
}
#user-profileicon {
float: right;
padding-left: .25em;
......
......@@ -2,7 +2,7 @@
<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}{if $item.count && !$item.selected}<span class="navcount">({$item.count|escape})</span>{/if}</a></li>
<li{if $item.selected}{assign var=MAINNAVSELECTED value=$item} class="selected"{/if}><a href="{if $item.wwwroot}{$item.wwwroot}{else}{$WWWROOT}{/if}{$item.url|escape}">{if $item.title}{$item.title|escape}{/if}{if $item.icon}<img src="{$item.icon}" alt="{$item.alt|escape}">{if isset($item.count) && !$item.selected}<span class="navcount">{$item.count|escape}</span>{/if}</a></li>
{/foreach}
<li><a href="{$WWWROOT}?logout" accesskey="l">{str tag="logout"}</a></li>
{/strip}</ul>
......
<h3><a href="{$WWWROOT}user/view.php?id={$sbdata.id}">{$sbdata.myname|escape}</a> <span class="s" id="profile-sideblock-username">(<a href="{$WWWROOT}user/view.php?id={$sbdata.id}">{$sbdata.username|escape}</a>)</span></h3>
<div id="user-profileicon"><a href="{$WWWROOT}user/view.php?id={$sbdata.id}"><img src="{$WWWROOT}thumb.php?type=profileicon&amp;maxwidth=50&amp;maxheight=50&amp;id={$sbdata.id}&amp;earlyexpiry=1" alt=""></a></div>
<h3><a href="{$WWWROOT}user/view.php?id={$sbdata.id}">{$sbdata.myname|escape}</a></h3>
<div class="sideblock-content">
<div id="user-profileicon"><a href="{$WWWROOT}user/view.php?id={$sbdata.id}"><img src="{$WWWROOT}thumb.php?type=profileicon&amp;maxwidth=50&amp;maxheight=50&amp;id={$sbdata.id}&amp;earlyexpiry=1" alt=""></a></div>
{if $sbdata.mnetloggedinfrom} <p>{$sbdata.mnetloggedinfrom}</p>
{/if}
<ul>
......
......@@ -24,7 +24,7 @@
<a href="{$WWWROOT}user/view.php">{$userdisplayname|escape}</a>&nbsp;:
{foreach from=$MAINNAV item=item}
{if $item.path}
<a href="{if get_config('httpswwwroot') && $item.url=='account/'}{$HTTPSWWWROOT}{else}{$WWWROOT}{/if}{$item.url|escape}">{$item.title|escape}</a>&nbsp;
<a href="{if $item.url=='account/' && get_config('httpswwwroot')}{$HTTPSWWWROOT}{else}{$WWWROOT}{/if}{$item.url|escape}">{$item.title|escape}</a>&nbsp;
{/if}
{/foreach}
{if $USER->get('admin')}
......
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