NIHVIVO-1386 Self-editors don't get SiteAdmin link in top nav. They also don't get revision info link in footer. Implemented with new User template model class. Changed tests for loginName, showFlag1Status in templates to use this object.
This commit is contained in:
parent
130b641081
commit
ca6ab8288e
18 changed files with 225 additions and 77 deletions
|
@ -12,11 +12,13 @@
|
|||
|
||||
<ul id="otherMenu">
|
||||
<@l.firstLastList>
|
||||
<#if loginName??>
|
||||
<#if user.loggedIn>
|
||||
<li>
|
||||
Logged in as <strong>${loginName}</strong> (<a href="${urls.logout}">Log out</a>)
|
||||
Logged in as <strong>${user.loginName}</strong> (<a href="${urls.logout}">Log out</a>)
|
||||
</li>
|
||||
<li><a href="${urls.siteAdmin}">Site Admin</a></li>
|
||||
<#if user.hasSiteAdminAccess>
|
||||
<li><a href="${urls.siteAdmin}">Site Admin</a></li>
|
||||
</#if>
|
||||
<#else>
|
||||
<li><a title="log in to manage this site" href="${urls.login}">Log in</a></li>
|
||||
</#if>
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
<form id="searchForm" action="${urls.search}" >
|
||||
<label for="search">Search </label>
|
||||
|
||||
<#if showFlag1SearchField??>
|
||||
<#if user.showFlag1SearchField>
|
||||
<select id="search-form-modifier" name="flag1" class="form-item" >
|
||||
<option value="nofiltering" selected="selected">entire database (${loginName})</option>
|
||||
<option value="nofiltering" selected="selected">entire database (${user.loginName})</option>
|
||||
<option value="${portalId}">${siteTagline!}</option>
|
||||
</select>
|
||||
<#else>
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
<#-- Template for version/revision information -->
|
||||
|
||||
<#-- Only show version info if user is logged in -->
|
||||
<#if loginName??>
|
||||
<div id="version">
|
||||
<#-- Only show version info if user has access -->
|
||||
<#if user.hasRevisionInfoAccess>
|
||||
<div id="revision">
|
||||
Version <a href="${version.moreInfoUrl}">${version.label}</a>
|
||||
</div>
|
||||
</#if>
|
Loading…
Add table
Add a link
Reference in a new issue