updates for multiple language labels and concept semantic types
This commit is contained in:
parent
b8e114c4e8
commit
fc9ac52786
11 changed files with 72 additions and 152 deletions
|
@ -2,6 +2,9 @@
|
|||
<#if !labelCount??>
|
||||
<#assign labelCount = 0 >
|
||||
</#if>
|
||||
<#if !localesCount??>
|
||||
<#assign localesCount = 1>
|
||||
</#if>
|
||||
|
||||
<#-- Default individual profile page template -->
|
||||
<#--@dumpAll /-->
|
||||
|
@ -32,7 +35,7 @@
|
|||
<#else>
|
||||
<h1 class="fn">
|
||||
<#-- Label -->
|
||||
<@p.label individual editable labelCount />
|
||||
<@p.label individual editable labelCount localesCount/>
|
||||
|
||||
<#-- Most-specific types -->
|
||||
<@p.mostSpecificTypes individual />
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#include "manageLabelsForIndividualTerms.ftl" >
|
||||
<#-- Custom form for managing labels for individuals -->
|
||||
<#import "manageLabelsForIndividualMacros.ftl" as m >
|
||||
<#assign requiredHint = "<span class='requiredHint'> *</span>" />
|
||||
|
@ -13,6 +13,10 @@
|
|||
<#if editConfiguration.pageData.editable?has_content>
|
||||
<#assign editable = editConfiguration.pageData.editable />
|
||||
</#if>
|
||||
<#assign displayRemoveLink = true/>
|
||||
<#if editConfiguration.pageData.displayRemoveLink?has_content>
|
||||
<#assign displayRemoveLink = editConfiguration.pageData.displayRemoveLink/>
|
||||
</#if>
|
||||
<#if editSubmission?has_content && editSubmission.submissionExists = true && editSubmission.validationErrors?has_content>
|
||||
<#assign submissionErrors = editSubmission.validationErrors/>
|
||||
<#assign submissionErrorsExist = "true" />
|
||||
|
@ -60,7 +64,7 @@
|
|||
<#include "manageLabelsForIndividualSubmissionErrors.ftl">
|
||||
<div id="showAddForm">
|
||||
<input type="submit" value="${i18n().add_label}" id="showAddFormButton" name="showAddFormButton"> ${i18n().or}
|
||||
<a class="cancel" href="${cancelUrl}&url=/individual" title="${i18n().return_to_profile}">${i18n().return_to_profile}</a>
|
||||
<a class="cancel" href="${cancelUrl}&url=/individual" title="${returnText}">${returnText}</a>
|
||||
</div>
|
||||
|
||||
<#include "manageLabelsForIndividualAddForm.ftl" >
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
<#--LabelsSorted is a hash keyed by language name where the value is a list of LabelInformation class objects-->
|
||||
<#macro displayExistingLabelsForLanguage lang labelsSorted editable editGenerator>
|
||||
<#macro displayExistingLabelsForLanguage lang labelsSorted editable editGenerator displayRemoveLink=true>
|
||||
<#--get label information for this language-->
|
||||
<#assign labelList = labelsSorted[lang] />
|
||||
<#--Reset for every language-->
|
||||
<#assign labelSeq = []/>
|
||||
|
||||
<#list labelList as labelObject>
|
||||
<#assign labelLiteral = labelObject.labelLiteral />
|
||||
<#assign labelStringValue = labelObject.labelStringValue />
|
||||
|
@ -25,19 +26,16 @@
|
|||
<#assign labelStr = label >
|
||||
<#assign tagOrTypeStr = "" >
|
||||
</#if>
|
||||
<li>${labelStr} <#if labelSeq?seq_contains(labelStr)> (duplicate value) </#if>
|
||||
<#if editable && labelEditLink?has_content> <a href="${labelEditLink}&${editGenerator}">Edit</a>
|
||||
<a href="${urls.base}/edit/primitiveRdfEdit" languageName="${labelLang}" languageCode="${languageCode}"
|
||||
labelValue="${labelStr}" tagOrType="${tagOrTypeStr!}" class="remove" title="${i18n().remove_capitalized}">${i18n().remove_capitalized}</a>
|
||||
</#if>
|
||||
<@displayLabel labelSeq labelStr languageCode labelEditLink tagOrTypeStr editGenerator editable displayRemoveLink/>
|
||||
|
||||
</li>
|
||||
<#assign labelSeq = labelSeq + [labelStr]>
|
||||
<#assign labelSeq = labelSeq + [labelStr]>
|
||||
</#list>
|
||||
</#macro>
|
||||
|
||||
<#--ignore 'untyped' and display everything-->
|
||||
<#macro displayExistingTypedLabels langList labelsSorted editable editGenerator>
|
||||
<#macro displayExistingTypedLabels langList labelsSorted editable editGenerator displayRemoveLink=true>
|
||||
|
||||
|
||||
<#list langList as lang>
|
||||
<#if lang != "untyped">
|
||||
<h3 languageName="${lang}">${lang}</h3>
|
||||
|
@ -65,15 +63,21 @@
|
|||
<#assign labelStr = label >
|
||||
<#assign tagOrTypeStr = "" >
|
||||
</#if>
|
||||
<li>${labelStr} <#if labelSeq?seq_contains(labelStr)> (duplicate value) </#if>
|
||||
<#if editable && labelEditLink?has_content> <a href="${labelEditLink}&${editGenerator}">Edit</a>
|
||||
<a href="${urls.base}/edit/primitiveRdfEdit" languageName="${labelLang}" languageCode="${languageCode}"
|
||||
labelValue="${labelStr}" tagOrType="${tagOrTypeStr!}" class="remove" title="${i18n().remove_capitalized}">${i18n().remove_capitalized}</a>
|
||||
</#if>
|
||||
|
||||
</li>
|
||||
<@displayLabel labelSeq labelStr languageCode labelEditLink tagOrTypeStr editGenerator editable displayRemoveLink/>
|
||||
<#assign labelSeq = labelSeq + [labelStr]>
|
||||
</#list>
|
||||
</#if>
|
||||
</#list>
|
||||
</#macro>
|
||||
|
||||
<#macro displayLabel labelSeq labelStr languageCode labelEditLink tagOrTypeStr editGenerator editable displayRemoveLink>
|
||||
<li>${labelStr} <#if labelSeq?seq_contains(labelStr)> (duplicate value) </#if>
|
||||
<#if editable> <#if labelEditLink?has_content> <a href="${labelEditLink}&${editGenerator}">Edit</a></#if>
|
||||
<#if displayRemoveLink = true>
|
||||
<a href="${urls.base}/edit/primitiveRdfEdit" languageName="${labelLang}" languageCode="${languageCode}"
|
||||
labelValue="${labelStr}" tagOrType="${tagOrTypeStr!}" class="remove" title="${i18n().remove_capitalized}">${i18n().remove_capitalized}</a>
|
||||
</#if>
|
||||
</#if>
|
||||
|
||||
</li>
|
||||
</#macro>
|
|
@ -0,0 +1,4 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#--Some values for labels etc. may be different between vitro and other systems -->
|
||||
<#assign returnText = "${i18n().return_to_individual}" />
|
Loading…
Add table
Add a link
Reference in a new issue