Commit f00e77ca authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

Merge "Bug 1449770 - allowing mainnav menu items to specify wwwroot"

parents a59d8146 179f3948
...@@ -5,19 +5,19 @@ ...@@ -5,19 +5,19 @@
<ul id="{if $DROPDOWNMENU}dropdown-nav{else}nav{/if}"> <ul id="{if $DROPDOWNMENU}dropdown-nav{else}nav{/if}">
{strip} {strip}
{foreach from=$MAINNAV item=item} {foreach from=$MAINNAV item=item}
<li class="{if $item.path}{$item.path}{else}dashboard{/if}{if $item.selected} selected{/if}{if $DROPDOWNMENU} dropdown-nav-home{/if}"><span><a href="{$WWWROOT}{$item.url}"{if $item.accesskey} accesskey="{$item.accesskey}"{/if} class="{if $item.path}{$item.path}{else}dashboard{/if}">{if $item.accessibletitle && !$DROPDOWNMENU}<span aria-hidden="true" role="presentation">{/if}{$item.title}{if $item.accessibletitle && !$DROPDOWNMENU}</span> <span class="accessible-hidden">({$item.accessibletitle})</span>{/if}{if $DROPDOWNMENU && $item.submenu} <span class="accessible-hidden">({str tag=dropdownmenu})</span>{/if}</a></span> <li class="{if $item.path}{$item.path}{else}dashboard{/if}{if $item.selected} selected{/if}{if $DROPDOWNMENU} dropdown-nav-home{/if}"><span><a href="{if $item.wwwroot}{$item.wwwroot}{else}{$WWWROOT}{/if}{$item.url}"{if $item.accesskey} accesskey="{$item.accesskey}"{/if} class="{if $item.path}{$item.path}{else}dashboard{/if}">{if $item.accessibletitle && !$DROPDOWNMENU}<span aria-hidden="true" role="presentation">{/if}{$item.title}{if $item.accessibletitle && !$DROPDOWNMENU}</span> <span class="accessible-hidden">({$item.accessibletitle})</span>{/if}{if $DROPDOWNMENU && $item.submenu} <span class="accessible-hidden">({str tag=dropdownmenu})</span>{/if}</a></span>
{if $item.submenu} {if $item.submenu}
<ul class="{if $DROPDOWNMENU}dropdown-sub {/if}rd-subnav"> <ul class="{if $DROPDOWNMENU}dropdown-sub {/if}rd-subnav">
{strip} {strip}
{foreach from=$item.submenu item=subitem} {foreach from=$item.submenu item=subitem}
<li class="{if $subitem.selected}selected {/if}{if $subitem.submenu}has-sub {/if}"><span> <li class="{if $subitem.selected}selected {/if}{if $subitem.submenu}has-sub {/if}"><span>
<a href="{$WWWROOT}{$subitem.url}"{if $subitem.accesskey} accesskey="{$subitem.accesskey}"{/if}>{$subitem.title}</a> <a href="{if $item.wwwroot}{$item.wwwroot}{else}{$WWWROOT}{/if}{$subitem.url}"{if $subitem.accesskey} accesskey="{$subitem.accesskey}"{/if}>{$subitem.title}</a>
</span> </span>
{if $subitem.submenu} {if $subitem.submenu}
<ul class="dropdown-tertiary"> <ul class="dropdown-tertiary">
{foreach from=$subitem.submenu item=tertiaryitem} {foreach from=$subitem.submenu item=tertiaryitem}
<li{if $tertiaryitem.selected} class="selected"{/if}><span> <li{if $tertiaryitem.selected} class="selected"{/if}><span>
<a href="{$WWWROOT}{$tertiaryitem.url}"{if $tertiaryitem.accesskey} accesskey="{$tertiaryitem.accesskey}"{/if}>{$tertiaryitem.title}</a> <a href="{if $item.wwwroot}{$item.wwwroot}{else}{$WWWROOT}{/if}{$tertiaryitem.url}"{if $tertiaryitem.accesskey} accesskey="{$tertiaryitem.accesskey}"{/if}>{$tertiaryitem.title}</a>
</span></li> </span></li>
{/foreach} {/foreach}
</ul> </ul>
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
{if $SELECTEDSUBNAV} {if $SELECTEDSUBNAV}
<ul>{strip} <ul>{strip}
{foreach from=$SELECTEDSUBNAV item=item} {foreach from=$SELECTEDSUBNAV item=item}
<li{if $item.selected} class="selected"{/if}><span><a href="{$WWWROOT}{$item.url}"{if $item.accesskey} accesskey="{$item.accesskey}"{/if}>{$item.title}</a></span> <li{if $item.selected} class="selected"{/if}><span><a href="{if $item.wwwroot}{$item.wwwroot}{else}{$WWWROOT}{/if}{$item.url}"{if $item.accesskey} accesskey="{$item.accesskey}"{/if}>{$item.title}</a></span>
{if $item.submenu && $item.selected} {if $item.submenu && $item.selected}
{assign var=tertiarymenu value=$item.submenu} {assign var=tertiarymenu value=$item.submenu}
{/if} {/if}
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
<ul>{strip} <ul>{strip}
{foreach from=$tertiarymenu item=tertiaryitem} {foreach from=$tertiarymenu item=tertiaryitem}
<li{if $tertiaryitem.selected} class="selected"{/if}><span> <li{if $tertiaryitem.selected} class="selected"{/if}><span>
<a href="{$WWWROOT}{$tertiaryitem.url}"{if $tertiaryitem.accesskey} accesskey="{$tertiaryitem.accesskey}"{/if}>{$tertiaryitem.title}</a> <a href="{if $item.wwwroot}{$item.wwwroot}{else}{$WWWROOT}{/if}{$tertiaryitem.url}"{if $tertiaryitem.accesskey} accesskey="{$tertiaryitem.accesskey}"{/if}>{$tertiaryitem.title}</a>
</span></li> </span></li>
{/foreach} {/foreach}
{/strip}</ul> {/strip}</ul>
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<strong><a href="{profile_url($USER)}">{$USER|display_name:null:true}</a>:</strong> <strong><a href="{profile_url($USER)}">{$USER|display_name:null:true}</a>:</strong>
{foreach from=$MAINNAV item=item} {foreach from=$MAINNAV item=item}
{if $item.path} {if $item.path}
<a href="{$WWWROOT}{$item.url}">{$item.title}</a> | <a href="{if $item.wwwroot}{$item.wwwroot}{else}{$WWWROOT}{/if}{$item.url}">{$item.title}</a> |
{/if} {/if}
{/foreach} {/foreach}
{if $USER->get('admin')} {if $USER->get('admin')}
......
...@@ -5,19 +5,19 @@ ...@@ -5,19 +5,19 @@
<ul id="{if $DROPDOWNMENU}dropdown-nav{else}nav{/if}"> <ul id="{if $DROPDOWNMENU}dropdown-nav{else}nav{/if}">
{strip} {strip}
{foreach from=$MAINNAV item=item} {foreach from=$MAINNAV item=item}
<li class="{if $item.path}{$item.path}{else}dashboard{/if}{if $item.selected} selected{/if}{if $DROPDOWNMENU} dropdown-nav-home{/if}"><span><a href="{$WWWROOT}{$item.url}"{if $item.accesskey} accesskey="{$item.accesskey}"{/if} class="{if $item.path}{$item.path}{else}dashboard{/if}">{if $item.accessibletitle && !$DROPDOWNMENU}<span aria-hidden="true" role="presentation">{/if}{$item.title}{if $item.accessibletitle && !$DROPDOWNMENU}</span> <span class="accessible-hidden">({$item.accessibletitle})</span>{/if}{if $DROPDOWNMENU && $item.submenu} <span class="accessible-hidden">({str tag=dropdownmenu})</span>{/if}</a></span> <li class="{if $item.path}{$item.path}{else}dashboard{/if}{if $item.selected} selected{/if}{if $DROPDOWNMENU} dropdown-nav-home{/if}"><span><a href="{if $item.wwwroot}{$item.wwwroot}{else}{$WWWROOT}{/if}{$item.url}"{if $item.accesskey} accesskey="{$item.accesskey}"{/if} class="{if $item.path}{$item.path}{else}dashboard{/if}">{if $item.accessibletitle && !$DROPDOWNMENU}<span aria-hidden="true" role="presentation">{/if}{$item.title}{if $item.accessibletitle && !$DROPDOWNMENU}</span> <span class="accessible-hidden">({$item.accessibletitle})</span>{/if}{if $DROPDOWNMENU && $item.submenu} <span class="accessible-hidden">({str tag=dropdownmenu})</span>{/if}</a></span>
{if $DROPDOWNMENU}{if $item.submenu} {if $DROPDOWNMENU}{if $item.submenu}
<ul class="dropdown-sub"> <ul class="dropdown-sub">
{strip} {strip}
{foreach from=$item.submenu item=subitem} {foreach from=$item.submenu item=subitem}
<li class="{if $subitem.selected}selected {/if}{if $subitem.submenu}has-sub {/if}"><span> <li class="{if $subitem.selected}selected {/if}{if $subitem.submenu}has-sub {/if}"><span>
<a href="{$WWWROOT}{$subitem.url}"{if $subitem.accesskey} accesskey="{$subitem.accesskey}"{/if}>{$subitem.title}</a> <a href="{if $item.wwwroot}{$item.wwwroot}{else}{$WWWROOT}{/if}{$subitem.url}"{if $subitem.accesskey} accesskey="{$subitem.accesskey}"{/if}>{$subitem.title}</a>
</span> </span>
{if $subitem.submenu} {if $subitem.submenu}
<ul class="dropdown-tertiary"> <ul class="dropdown-tertiary">
{foreach from=$subitem.submenu item=tertiaryitem} {foreach from=$subitem.submenu item=tertiaryitem}
<li{if $tertiaryitem.selected} class="selected"{/if}><span> <li{if $tertiaryitem.selected} class="selected"{/if}><span>
<a href="{$WWWROOT}{$tertiaryitem.url}"{if $tertiaryitem.accesskey} accesskey="{$tertiaryitem.accesskey}"{/if}>{$tertiaryitem.title}</a> <a href="{if $item.wwwroot}{$item.wwwroot}{else}{$WWWROOT}{/if}{$tertiaryitem.url}"{if $tertiaryitem.accesskey} accesskey="{$tertiaryitem.accesskey}"{/if}>{$tertiaryitem.title}</a>
</span></li> </span></li>
{/foreach} {/foreach}
</ul> </ul>
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
<ul> <ul>
{strip} {strip}
{foreach from=$SELECTEDSUBNAV item=item} {foreach from=$SELECTEDSUBNAV item=item}
<li{if $item.selected} class="selected"{/if}><span><a href="{$WWWROOT}{$item.url}"{if $item.accesskey} accesskey="{$item.accesskey}"{/if}>{$item.title}</a></span></li> <li{if $item.selected} class="selected"{/if}><span><a href="{if $item.wwwroot}{$item.wwwroot}{else}{$WWWROOT}{/if}{$item.url}"{if $item.accesskey} accesskey="{$item.accesskey}"{/if}>{$item.title}</a></span></li>
{if $item.submenu && $item.selected} {if $item.submenu && $item.selected}
{assign var=tertiarymenu value=$item.submenu} {assign var=tertiarymenu value=$item.submenu}
{/if} {/if}
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
<ul>{strip} <ul>{strip}
{foreach from=$tertiarymenu item=tertiaryitem} {foreach from=$tertiarymenu item=tertiaryitem}
<li{if $tertiaryitem.selected} class="selected"{/if}><span> <li{if $tertiaryitem.selected} class="selected"{/if}><span>
<a href="{$WWWROOT}{$tertiaryitem.url}"{if $tertiaryitem.accesskey} accesskey="{$tertiaryitem.accesskey}"{/if}>{$tertiaryitem.title}</a> <a href="{if $item.wwwroot}{$item.wwwroot}{else}{$WWWROOT}{/if}{$tertiaryitem.url}"{if $tertiaryitem.accesskey} accesskey="{$tertiaryitem.accesskey}"{/if}>{$tertiaryitem.title}</a>
</span></li> </span></li>
{/foreach} {/foreach}
{/strip}</ul> {/strip}</ul>
......
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