Commit cfc69466 authored by Andrew Robert Nicols's avatar Andrew Robert Nicols
Browse files

Add proper accesskeys to main-nav and sub-nav

parent fcd314f8
......@@ -1860,12 +1860,14 @@ function mahara_standard_nav() {
'url' => '',
'title' => get_string('home'),
'weight' => 10,
'accesskey' => 'h',
),
array(
'path' => 'myportfolio',
'url' => 'view/',
'title' => get_string('myportfolio'),
'weight' => 30,
'accesskey' => 'v',
),
array(
'path' => 'myportfolio/views',
......@@ -1885,6 +1887,7 @@ function mahara_standard_nav() {
'url' => 'group/mygroups.php',
'title' => get_string('groups'),
'weight' => 40,
'accesskey' => 'g',
),
array(
'path' => 'groups/mygroups',
......
......@@ -2,18 +2,18 @@
<div id="main-nav">
<ul>{strip}
{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}">{$item.title|escape}</a></li>
<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>
{/foreach}
{if $LOGGEDIN}{if $USER->get('admin') || $USER->is_institutional_admin()}
{if $ADMIN || $INSTITUTIONALADMIN}
<li><a href="{$WWWROOT}">{str tag="returntosite"}</a></li>
<li><a href="{$WWWROOT}" accesskey="h">{str tag="returntosite"}</a></li>
{elseif $USER->get('admin')}
<li><a href="{$WWWROOT}admin/">{str tag="siteadministration"}</a></li>
<li><a href="{$WWWROOT}admin/" accesskey="a">{str tag="siteadministration"}</a></li>
{else}
<li><a href="{$WWWROOT}admin/users/search.php">{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">{str tag="logout"}</a></li>
<li><a href="{$WWWROOT}?logout" accesskey="l">{str tag="logout"}</a></li>
{/if}
{/strip}</ul>
</div>
......@@ -21,7 +21,7 @@
{if $MAINNAVSELECTED.submenu}
<ul>{strip}
{foreach from=$MAINNAVSELECTED.submenu item=item}
<li{if $item.selected} class="selected"{/if}><a href="{if get_config('httpswwwroot') && $item.url=='account/'}{$HTTPSWWWROOT}{else}{$WWWROOT}{/if}{$item.url|escape}">{$item.title|escape}</a></li>
<li{if $item.selected} 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>
{/foreach}
{/strip}</ul>
{/if}
......
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