------------------------------------------------------------
revno: 311
committer: Lars Helge Oeverland [email protected]
branch nick: trunk
timestamp: Wed 2009-05-20 13:38:29 +0200
message:
  Added URL property to OrganisationUnit
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/javascript/organisationUnit.js
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/organisationUnit.vm
  
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/responseOrganisationUnitObject.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-03-03 16:46:36 +0000
+++ 
dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java
  2009-05-20 11:38:29 +0000
@@ -69,6 +69,8 @@
     
     private String longitude;
     
+    private String url;
+    
     private transient int level;
     
     // 
-------------------------------------------------------------------------
@@ -306,6 +308,16 @@
         this.longitude = longitude;
     }
 
+    public String getUrl()
+    {
+        return url;
+    }
+
+    public void setUrl( String url )
+    {
+        this.url = url;
+    }
+
     public int getLevel()
     {
         return level;

=== 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-03-03 16:46:36 +0000
+++ 
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
@@ -46,6 +46,8 @@
     <property name="latitude"/>
       
     <property name="longitude"/>
+    
+    <property name="url"/>
                
   </joined-subclass>
 </hibernate-mapping>

=== 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-03-03 16:46:36 +0000
+++ 
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
@@ -107,6 +107,13 @@
     {
         this.comment = comment;
     }
+    
+    private String url;
+
+    public void setUrl( String url )
+    {
+        this.url = url;
+    }
 
     // 
-------------------------------------------------------------------------
     // Action implementation
@@ -150,6 +157,7 @@
         OrganisationUnit organisationUnit = new OrganisationUnit( name, 
shortName, 
             code, date, null, true, comment );
         
+        organisationUnit.setUrl( url );
         organisationUnit.setParent( parent );
 
         organisationUnitService.addOrganisationUnit( organisationUnit );

=== 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-03-03 16:46:36 +0000
+++ 
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
@@ -120,6 +120,13 @@
         this.comment = comment;
     }
 
+    private String url;
+
+    public void setUrl( String url )
+    {
+        this.url = url;
+    }
+
     // 
-------------------------------------------------------------------------
     // Action implementation
     // 
-------------------------------------------------------------------------
@@ -159,6 +166,7 @@
         organisationUnit.setOpeningDate( oDate );
         organisationUnit.setClosedDate( cDate );
         organisationUnit.setComment( comment );
+        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-03-03 16:46:36 +0000
+++ 
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
@@ -103,4 +103,5 @@
 level                                                                          
                = Level
 code                                                                           
                = Code
 object_not_deleted_associated_by_objects                       = Object not 
deleted becuause it is associated by objects of type
-hide_warning                                                                   
        = Hide warning
\ No newline at end of file
+hide_warning                                                                   
        = Hide warning
+url                                                                            
                        = URL
\ No newline at end of file

=== 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-03-03 16:46:36 +0000
+++ 
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
@@ -35,6 +35,10 @@
                <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="url">$i18n.getString( "url" )</label></td>
+        <td><input type="text" id="url" name="url" style="width:20em"></td>
+    </tr>
        <tr>
                <td></td>
                <td><input type="submit" value="$i18n.getString( "add" )" 
style="width:10em"><input type="button" value="$i18n.getString( "cancel" )" 
onclick="window.location.href='organisationUnit.action'" 
style="width:10em"></td>

=== modified file 
'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/javascript/organisationUnit.js'
--- 
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/javascript/organisationUnit.js
     2009-03-03 16:46:36 +0000
+++ 
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/javascript/organisationUnit.js
     2009-05-20 11:38:29 +0000
@@ -37,6 +37,8 @@
     var active = getElementValue( unitElement, 'active' );
     setFieldValue( 'activeField', active == 'true' ? yes : no );
     
+    setFieldValue( 'urlField', getElementValue( unitElement, 'url' ) );
+    
     showDetails();
 }
 

=== modified file 
'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/organisationUnit.vm'
--- 
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/organisationUnit.vm
        2009-03-03 16:46:36 +0000
+++ 
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/organisationUnit.vm
        2009-05-20 11:38:29 +0000
@@ -54,6 +54,7 @@
                                <p><label>$i18n.getString( "closed_date" 
):</label><br><span id="closedDateField"></span></p>
                                <p><label>$i18n.getString( "registers_date" 
):</label><br><span id="activeField"></span></p>
                                <p><label>$i18n.getString( "comment" 
):</label><br><span id="commentField"></span></p>
+                <p><label>$i18n.getString( "url" ):</label><br><span 
id="urlField"></span></p>
                        </div>
 
             <div id="warningArea" style="display:none">

=== modified file 
'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/responseOrganisationUnitObject.vm'
--- 
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/responseOrganisationUnitObject.vm
  2009-03-03 16:46:36 +0000
+++ 
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/responseOrganisationUnitObject.vm
  2009-05-20 11:38:29 +0000
@@ -7,5 +7,6 @@
        <openingDate>$format.formatDate( $organisationUnit.openingDate 
)</openingDate>
        <closedDate>$!format.formatDate( $organisationUnit.closedDate 
)</closedDate>
        <active>$organisationUnit.active</active>
-       <comment>$!encoder.xmlEncode( $organisationUnit.comment )</comment>
+       <comment>$!encoder.xmlEncode( $organisationUnit.comment )</comment>
+       <url>$!encoder.xmlEncode( $organisationUnit.url )</url>
 </organisationUnit>
\ No newline at end of file

=== 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-03-03 16:46:36 +0000
+++ 
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
@@ -53,6 +53,10 @@
                <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="url">$i18n.getString( "url" )</label></td>
+        <td><input type="text" id="url" name="url" 
value="$!encoder.htmlEncode( $organisationUnit.url )" style="width:20em"></td>
+    </tr>
        <tr>
                <td></td>
                <td><input type="submit" value="$i18n.getString( "save" )" 
style="width:10em"><input type="button" value="$i18n.getString( "cancel" )" 
onclick="window.location.href='organisationUnit.action'" 
style="width:10em"></td>



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

_______________________________________________
Mailing list: https://launchpad.net/~dhis2-devs
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp

Reply via email to