VIVO-649: allow property groups to contain forward slashes

This commit is contained in:
Tim Worrall 2014-06-09 11:15:55 -04:00
parent 1273fa2f16
commit f8616d4c85
2 changed files with 7 additions and 7 deletions

View file

@ -19,7 +19,7 @@
<#assign groupnameHtmlId = p.createPropertyGroupHtmlId(groupname) > <#assign groupnameHtmlId = p.createPropertyGroupHtmlId(groupname) >
<#-- capitalize will capitalize each word in the name; cap_first only the first. We may need a custom <#-- capitalize will capitalize each word in the name; cap_first only the first. We may need a custom
function to capitalize all except function words. --> function to capitalize all except function words. -->
<li role="listitem"><a href="#${groupnameHtmlId}" title="${i18n().group_name}">${groupname?capitalize}</a></li> <li role="listitem"><a href="#${groupnameHtmlId?replace("/","-")}" title="${i18n().group_name}">${groupname?capitalize}</a></li>
</#if> </#if>
</#if> </#if>
</#list> </#list>
@ -44,7 +44,7 @@
<#if groupName?has_content> <#if groupName?has_content>
<#--the function replaces spaces in the name with underscores, also called for the property group menu--> <#--the function replaces spaces in the name with underscores, also called for the property group menu-->
<#assign groupNameHtmlId = p.createPropertyGroupHtmlId(groupName) > <#assign groupNameHtmlId = p.createPropertyGroupHtmlId(groupName) >
<h2 id="${groupNameHtmlId}">${groupName?capitalize}</h2> <h2 id="${groupNameHtmlId?replace("/","-")}">${groupName?capitalize}</h2>
<#else> <#else>
<h2 id="properties">${i18n().properties_capitalized}</h2> <h2 id="properties">${i18n().properties_capitalized}</h2>
</#if> </#if>

View file

@ -20,11 +20,11 @@
<#assign groupNameHtmlId = "${i18n().properties}" > <#assign groupNameHtmlId = "${i18n().properties}" >
</#if> </#if>
<#if tabCount = 1 > <#if tabCount = 1 >
<li class="selectedGroupTab clickable" groupName="${groupNameHtmlId}">${groupName?capitalize}</li> <li class="selectedGroupTab clickable" groupName="${groupNameHtmlId?replace("/","-")}">${groupName?capitalize}</li>
<li class="groupTabSpacer">&nbsp;</li> <li class="groupTabSpacer">&nbsp;</li>
<#assign tabCount = 2> <#assign tabCount = 2>
<#else> <#else>
<li class="nonSelectedGroupTab clickable" groupName="${groupNameHtmlId}">${groupName?capitalize}</li> <li class="nonSelectedGroupTab clickable" groupName="${groupNameHtmlId?replace("/","-")}">${groupName?capitalize}</li>
<li class="groupTabSpacer">&nbsp;</li> <li class="groupTabSpacer">&nbsp;</li>
</#if> </#if>
</#if> </#if>
@ -39,7 +39,7 @@
<#assign groupName = group.getName(nameForOtherGroup)> <#assign groupName = group.getName(nameForOtherGroup)>
<#assign groupNameHtmlId = p.createPropertyGroupHtmlId(groupName) > <#assign groupNameHtmlId = p.createPropertyGroupHtmlId(groupName) >
<#assign verbose = (verbosePropertySwitch.currentValue)!false> <#assign verbose = (verbosePropertySwitch.currentValue)!false>
<section id="${groupNameHtmlId}" class="property-group" role="region" style="<#if (sectionCount > 1) >display:none<#else>display:block</#if>"> <section id="${groupNameHtmlId?replace("/","-")}" class="property-group" role="region" style="<#if (sectionCount > 1) >display:none<#else>display:block</#if>">
<nav id="scroller" class="scroll-up hidden" role="navigation"> <nav id="scroller" class="scroll-up hidden" role="navigation">
<a href="#branding" title="${i18n().scroll_to_menus}" > <a href="#branding" title="${i18n().scroll_to_menus}" >
<img src="${urls.images}/individual/scroll-up.gif" alt="${i18n().scroll_to_menus}" /> <img src="${urls.images}/individual/scroll-up.gif" alt="${i18n().scroll_to_menus}" />
@ -50,11 +50,11 @@
<#if groupName?has_content> <#if groupName?has_content>
<#--the function replaces spaces in the name with underscores, also called for the property group menu--> <#--the function replaces spaces in the name with underscores, also called for the property group menu-->
<#assign groupNameHtmlId = p.createPropertyGroupHtmlId(groupName) > <#assign groupNameHtmlId = p.createPropertyGroupHtmlId(groupName) >
<h2 id="${groupNameHtmlId}" pgroup="tabs" class="hidden">${groupName?capitalize}</h2> <h2 id="${groupNameHtmlId?replace("/","-")}" pgroup="tabs" class="hidden">${groupName?capitalize}</h2>
<#else> <#else>
<h2 id="properties" pgroup="tabs" class="hidden">${i18n().properties_capitalized}</h2> <h2 id="properties" pgroup="tabs" class="hidden">${i18n().properties_capitalized}</h2>
</#if> </#if>
<div id="${groupNameHtmlId}Group" > <div id="${groupNameHtmlId?replace("/","-")}Group" >
<#-- List the properties in the group --> <#-- List the properties in the group -->
<#include "individual-properties.ftl"> <#include "individual-properties.ftl">
</div> </div>