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
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>
|
||||
|
||||
<#---------------------------------------------------------------------------->
|
Loading…
Add table
Add a link
Reference in a new issue