← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5693: (mobile) added code to data entry names

 

------------------------------------------------------------
revno: 5693
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2012-01-11 12:41:28 +0530
message:
  (mobile) added code to data entry names
modified:
  dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/dataEntrySection.vm


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/dataEntrySection.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/dataEntrySection.vm	2011-12-27 12:51:59 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/dataEntrySection.vm	2012-01-11 07:11:28 +0000
@@ -45,6 +45,12 @@
 				#set( $dataElementName = $dataElement.name )
 			#end
 
+            #if( $dataElement.code )
+                #set( $name = "[$dataElement.code] - $dataElementName")
+            #else
+                #set( $name = "$dataElementName" )
+            #end
+
             #set( $optionCombos = $formUtils.sortedCategoryOptionCombos( $dataElement.categoryCombo.optionCombos ) )
 
 			#foreach( $optionCombo in $optionCombos )
@@ -52,7 +58,7 @@
                 #if( !$greyedFields.get( "$dataElement.id:$optionCombo.id" ) )
 				#set( $key = "DE${dataElement.id}OC${optionCombo.id}" )
 
-				<label>$encoder.htmlEncode( $dataElementName ) #if( $optionCombo.name!="(default)")$encoder.htmlEncode( $optionCombo.name )#end</label>
+				<label>$encoder.htmlEncode( $name ) #if( $optionCombo.name!="(default)")$encoder.htmlEncode( $optionCombo.name )#end</label>
 
 				#if( $validationViolations.get( $key ) )
 					#set( $validationViolation = $validationViolations.get( $key ) )