Renamed Freemarker macro files. Implemented data input portion of main site admin page in Freemarker.
This commit is contained in:
parent
79da8d30ed
commit
fa247f1f79
11 changed files with 102 additions and 27 deletions
|
@ -3,7 +3,7 @@
|
|||
<#-- Template for autocomplete results. -->
|
||||
|
||||
<#--
|
||||
<#import "json.ftl" as json>
|
||||
<#import "lib-json.ftl" as json>
|
||||
<@json.array results />
|
||||
-->
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
<#-- List individual members of a class. -->
|
||||
|
||||
<#import "listMacros.ftl" as l>
|
||||
<#import "lib-list.ftl" as l>
|
||||
|
||||
<div class="contents">
|
||||
<div class="individualList">
|
||||
|
|
|
@ -2,8 +2,10 @@
|
|||
|
||||
<#-- Main template for the login panel -->
|
||||
|
||||
${loginPanel}
|
||||
|
||||
${stylesheets.add("/css/login.css")}
|
||||
${stylesheets.addFromTheme("/css/formedit.css")}
|
||||
${scripts.add("/js/jquery.js", "/js/login/loginUtils.js")}
|
||||
<#if loginPanel??>
|
||||
${loginPanel}
|
||||
|
||||
${stylesheets.add("/css/login.css")}
|
||||
${stylesheets.addFromTheme("/css/formedit.css")}
|
||||
${scripts.add("/js/jquery.js", "/js/login/loginUtils.js")}
|
||||
</#if>
|
|
@ -1,3 +1,21 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#-- Template for Site Administration Data Input -->
|
||||
<#-- Template for Site Administration data input panel -->
|
||||
|
||||
<#import "lib-form.ftl" as form>
|
||||
|
||||
<#if dataInput??>
|
||||
<div class="pageBodyGroup">
|
||||
|
||||
<h3>Data Input</h3>
|
||||
|
||||
<form action="${dataInput.formAction}" method="get">
|
||||
<select id="VClassURI" name="typeOfNew" class="form-item">
|
||||
<@form.optionGroups groups=dataInput.classGroupOptions />
|
||||
</select>
|
||||
<input type="hidden" name="editform" value="newIndividualForm.jsp"/>
|
||||
<input type="submit" class="add-action-button" value="Add individual of this class"/>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</#if>
|
|
@ -7,9 +7,10 @@
|
|||
</div>
|
||||
|
||||
<div id="adminDashboard">
|
||||
|
||||
<#if loginPanel??>
|
||||
<#include "login-main.ftl">
|
||||
</#if>
|
||||
|
||||
<#include "login-main.ftl">
|
||||
<#include "siteAdmin-dataInput.ftl">
|
||||
<#include "siteAdmin-siteConfiguration.ftl">
|
||||
<#include "siteAdmin-ontologyEditor.ftl">
|
||||
<#include "siteAdmin-advancedDataTools.ftl">
|
||||
<#include "siteAdmin-customReports.ftl">
|
||||
</div>
|
39
webapp/web/templates/freemarker/lib/lib-form.ftl
Normal file
39
webapp/web/templates/freemarker/lib/lib-form.ftl
Normal file
|
@ -0,0 +1,39 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#-- Macros for form controls -->
|
||||
|
||||
<#--
|
||||
Macro: optionGroups
|
||||
|
||||
Output a sequence of option groups with options.
|
||||
|
||||
Input is a map of option groups to a list of Option objects.
|
||||
|
||||
Usage: <@optionGroups groups=myOptionGroups />
|
||||
-->
|
||||
<#macro optionGroups groups>
|
||||
<#list groups?keys as group>
|
||||
<optgroup label="${group}">
|
||||
<@options opts=groups[group] />
|
||||
</optgroup>
|
||||
</#list>
|
||||
</#macro>
|
||||
|
||||
<#---------------------------------------------------------------------------->
|
||||
|
||||
<#--
|
||||
Macro: options
|
||||
|
||||
Output a sequence of options.
|
||||
|
||||
Input is a list of Option objects.
|
||||
|
||||
Usage: <@options opts=myOptions />
|
||||
-->
|
||||
<#macro options opts>
|
||||
<#list opts as opt>
|
||||
<option value="${opt.value}"<#if opt.selected> selected="selected"</#if>>${opt.body}</option>
|
||||
</#list>
|
||||
</#macro>
|
||||
|
||||
<#---------------------------------------------------------------------------->
|
|
@ -1,6 +1,6 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#import "listMacros.ftl" as l>
|
||||
<#import "lib-list.ftl" as l>
|
||||
|
||||
<div id="footer">
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#import "listMacros.ftl" as l>
|
||||
<#import "lib-list.ftl" as l>
|
||||
|
||||
<div id="identity">
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue