This commit is contained in:
rjy7 2010-12-17 15:37:34 +00:00
parent dd2cdb9991
commit 92566579f5
3 changed files with 27 additions and 67 deletions

View file

@ -2,7 +2,6 @@
<#-- Template for individual profile page --> <#-- Template for individual profile page -->
<#import "lib-property.ftl" as p>
<#import "lib-list.ftl" as l> <#import "lib-list.ftl" as l>
<#assign editingClass> <#assign editingClass>
@ -117,15 +116,14 @@
<nav id="property-group-menus" role="navigation"> <nav id="property-group-menus" role="navigation">
<ul role="list"> <ul role="list">
<li role="listitem"><a href="#propertyGroup1">Affiliations</a></li> <#list propertyGroups as group>
<li role="listitem"><a href="#publications">Publications</a></li> <#assign groupname = groupName(group)>
<li role="listitem"><a href="#research">Research</a></li> <#if groupname?has_content>
<li role="listitem"><a href="#teaching">Teaching</a></li> <#-- capitalize will capitalize each word in the name; cap_first only the first. We may need a custom
<li role="listitem"><a href="#service">Service</a></li> function to capitalize all except function words. -->
<li role="listitem"><a href="#background">Background</a></li> <li role="listitem"><a href="#${groupname}">${groupname?capitalize}</a></li>
<li role="listitem"><a href="#contact">Contact</a></li> </#if>
<li role="listitem"><a href="#identity">Identity</a></li> </#list>
<li role="listitem"><a href="#other">Other</a></li>
</ul> </ul>
</nav> </nav>
@ -150,3 +148,19 @@ ${headScripts.add("/js/jquery_plugins/getUrlParam.js",
"/js/toggle.js")} "/js/toggle.js")}
${scripts.add("/js/imageUpload/imageUploadUtils.js")} ${scripts.add("/js/imageUpload/imageUploadUtils.js")}
<#-- RY TEMPORARY Replace with Java method on group - pass "other" as a parameter -->
<#function groupName group>
<#if group.name??>
<#if group.name?has_content>
<#assign name = group.name>
<#else>
<#-- This is the group for properties not assigned to any group. It has an empty name. -->
<#assign name = "other">
</#if>
<#else>
<#-- If there are no groups, a dummy group has been created with a null (as opposed to empty) name. -->
<#assign name = "">
</#if>
<#return name>
</#function>

View file

@ -4,24 +4,13 @@
<#list propertyGroups as group> <#list propertyGroups as group>
<#-- Get the group name --> <#assign groupname = groupName(group)>
<#if group.name??>
<#if group.name?has_content>
<#assign groupName = group.name>
<#else>
<#-- This is the group for properties not assigned to any group. It has an empty name. -->
<#assign groupName = "other">
</#if>
<#else>
<#-- If there are no groups, a dummy group has been created with a null (as opposed to empty) name. -->
<#assign groupName = "">
</#if>
<section class="property-group" role="region"> <section class="property-group" role="region">
<#-- Display the group heading --> <#-- Display the group heading -->
<#if groupName?has_content> <#if groupname?has_content>
<h2><a name="${groupName}"></a>${groupName}</h2> <h2><a name="${groupname}"></a>${groupname}</h2>
</#if> </#if>
<#-- List the properties in the group --> <#-- List the properties in the group -->

View file

@ -1,43 +0,0 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#-- Macros for display of individual properties -->
<#--
Macro: dataPropWrapper
Wrap a dataproperty in the appropriate divs
Usage:
<@dataPropWrapper id="myId" editStatus=true>
<#nested>
</@dataPropWrapper>
-->
<#macro dataPropWrapper id editStatus=false>
<div class="datatypePropertyValue" id="${id}">
<div class="statementWrap">
<#nested>
</div>
</div>
</#macro>
<#---------------------------------------------------------------------------->
<#--
Macro: dataPropsWrapper
Wrap a dataproperty in the appropriate divs
Usage:
<@dataPropsWrapper id="myId" editStatus=true>
<#nested>
</@dataPropsWrapper>
-->
<#macro dataPropsWrapper id editStatus=false>
<div class="datatypeProperties">
<@dataPropWrapper id=id editStatus=editStatus>
<#nested>
</@dataPropWrapper>
</div>
</#macro>