← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3064: Included code in orgunit search

 

------------------------------------------------------------
revno: 3064
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2011-03-18 00:03:14 +0100
message:
  Included code in orgunit search
modified:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/search/SearchOrganisationUnitsAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/organisationUnitSearch.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-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/search/SearchOrganisationUnitsAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/search/SearchOrganisationUnitsAction.java	2011-03-17 22:55:56 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/search/SearchOrganisationUnitsAction.java	2011-03-17 23:03:14 +0000
@@ -229,7 +229,8 @@
     {
         final Grid orgUnitGrid = new ListGrid().setTitle( "Organisation unit search result" );
         
-        orgUnitGrid.addHeader( new GridHeader( "Organisation unit", false, true ) );
+        orgUnitGrid.addHeader( new GridHeader( "Code", false, true ) );
+        orgUnitGrid.addHeader( new GridHeader( "Name", false, true ) );
         
         for ( OrganisationUnitGroupSet groupSet : groupSets )
         {
@@ -239,7 +240,8 @@
         for ( OrganisationUnit unit : organisationUnits )
         {
             orgUnitGrid.addRow();
-            
+
+            orgUnitGrid.addValue( unit.getCode() );
             orgUnitGrid.addValue( unit.getName() );
             
             for ( OrganisationUnitGroupSet groupSet : groupSets )

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/organisationUnitSearch.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/organisationUnitSearch.vm	2011-03-17 22:55:56 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/organisationUnitSearch.vm	2011-03-17 23:03:14 +0000
@@ -81,6 +81,7 @@
 <table class="listTable" style="width:90%">
 <thead>
 <tr>
+<th style="width:100px">$i18n.getString( "code" )</th>
 <th style="min-width:300px">$i18n.getString( "name" )</th>
 #foreach( $groupSet in $groupSets )
 <th>$encoder.htmlEncode( $groupSet.name )</th>
@@ -92,7 +93,8 @@
 <tbody id="list">
 #foreach( $unit in $organisationUnits )
 <tr>
-<td>$encoder.htmlEncode( $unit.name )</td>
+<td>$!encoder.htmlEncode( $unit.code )</td>
+<td>$!encoder.htmlEncode( $unit.name )</td>
 #foreach( $groupSet in $groupSets )
 <td>$!unit.getGroupNameInGroupSet( $groupSet )</td>
 #end