← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17819: Approvals: show user messages for states UNAPPROVED_ABOVE and APPROVED_ABOVE

 

------------------------------------------------------------
revno: 17819
committer: jimgrace@xxxxxxxxx
branch nick: dhis2
timestamp: Sun 2014-12-28 21:30:26 -0500
message:
  Approvals: show user messages for states UNAPPROVED_ABOVE and APPROVED_ABOVE
modified:
  dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties
  dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/dataApprovalForm.vm
  dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/dataApproval.js


--
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-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties	2014-11-13 09:32:50 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties	2014-12-29 02:30:26 +0000
@@ -253,8 +253,10 @@
 accept=Accept
 unaccept=Unaccept
 waiting_for_lower_level_approval=Waiting for lower levels to approve
+approved_at_a_higher_level=Approved at a higher level
 approved=Approved
 approved_and_accepted=Approved and accepted
+ready_for_approval_at_a_higher_level=Ready for approval at a higher level
 ready_for_approval=Ready for approval
 approval_not_relevant=Approval not relevant
 waiting_for_approval_elsewhere=Waiting for approval elsewhere

=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/dataApprovalForm.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/dataApprovalForm.vm	2014-10-23 20:45:00 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/dataApprovalForm.vm	2014-12-29 02:30:26 +0000
@@ -18,9 +18,11 @@
 var i18n_generating_report = '$encoder.jsEscape( $i18n.getString( "generating_report" ), "'")';    
 var i18n_select_option_view_all = '$encoder.jsEscape( $i18n.getString( "select_option_view_all" ) , "'")';
 var i18n_waiting_for_lower_level_approval = '$encoder.jsEscape( $i18n.getString( "waiting_for_lower_level_approval" ) , "'")';
+var i18n_ready_for_approval_at_a_higher_level = '$encoder.jsEscape( $i18n.getString( "ready_for_approval_at_a_higher_level" ) , "'")';
 var i18n_ready_for_approval = '$encoder.jsEscape( $i18n.getString( "ready_for_approval" ) , "'")';
 var i18n_approval_not_relevant = '$encoder.jsEscape( $i18n.getString( "approval_not_relevant" ) , "'")';
 var i18n_waiting_for_approval_elsewhere = '$encoder.jsEscape( $i18n.getString( "waiting_for_approval_elsewhere" ) , "'")';
+var i18n_approved_at_a_higher_level = '$encoder.jsEscape( $i18n.getString( "approved_at_a_higher_level" ) , "'")';
 var i18n_approved = '$encoder.jsEscape( $i18n.getString( "approved" ) , "'")';
 var i18n_approved_elsewhere = '$encoder.jsEscape( $i18n.getString( "approved_elsewhere" ) , "'")';
 var i18n_accepted_elsewhere = '$encoder.jsEscape( $i18n.getString( "accepted_elsewhere" ) , "'")';

=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/dataApproval.js'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/dataApproval.js	2014-10-25 11:30:40 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/dataApproval.js	2014-12-29 02:30:26 +0000
@@ -140,7 +140,11 @@
 	        case "UNAPPROVABLE":
 		        $( "#approvalNotification" ).html( i18n_approval_not_relevant );
 		        break;
-	    	
+
+            case "UNAPPROVED_ABOVE":
+                $( "#approvalNotification" ).html( i18n_ready_for_approval_at_a_higher_level );
+                break;
+
 		    case "UNAPPROVED_WAITING":
 		        $( "#approvalNotification" ).html( i18n_waiting_for_lower_level_approval );
 		        break;
@@ -151,7 +155,7 @@
 		        
 		    case "UNAPPROVED_READY":
 		        $( "#approvalNotification" ).html( i18n_ready_for_approval );
-		        
+
 		        if ( json.mayApprove ) {
 		            $( "#approvalDiv" ).show();
 		            $( "#approveButton" ).show();
@@ -174,6 +178,10 @@
 
                 break;
 
+            case "APPROVED_ABOVE":
+                $( "#approvalNotification" ).html( i18n_approved_at_a_higher_level );
+                break;
+
 		    case "APPROVED_HERE":
 		        $( "#approvalNotification" ).html( i18n_approved );