← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 377: dhis-web-maintenance-organisationunit: Added GUI fields for type, geocode, latitude, longitude.

 

------------------------------------------------------------
revno: 377
committer: Lars Helge Oeverland larshelge@xxxxxxxxx
branch nick: trunk
timestamp: Tue 2009-06-16 17:14:25 +0200
message:
  dhis-web-maintenance-organisationunit: Added GUI fields for type, geocode, latitude, longitude.
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java
  dhis-2/dhis-services/dhis-service-organisationunit/src/main/resources/org/hisp/dhis/organisationunit/hibernate/OrganisationUnit.hbm.xml
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/AddOrganisationUnitAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/UpdateOrganisationUnitAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/resources/org/hisp/dhis/oum/i18n_module.properties
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitForm.vm

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java	2009-06-16 14:40:57 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java	2009-06-16 15:14:25 +0000
@@ -60,6 +60,8 @@
     private Date closedDate;
 
     private boolean active;
+    
+    private String type;
 
     private String comment;
     
@@ -277,6 +279,16 @@
         this.active = active;
     }
 
+    public String getType()
+    {
+        return type;
+    }
+
+    public void setType( String type )
+    {
+        this.type = type;
+    }
+
     public String getComment()
     {
         return comment;

=== modified file 'dhis-2/dhis-services/dhis-service-organisationunit/src/main/resources/org/hisp/dhis/organisationunit/hibernate/OrganisationUnit.hbm.xml'
--- dhis-2/dhis-services/dhis-service-organisationunit/src/main/resources/org/hisp/dhis/organisationunit/hibernate/OrganisationUnit.hbm.xml	2009-05-20 11:38:29 +0000
+++ dhis-2/dhis-services/dhis-service-organisationunit/src/main/resources/org/hisp/dhis/organisationunit/hibernate/OrganisationUnit.hbm.xml	2009-06-16 15:14:25 +0000
@@ -38,6 +38,8 @@
     <property name="closedDate" column="closeddate" type="date"/>
 		
     <property name="active"/>
+    
+    <property name="type"/>
 		
     <property name="comment" length="360"/>
     

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/AddOrganisationUnitAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/AddOrganisationUnitAction.java	2009-05-20 11:38:29 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/AddOrganisationUnitAction.java	2009-06-16 15:14:25 +0000
@@ -100,6 +100,13 @@
     {
         this.openingDate = openingDate;
     }
+    
+    private String type;
+
+    public void setType( String type )
+    {
+        this.type = type;
+    }
 
     private String comment;
 
@@ -108,6 +115,27 @@
         this.comment = comment;
     }
     
+    private String geoCode;
+
+    public void setGeoCode( String geoCode )
+    {
+        this.geoCode = geoCode;
+    }
+    
+    private String latitude;
+
+    public void setLatitude( String latitude )
+    {
+        this.latitude = latitude;
+    }
+    
+    private String longitude;
+
+    public void setLongitude( String longitude )
+    {
+        this.longitude = longitude;
+    }
+    
     private String url;
 
     public void setUrl( String url )
@@ -157,6 +185,10 @@
         OrganisationUnit organisationUnit = new OrganisationUnit( name, shortName, 
             code, date, null, true, comment );
         
+        organisationUnit.setType( type );
+        organisationUnit.setGeoCode( geoCode );
+        organisationUnit.setLatitude( latitude );
+        organisationUnit.setLongitude( longitude );
         organisationUnit.setUrl( url );
         organisationUnit.setParent( parent );
 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/UpdateOrganisationUnitAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/UpdateOrganisationUnitAction.java	2009-05-20 11:38:29 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/UpdateOrganisationUnitAction.java	2009-06-16 15:14:25 +0000
@@ -113,6 +113,13 @@
         this.closedDate = closedDate;
     }
 
+    private String type;
+
+    public void setType( String type )
+    {
+        this.type = type;
+    }
+
     private String comment;
 
     public void setComment( String comment )
@@ -120,6 +127,27 @@
         this.comment = comment;
     }
 
+    private String geoCode;
+
+    public void setGeoCode( String geoCode )
+    {
+        this.geoCode = geoCode;
+    }
+    
+    private String latitude;
+
+    public void setLatitude( String latitude )
+    {
+        this.latitude = latitude;
+    }
+    
+    private String longitude;
+
+    public void setLongitude( String longitude )
+    {
+        this.longitude = longitude;
+    }
+
     private String url;
 
     public void setUrl( String url )
@@ -165,7 +193,11 @@
         organisationUnit.setActive( active.booleanValue() );
         organisationUnit.setOpeningDate( oDate );
         organisationUnit.setClosedDate( cDate );
+        organisationUnit.setType( type );
         organisationUnit.setComment( comment );
+        organisationUnit.setGeoCode( geoCode );
+        organisationUnit.setLatitude( latitude );
+        organisationUnit.setLongitude( longitude );
         organisationUnit.setUrl( url );
 
         organisationUnitService.updateOrganisationUnit( organisationUnit );

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/resources/org/hisp/dhis/oum/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/resources/org/hisp/dhis/oum/i18n_module.properties	2009-05-20 11:38:29 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/resources/org/hisp/dhis/oum/i18n_module.properties	2009-06-16 15:14:25 +0000
@@ -104,4 +104,8 @@
 code												= Code
 object_not_deleted_associated_by_objects			= Object not deleted becuause it is associated by objects of type
 hide_warning										= Hide warning
-url													= URL
\ No newline at end of file
+url													= URL
+latitude											= Latitude
+longitude											= Longitude
+type												= Type
+geo_code											= Geo code

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitForm.vm	2009-05-20 11:38:29 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitForm.vm	2009-06-16 15:14:25 +0000
@@ -31,11 +31,27 @@
             button         :    "getOpeningDate"   // trigger for the calendar (button ID)
         });
   	</script>
+    <tr>
+        <td><label for="type">$i18n.getString( "type" )</label></td>
+        <td><input type="text" id="type" name="type" style="width:20em"></td>
+    </tr>
 	<tr>
 		<td><label for="comment">$i18n.getString( "comment" )</label></td>
 		<td><textarea id="comment" name="comment" style="width:20em; height:5em" rows="5" cols="20"></textarea></td>
 	</tr>
     <tr>
+        <td><label for="geoCode">$i18n.getString( "geo_code" )</label></td>
+        <td><input type="text" id="geoCode" name="geoCode" style="width:20em"></td>
+    </tr>
+    <tr>
+        <td><label for="latitude">$i18n.getString( "latitude" )</label></td>
+        <td><input type="text" id="latitude" name="latitude" style="width:20em"></td>
+    </tr>
+    <tr>
+        <td><label for="longitude">$i18n.getString( "longitude" )</label></td>
+        <td><input type="text" id="longitude" name="longitude" style="width:20em"></td>
+    </tr>
+    <tr>
         <td><label for="url">$i18n.getString( "url" )</label></td>
         <td><input type="text" id="url" name="url" style="width:20em"></td>
     </tr>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitForm.vm	2009-05-20 11:38:29 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitForm.vm	2009-06-16 15:14:25 +0000
@@ -49,11 +49,27 @@
 			</select>
 		</td>
 	</tr>
+    <tr>
+        <td><label for="type">$i18n.getString( "type" )</label></td>
+        <td><input type="text" id="type" name="type" value="$!encoder.htmlEncode( $organisationUnit.type )" style="width:20em"></td>
+    </tr>
 	<tr>
 		<td><label for="comment">$i18n.getString( "comment" )</label></td>
 		<td><textarea id="comment" name="comment" style="width:20em; height:5em">$!encoder.htmlEncode( $organisationUnit.comment )</textarea></td>
 	</tr>
     <tr>
+        <td><label for="geoCode">$i18n.getString( "geo_code" )</label></td>
+        <td><input type="text" id="geoCode" name="geoCode" value="$!encoder.htmlEncode( $organisationUnit.geoCode )" style="width:20em"></td>
+    </tr>
+    <tr>
+        <td><label for="latitude">$i18n.getString( "latitude" )</label></td>
+        <td><input type="text" id="latitude" name="latitude" value="$!encoder.htmlEncode( $organisationUnit.latitude )" style="width:20em"></td>
+    </tr>
+    <tr>
+        <td><label for="longitude">$i18n.getString( "longitude" )</label></td>
+        <td><input type="text" id="longitude" name="longitude" value="$!encoder.htmlEncode( $organisationUnit.longitude )" style="width:20em"></td>
+    </tr>
+    <tr>
         <td><label for="url">$i18n.getString( "url" )</label></td>
         <td><input type="text" id="url" name="url" value="$!encoder.htmlEncode( $organisationUnit.url )" style="width:20em"></td>
     </tr>



--
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.