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 @@
<ul id="{if $DROPDOWNMENU}dropdown-nav{else}nav{/if}">
{strip}
{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}
<ul class="{if $DROPDOWNMENU}dropdown-sub {/if}rd-subnav">
{strip}
{foreach from=$item.submenu item=subitem}
<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>
{if $subitem.submenu}
<ul class="dropdown-tertiary">
{foreach from=$subitem.submenu item=tertiaryitem}
<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>
{/foreach}
</ul>
......@@ -49,7 +49,7 @@
{if $SELECTEDSUBNAV}
<ul>{strip}
{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}
{assign var=tertiarymenu value=$item.submenu}
{/if}
......@@ -64,7 +64,7 @@
<ul>{strip}
{foreach from=$tertiarymenu item=tertiaryitem}
<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>
{/foreach}
{/strip}</ul>
......
......@@ -25,7 +25,7 @@
<strong><a href="{profile_url($USER)}">{$USER|display_name:null:true}</a>:</strong>
{foreach from=$MAINNAV item=item}
{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}
{/foreach}
{if $USER->get('admin')}
......
......@@ -5,19 +5,19 @@
<ul id="{if $DROPDOWNMENU}dropdown-nav{else}nav{/if}">
{strip}
{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}
<ul class="dropdown-sub">
{strip}
{foreach from=$item.submenu item=subitem}
<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>
{if $subitem.submenu}
<ul class="dropdown-tertiary">
{foreach from=$subitem.submenu item=tertiaryitem}
<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>
{/foreach}
</ul>
......@@ -51,7 +51,7 @@
<ul>
{strip}
{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}
{assign var=tertiarymenu value=$item.submenu}
{/if}
......@@ -65,7 +65,7 @@
<ul>{strip}
{foreach from=$tertiarymenu item=tertiaryitem}
<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>
{/foreach}
{/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