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
|
@ -2,8 +2,6 @@
|
|||
|
||||
<#-- Template for property listing on individual profile page -->
|
||||
|
||||
<#if individual.propertyGroups??>
|
||||
|
||||
<#elseif individual.properties??>
|
||||
|
||||
</#if>
|
||||
<#--
|
||||
<#assign properties = individual.propertyList>
|
||||
-->
|
|
@ -71,9 +71,9 @@
|
|||
</ul>
|
||||
</div>
|
||||
</#if>
|
||||
|
||||
|
||||
<#include "individual-properties.ftl">
|
||||
|
||||
|
||||
<#-- Keywords -->
|
||||
<#if individual.keywords?has_content>
|
||||
<p id="keywords">Keywords: ${individual.keywordString}</p>
|
||||
|
|
|
@ -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>
|
|
@ -3,9 +3,9 @@
|
|||
<#-- Login widget -->
|
||||
|
||||
<#macro assets>
|
||||
<#-- RY This test should be replaced by controller logic which doesn't display any assets if the user is logged in.
|
||||
See NIHVIVO-1357. This test does nothing, since loginName has not been put into the data model.
|
||||
<#if ! loginName?has_content> -->
|
||||
<#-- RY This test should be replaced by widget controller logic which doesn't display any assets if the user is logged in.
|
||||
See NIHVIVO-1357. This test does nothing, since user has not been put into the data model.
|
||||
<#if ! user.loggedIn> -->
|
||||
${stylesheets.add("/css/login.css")}
|
||||
${scripts.add("/js/jquery.js", "/js/login/loginUtils.js")}
|
||||
<#-- ${headScripts.add("")} -->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue