=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/macros.vm' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/macros.vm 2011-10-03 09:23:01 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/macros.vm 2012-04-04 10:51:40 +0000 @@ -1,14 +1,3 @@ - -#* -Displays a table which lists a set of objects and it's common operations: Filter, -add, update, translate, remove and show details. The macro produces code against -some specific conventions for the scripts and actions to call. Call it this way: - -#objectList( [name of object, e.g. DataElement], [list of such objects, e.g. $dataElements] ) - -@param objectName The litteral name of the type of object to display, e.g. DataElement -@param objects A Velocity list of the objects to be formatted, typically prepared by an action. -*# #macro( objectList $objectName $objects ) @@ -44,20 +33,10 @@
#end -#* -Supportive method for displaying rows with alternating colors in a table. - -@param mark boolean alternating the color. -*# #macro( alternate $mark ) #if ( $mark ) class="listAlternateRow"#else class="listRow"#end #end -#* -Formats a boolean into a readable value - -@param bool the boolean to format. -*# #macro( formatBool $bool ) #if ( $bool ) $i18n.getString( "yes" ) @@ -128,27 +107,12 @@ #end - - - -#*************************************************************************************************************# -#* Helpers for building attribute forms. Note that these will have dynamic validation rules applied to them. *# - #macro( trHeader $text ) $text #end -#**************************************************** - Required args: - id - text - mandatory - Optional args: - name Will use id if omitted. - value -*****************************************************# #macro( trTextInput $args ) #if( "$!args.name" == "" ) #set( $name = $!args.id ) @@ -164,15 +128,6 @@ #end -#**************************************************** - Required args: - id - text - mandatory - Optional args: - name Will use id if omitted. - value -*****************************************************# #macro( trBooleanSelectInput $args ) #if( "$!args.name" == "" ) #set( $name = $!args.id ) @@ -192,15 +147,6 @@ #end -#**************************************************** - Required args: - id - text - mandatory - Optional args: - name Will use id if omitted. - value -*****************************************************# #macro( trDateInput $args ) #if( "$!args.name" == "" ) #set( $name = $!args.id ) @@ -222,15 +168,6 @@ #end -#**************************************************** - Required args: - id - text - mandatory - Optional args: - name Will use id if omitted. - value -*****************************************************# #macro( trNumberInput $args ) #if( "$!args.name" == "" ) #set( $name = $!args.id ) @@ -246,15 +183,6 @@ #end -#**************************************************** - Required args: - id - text - mandatory - Optional args: - name Will use id if omitted. - value -*****************************************************# #macro( trIntegerInput $args ) #if( "$!args.name" == "" ) #set( $name = $!args.id ) @@ -270,15 +198,6 @@ #end -#**************************************************** - Required args: - id - text - mandatory - Optional args: - name Will use id if omitted. - value -*****************************************************# #macro( trPositiveIntegerInput $args ) #if( "$!args.name" == "" ) #set( $name = $!args.id ) @@ -294,15 +213,6 @@ #end -#**************************************************** - Required args: - id - text - mandatory - Optional args: - name Will use id if omitted. - value -*****************************************************# #macro( trNegativeIntegerInput $args ) #if( "$!args.name" == "" ) #set( $name = $!args.id ) @@ -318,16 +228,6 @@ #end -#**************************************************** - Required args: - id - text - mandatory - choices Array of choices. - Optional args: - name Will use id if omitted. - value -*****************************************************# #macro( trMultipleChoiceInput $args ) #if( "$!args.name" == "" ) #set( $name = $!args.id ) @@ -378,12 +278,6 @@ }); #end -#**************************************************** - Required args: - attributes - Optional args: - attributeValues -*****************************************************# #macro( tblDynamicAttributes $args ) #if( $args.attributes.size() > 0 ) === added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/macrosdoc.vm' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/macrosdoc.vm 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/macrosdoc.vm 2012-04-04 10:51:40 +0000 @@ -0,0 +1,118 @@ + +## Documentation for macros.vm - not available on web + +#* +Displays a table which lists a set of objects and it's common operations: Filter, +add, update, translate, remove and show details. The macro produces code against +some specific conventions for the scripts and actions to call. Call it this way: + +#objectList( [name of object, e.g. DataElement], [list of such objects, e.g. $dataElements] ) + +@param objectName The litteral name of the type of object to display, e.g. DataElement +@param objects A Velocity list of the objects to be formatted, typically prepared by an action. +*# +#macro( objectList $objectName $objects ) #end + +#* +Supportive method for displaying rows with alternating colors in a table. + +@param mark boolean alternating the color. +*# +#macro( alternate $mark ) #end + +#**************************************************** + Required args: + id + text + mandatory + Optional args: + name Will use id if omitted. + value +*****************************************************# +#macro( trTextInput $args ) #end + +#**************************************************** + Required args: + id + text + mandatory + Optional args: + name Will use id if omitted. + value +*****************************************************# +#macro( trBooleanSelectInput $args ) #end + +#**************************************************** + Required args: + id + text + mandatory + Optional args: + name Will use id if omitted. + value +*****************************************************# +#macro( trDateInput $args ) #end + +#**************************************************** + Required args: + id + text + mandatory + Optional args: + name Will use id if omitted. + value +*****************************************************# +#macro( trNumberInput $args ) #end + +#**************************************************** + Required args: + id + text + mandatory + Optional args: + name Will use id if omitted. + value +*****************************************************# +#macro( trIntegerInput $args ) #end + +#**************************************************** + Required args: + id + text + mandatory + Optional args: + name Will use id if omitted. + value +*****************************************************# +#macro( trPositiveIntegerInput $args ) #end + +#**************************************************** + Required args: + id + text + mandatory + Optional args: + name Will use id if omitted. + value +*****************************************************# +#macro( trNegativeIntegerInput $args ) #end + +#**************************************************** + Required args: + id + text + mandatory + choices Array of choices. + Optional args: + name Will use id if omitted. + value +*****************************************************# +#macro( trMultipleChoiceInput $args ) #end + +#**************************************************** + Required args: + attributes + Optional args: + attributeValues +*****************************************************# +#macro( tblDynamicAttributes $args ) #end \ No newline at end of file === modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm 2012-04-01 19:29:11 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm 2012-04-04 10:51:40 +0000 @@ -5,38 +5,35 @@ - - - #foreach ( $style in $stylesheets ) - #end - + #end + + var dateFormat = 'yy-mm-dd'; + var maintenanceModulesNo = ${maintenanceModules.size()}; + var serviceModulesNo = ${serviceModules.size()}; + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + @@ -75,39 +72,37 @@