← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12610: Validation rule group. Added no of user roles to alert to details box.

 

------------------------------------------------------------
revno: 12610
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2013-10-13 20:35:46 +0200
message:
  Validation rule group. Added no of user roles to alert to details box.
modified:
  dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/validationrulegroup/GetValidationRuleGroupAction.java
  dhis-2/dhis-web/dhis-web-validationrule/src/main/resources/org/hisp/dhis/validationrule/i18n_module.properties
  dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/javascript/validationRuleGroup.js
  dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/jsonValidationRuleGroup.vm
  dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/validationRuleGroup.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-validationrule/src/main/java/org/hisp/dhis/validationrule/action/validationrulegroup/GetValidationRuleGroupAction.java'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/validationrulegroup/GetValidationRuleGroupAction.java	2013-08-23 16:05:01 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/validationrulegroup/GetValidationRuleGroupAction.java	2013-10-13 18:35:46 +0000
@@ -73,13 +73,6 @@
         return validationRuleGroup;
     }
 
-    private int memberCount;
-
-    public int getMemberCount()
-    {
-        return memberCount;
-    }
-
     // -------------------------------------------------------------------------
     // Action implementation
     // -------------------------------------------------------------------------
@@ -88,8 +81,6 @@
     {
         validationRuleGroup = validationRuleService.getValidationRuleGroup( id );
         
-        memberCount = validationRuleGroup.getMembers().size();
-        
         return SUCCESS;
     }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/resources/org/hisp/dhis/validationrule/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/resources/org/hisp/dhis/validationrule/i18n_module.properties	2013-10-08 17:20:57 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/resources/org/hisp/dhis/validationrule/i18n_module.properties	2013-10-13 18:35:46 +0000
@@ -147,3 +147,4 @@
 annual_sample_count=Annual sample count
 high_outliers=High outliers
 low_outliers=Low outliers
+number_of_user_roles_to_alert=Number of user roles to alert
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/javascript/validationRuleGroup.js'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/javascript/validationRuleGroup.js	2013-09-27 17:05:36 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/javascript/validationRuleGroup.js	2013-10-13 18:35:46 +0000
@@ -8,6 +8,7 @@
 		setInnerHTML( 'nameField', json.validationRuleGroup.name );
 		setInnerHTML( 'descriptionField', json.validationRuleGroup.description );
 		setInnerHTML( 'memberCountField', json.validationRuleGroup.memberCount );
+		setInnerHTML( 'userRolesToAlertCountField', json.validationRuleGroup.userRolesToAlertCount );
 
 		showDetails();
 	});

=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/jsonValidationRuleGroup.vm'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/jsonValidationRuleGroup.vm	2011-09-29 06:40:09 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/jsonValidationRuleGroup.vm	2013-10-13 18:35:46 +0000
@@ -3,6 +3,7 @@
     "id": "$!{validationRuleGroup.id}",
     "name": "$!encoder.jsonEncode( ${validationRuleGroup.name} )",
     "description": "$!encoder.jsonEncode( ${validationRuleGroup.description} )",
-    "memberCount": "$!{memberCount}"
+    "memberCount": "${validationRuleGroup.members.size()}",
+    "userRolesToAlertCount": "$!{validationRuleGroup.userAuthorityGroupsToAlert.size()}"
   }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/validationRuleGroup.vm'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/validationRuleGroup.vm	2013-10-08 19:10:40 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/validationRuleGroup.vm	2013-10-13 18:35:46 +0000
@@ -56,6 +56,7 @@
                 <p><label>$i18n.getString( "name" ):</label><br><span id="nameField"></span></p>
                 <p><label>$i18n.getString( "description" ):</label><br><span id="descriptionField"></span></p>
                 <p><label>$i18n.getString( "number_of_members" ):</label><br><span id="memberCountField"></span></p>
+                <p><label>$i18n.getString( "number_of_user_roles_to_alert" ):</label><br><span id="userRolesToAlertCountField"></span></p>
             </div>
 
 			<div id="warningArea">