2006/unicorn/WebContent/WEB-INF/resources/templates/includes macros.vm,NONE,1.1.2.1 parameters.vm,1.1.2.1,1.1.2.2

Update of /sources/public/2006/unicorn/WebContent/WEB-INF/resources/templates/includes
In directory hutz:/tmp/cvs-serv22297/WebContent/WEB-INF/resources/templates/includes

Modified Files:
      Tag: dev2
	parameters.vm 
Added Files:
      Tag: dev2
	macros.vm 
Log Message:
added a macro library loaded with velocity

Index: parameters.vm
===================================================================
RCS file: /sources/public/2006/unicorn/WebContent/WEB-INF/resources/templates/includes/Attic/parameters.vm,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -d -r1.1.2.1 -r1.1.2.2
--- parameters.vm	19 Aug 2009 18:47:04 -0000	1.1.2.1
+++ parameters.vm	20 Aug 2009 14:38:16 -0000	1.1.2.2
@@ -1,35 +1,3 @@
-#macro(createDropdown $param $multiple)
-#set($defaults = $param.getMapOfDefaultValue())
-<label><span>$param.getLongName("en"):</span> 
-	<select name="$param.Name" class="option_select" #if($multiple) multiple="multiple" size="3" #end>
-#foreach ($value in $param.getMapOfValue())
-		<option value="$value.Name"#if($defaults.containsKey($value.getName())) selected="selected" #end>$value.getLongName("en")</option>
-#end
-	</select>
-</label> 
-#end
-
-#macro(createCheckboxList $param)
-#set($defaults = $param.getMapOfDefaultValue())
-<label><span>$param.getLongName("en"):</span></label> 
-#foreach ($value in $param.getMapOfValue())
-	<label>$value.getLongName("en")
-		<input type="checkbox" name="$param.getName()" value="$value.getName()"#if($defaults.containsKey($value.getName())) checked="checked" #end/>
-	</label>
-#end
-#end
-
-#macro(createParameter $param)
-#set($type = $param.getType())
-#if($type == "CHECKBOXLIST")
-#createCheckboxList($param)
-#elseif($type == "DROPDOWN")
-#createDropdown($param, false)
-#elseif($type == "DROPDOWNLIST")
-#createDropdown($param, true)
-#end
-#end
-
 #set ($simple_parameters = $current_task.getMapOfParameter("simple"))
 #set ($advanced_parameters = $current_task.getMapOfParameter("advanced"))
 

--- NEW FILE: macros.vm ---
#macro(createDropdown $param $multiple)
#set($defaults = $param.getMapOfDefaultValue())
<label><span>$param.getLongName("en"):</span> 
	<select name="$param.Name" class="option_select" #if($multiple) multiple="multiple" size="3" #end>
#foreach ($value in $param.getMapOfValue())
		<option value="$value.Name"#if($defaults.containsKey($value.getName())) selected="selected" #end>$value.getLongName("en")</option>
#end
	</select>
</label> 
#end

#macro(createCheckboxList $param)
#set($defaults = $param.getMapOfDefaultValue())
<label><span>$param.getLongName("en"):</span></label> 
#foreach ($value in $param.getMapOfValue())
	<label>$value.getLongName("en")
		<input type="checkbox" name="$param.getName()" value="$value.getName()"#if($defaults.containsKey($value.getName())) checked="checked" #end/>
	</label>
#end
#end

#macro(createParameter $param)
#set($type = $param.getType())
#if($type == "CHECKBOXLIST")
#createCheckboxList($param)
#elseif($type == "DROPDOWN")
#createDropdown($param, false)
#elseif($type == "DROPDOWNLIST")
#createDropdown($param, true)
#end
#end

Received on Thursday, 20 August 2009 14:38:29 UTC