[VIVO-1245] Cleanup of NewIndividualFormGenerator, simplify configuration of generators and improve means of configuring in Freemarker
This commit is contained in:
parent
5cbcab5bcc
commit
fbeed01a94
10 changed files with 34 additions and 40 deletions
|
@ -1,5 +1,7 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#import "lib-generator-classes.ftl" as generators />
|
||||
|
||||
<div>
|
||||
|
||||
<#if pages?has_content >
|
||||
|
@ -25,7 +27,7 @@
|
|||
<form id="addIndividualClass" action="${urls.base}/editRequestDispatch" method="get">
|
||||
<input type="hidden" name="typeOfNew" value="http://vitro.mannlib.cornell.edu/ontologies/display/1.1#Page">
|
||||
<input type="hidden" name="switchToDisplayModel" value="1">
|
||||
<input type="hidden" name="editForm" value="edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.NewIndividualFormGenerator" role="input">
|
||||
<input type="hidden" name="editForm" value="${generators.NewIndividualFormGenerator}" role="input">
|
||||
<input type="submit" id="submit" value="${i18n().add_page}" role="button">
|
||||
</form>
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#import "lib-generator-classes.ftl" as generators />
|
||||
|
||||
<div>
|
||||
|
||||
<#if pages?has_content >
|
||||
|
@ -25,7 +27,7 @@
|
|||
<form id="addIndividualClass" action="${urls.base}/editRequestDispatch" method="get">
|
||||
<input type="hidden" name="typeOfNew" value="http://vitro.mannlib.cornell.edu/ontologies/display/1.1#Page">
|
||||
<input type="hidden" name="switchToDisplayModel" value="1">
|
||||
<input type="hidden" name="editForm" value="edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.NewIndividualFormGenerator" role="input">
|
||||
<input type="hidden" name="editForm" value="${generators.NewIndividualFormGenerator}" role="input">
|
||||
<input type="submit" id="submit" value="${i18n().Add_page}" role="button">
|
||||
</form>
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
<#-- Template for Site Administration data input panel -->
|
||||
|
||||
<#import "lib-form.ftl" as form>
|
||||
<#import "lib-generator-classes.ftl" as generators />
|
||||
|
||||
<#if dataInput?has_content>
|
||||
<section class="pageBodyGroup" role="region">
|
||||
|
@ -12,7 +13,7 @@
|
|||
<select id="VClassURI" name="typeOfNew" class="form-item long-options" role="select">
|
||||
<@form.optionGroups groups=dataInput.groupedClassOptions />
|
||||
</select>
|
||||
<input type="hidden" name="editForm" value="edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.NewIndividualFormGenerator" role="input" />
|
||||
<input type="hidden" name="editForm" value="${generators.NewIndividualFormGenerator}" role="input" />
|
||||
<input type="submit" id="submit" value="${i18n().add_individual_of_class}" role="button" />
|
||||
</form>
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#assign ManageLabelsGenerator = "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.ManageLabelsGenerator" />
|
||||
<#assign NewIndividualFormGenerator = "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.NewIndividualFormGenerator" />
|
|
@ -1,5 +0,0 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#function class_ManageLabelsGenerator>
|
||||
<#return "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.VIVOManageLabelsGenerator" />
|
||||
</#function>
|
|
@ -4,7 +4,7 @@
|
|||
Macros and functions for working with properties and property lists
|
||||
------------------------------------------------------------------------------>
|
||||
|
||||
<#include "lib-properties-classes.ftl" />
|
||||
<#import "lib-generator-classes.ftl" as generators />
|
||||
|
||||
<#-- Return true iff there are statements for this property -->
|
||||
<#function hasStatements propertyGroups propertyName>
|
||||
|
@ -304,7 +304,7 @@ name will be used as the label. -->
|
|||
<#if editable>
|
||||
<#assign imageAlt = "${i18n().manage}" />
|
||||
<#assign linkTitle = "${i18n().manage_list_of_labels}">
|
||||
<#assign labelLink= "${urls.base}/editRequestDispatch?subjectUri=${individualUri}&editForm=${class_ManageLabelsGenerator}&predicateUri=${labelPropertyUri}${extraParameters}">
|
||||
<#assign labelLink= "${urls.base}/editRequestDispatch?subjectUri=${individualUri}&editForm=${generators.ManageLabelsGenerator}&predicateUri=${labelPropertyUri}${extraParameters}">
|
||||
<#else>
|
||||
<#assign linkTitle = "${i18n().view_list_of_labels}">
|
||||
<#assign imageAlt = "${i18n().view}" />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue