← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13448: Approval, minor

 

------------------------------------------------------------
revno: 13448
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2013-12-27 15:30:56 +0100
message:
  Approval, minor
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataapproval/DataApprovalState.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/DataApprovalController.java
  dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/select.vm
  dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/style/dhis-web-dataentry.css


--
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-api/src/main/java/org/hisp/dhis/dataapproval/DataApprovalState.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataapproval/DataApprovalState.java	2013-12-21 01:36:12 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataapproval/DataApprovalState.java	2013-12-27 14:30:56 +0000
@@ -60,7 +60,6 @@
      * Data in this data set does not need approval for this period and
      * organisation unit, for one of the following reasons:
      * <ul>
-     *     <li>Data approval is not enabled globally.</li>
      *     <li>Data approval is not enabled for this data set.</li>
      *     <li>No data is collected for this data set for this organisation
      *         unit or any lower-level organisation units under it.</li>

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/DataApprovalController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/DataApprovalController.java	2013-12-27 12:17:16 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/DataApprovalController.java	2013-12-27 14:30:56 +0000
@@ -171,6 +171,12 @@
         
         User user = currentUserService.getCurrentUser();
         
+        if ( !dataApprovalService.mayApprove( organisationUnit ) )
+        {
+            ContextUtils.conflictResponse( response, "Current user is not authorized to approve for organisation unit: " + ou );
+            return;
+        }
+        
         DataApprovalState state = dataApprovalService.getDataApprovalState( dataSet, period, organisationUnit, attributeOptionCombo );
         
         if ( DataApprovalState.READY_FOR_APPROVAL.equals( state ) )

=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/select.vm'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/select.vm	2013-12-25 15:01:48 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/select.vm	2013-12-27 14:30:56 +0000
@@ -104,6 +104,7 @@
 <div id="completenessDiv" class="page inputCriteria">
 <input type="button" id="completeButton" name="completeButton" value="$i18n.getString( 'complete' )" onclick="registerCompleteDataSet()" style="width:120px">
 <input type="button" id="undoButton" name="undoButton" value="$i18n.getString( 'incomplete' )" onclick="undoCompleteDataSet()" style="width:120px">
+<span class="separator">&#124</span>
 <input type="button" id="validateButton" value="$i18n.getString( 'run_validation' )" onclick="validate( false )" style="width:120px">
 </div>
 

=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/style/dhis-web-dataentry.css'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/style/dhis-web-dataentry.css	2013-12-21 23:00:20 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/style/dhis-web-dataentry.css	2013-12-27 14:30:56 +0000
@@ -36,8 +36,7 @@
 #completenessDiv
 {
   display: none;
-  width: 386px;
-  height: 29px;
+  width: 399px;
 }
 
 #infoDiv
@@ -71,6 +70,12 @@
   margin-bottom: 1px;
 }
 
+.separator
+{
+  color: #aaa;
+  padding: 0 4px;
+}
+
 .selectionBoxRow
 {
   padding: 2px 0;