Commit 40bbf44b authored by Richard Mansfield's avatar Richard Mansfield Committed by Gerrit Code Review
Browse files

Merge changes I3141f2c1,Iaf11a273,I14581f8e

* changes:
  Add a class on each right_nav menu item
  Use string keys in right_nav menu array
  Remove unread message count from profile sideblock (bug #854403)
parents 95290e09 5810e1b7
......@@ -2380,8 +2380,6 @@ function profile_sideblock() {
}
}
}
$data['unreadnotifications'] = call_static_method(generate_class_name('notification', 'internal'), 'unread_count', $USER->get('id'));
$data['unreadnotificationsmessage'] = $data['unreadnotifications'] == 1 ? get_string('unreadmessage') : get_string('unreadmessages');
$invitedgroups = get_records_sql_array('SELECT g.*, gmi.ctime, gmi.reason
FROM {group} g
JOIN {group_member_invite} gmi ON gmi.group = g.id
......
......@@ -2192,7 +2192,7 @@ function right_nav() {
$unread = call_static_method(generate_class_name('notification', 'internal'), 'unread_count', $USER->get('id'));
$menu = array(
array(
'settings' => array(
'path' => 'settings',
'url' => 'account/',
'title' => get_string('settings'),
......@@ -2200,7 +2200,7 @@ function right_nav() {
'alt' => get_string('settings'),
'weight' => 10,
),
array(
'inbox' => array(
'path' => 'inbox',
'url' => 'account/activity',
'icon' => $THEME->get_url('images/email.gif'),
......@@ -2209,13 +2209,13 @@ function right_nav() {
'countclass' => 'unreadmessagecount',
'weight' => 20,
),
array(
'settings/account' => array(
'path' => 'settings/account',
'url' => 'account/',
'title' => get_string('account'),
'weight' => 10,
),
array(
'settings/notifications' => array(
'path' => 'settings/notifications',
'url' => 'account/activity/preferences/',
'title' => get_string('notifications'),
......
......@@ -3,7 +3,7 @@
<ul>{strip}
{if $RIGHTNAV}
{foreach from=$RIGHTNAV item=item}
<li{if $item.selected}{assign var=MAINNAVSELECTED value=$item} class="selected"{/if}><a href="{if $item.wwwroot}{$item.wwwroot}{else}{$WWWROOT}{/if}{$item.url}">{if $item.title}{$item.title}{/if}{if $item.icon}<img src="{$item.icon}" alt="{$item.alt}">{if isset($item.count)}<span class="navcount{if $item.countclass} {$item.countclass}{/if}">{$item.count}</span>{/if}</a> | </li>
<li class="{$item.path}{if $item.selected}{assign var=MAINNAVSELECTED value=$item} selected{/if}"><a href="{if $item.wwwroot}{$item.wwwroot}{else}{$WWWROOT}{/if}{$item.url}">{if $item.title}{$item.title}{/if}{if $item.icon}<img src="{$item.icon}" alt="{$item.alt}">{if isset($item.count)}<span class="navcount{if $item.countclass} {$item.countclass}{/if}">{$item.count}</span>{/if}</a> | </li>
{/foreach}
<li class="btn-logout"><a href="{$WWWROOT}?logout" accesskey="l">{str tag="logout"}</a></li>
{/if}
......
......@@ -8,12 +8,6 @@
{if $sbdata.mnetloggedinfrom} <p>{$sbdata.mnetloggedinfrom|clean_html|safe}</p>
{/if}
<ul>
{if $sbdata.unreadnotifications}
<li id="unreadmessages"><a class="btn-message" href="{$WWWROOT}account/activity/">
<span class="unreadmessagescontainer"><span class="unreadmessagecount">{$sbdata.unreadnotifications}</span>
<span class="unreadmessages">{$sbdata.unreadnotificationsmessage}</span></span>
</a></li>
{/if}
{if $sbdata.invitedgroups}
<li id="invitedgroups"><a href="{$WWWROOT}group/mygroups.php?filter=invite">
<span id="invitedgroupscount">{$sbdata.invitedgroups}</span>
......
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