← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11376: minor change

 

------------------------------------------------------------
revno: 11376
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2013-07-10 14:30:23 +0700
message:
  minor change
modified:
  dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/multiOrgSectionForm.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-dataentry/src/main/webapp/dhis-web-dataentry/multiOrgSectionForm.vm'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/multiOrgSectionForm.vm	2013-07-09 04:48:34 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/multiOrgSectionForm.vm	2013-07-10 07:30:23 +0000
@@ -125,10 +125,18 @@
     #set( $colRepeat = $catColRepeat.get( $categoryComboId ) )
     #set( $isDefaultCategory = $categories.get( 0 ).name == "default" )
 
+    #if( $isDefaultCategory )
+        #set( $colSpan = 1 )
+        #set( $rowSpan = $optionsMap.size() )
+    #else
+        #set( $colSpan = ( $colCount / 2) + 1 )
+        #set( $rowSpan = $optionsMap.size() + 1)
+    #end
+
     <tr>
-        <td></td>
+        <td colspan="$colSpan"></td>
         #foreach( $organisationUnit in $organisationUnits )
-        <th colspan="$colCount"><span align="center">${encoder.htmlEncode( $organisationUnit.displayName )}</span></th>
+        <th><span align="center">${encoder.htmlEncode( $organisationUnit.displayName )}</span></th>
         #end
     </tr>
 
@@ -144,14 +152,13 @@
         #set( $mark = 1 )
         #end
         #set( $count = $count + 1 )
-
+        #if( $isDefaultCategory )
         <tr>
-            <td #if( $mark == 1 )class="alt"#else class="reg"#end>${encoder.htmlEncode( $dataElement.displayName )}</td>
+            <td rowspan="$colCount" #if( $mark == 1 )class="alt"#else class="reg"#end>${encoder.htmlEncode( $dataElement.displayName )}</td>
 
             #foreach( $organisationUnit in $organisationUnits )
-                #if( $isDefaultCategory )
-                    <span class="hidden" id="${dataElement.uid}-dataelement">${encoder.htmlEncode( $dataElement.getFormNameFallback() )}</span>
-                    #foreach( $optionCombo in $optionCombos )
+                <span class="hidden" id="${dataElement.uid}-dataelement">${encoder.htmlEncode( $dataElement.getFormNameFallback() )}</span>
+                #foreach( $optionCombo in $optionCombos )
                     #set( $dataEntryId = "${organisationUnit.id}-${dataElement.uid}-${optionCombo.uid}-val" )
                     #set( $greyedField = false )
                     #set( $greyedField = $greyedFields.get( "$dataElement.uid:$optionCombo.uid" ) )
@@ -172,13 +179,12 @@
                     #end
                     </td>
                     #set( $tabIndex = $tabIndex + 1 )
-                    #end
-                #else
                 #end
             #end
         </tr>
+        #else
+        #end
     #end
-
 	</table>
     </div>
     </td>