=== 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 2016-02-09 21:30:25 +0000 +++ dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties 2016-03-04 15:23:40 +0000 @@ -265,4 +265,6 @@ approval_entity=Approval entity approval_status=Approval status please_make_selection=Please make a selection below -data_criteria=Data criteria \ No newline at end of file +data_criteria=Data criteria +approval_level=Approval level +not_yet_approved=Not yet approved \ No newline at end of file === 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 2016-02-17 19:02:47 +0000 +++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/dataApprovalForm.vm 2016-03-04 15:23:40 +0000 @@ -19,6 +19,8 @@ var i18n_select_items_for = '$encoder.jsEscape( $i18n.getString( "select_items_for" ), "'")'; var i18n_item = '$encoder.jsEscape( $i18n.getString( "item" ), "'")'; var i18n_organisation_unit = '$encoder.jsEscape( $i18n.getString( "organisation_unit" ), "'")'; +var i18n_approval_level = '$encoder.jsEscape( $i18n.getString( "approval_level" ), "'")'; +var i18n_not_yet_approved = '$encoder.jsEscape( $i18n.getString( "not_yet_approved" ), "'")'; var i18n_action = '$encoder.jsEscape( $i18n.getString( "action" ), "'")'; var i18n_generating_report = '$encoder.jsEscape( $i18n.getString( "generating_report" ), "'")'; var i18n_select_option_view_all = '$encoder.jsEscape( $i18n.getString( "select_option_view_all" ) , "'")'; === 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 2016-03-04 14:43:52 +0000 +++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/dataApproval.js 2016-03-04 15:23:40 +0000 @@ -4,6 +4,7 @@ dhis2.appr.currentPeriodOffset = 0; dhis2.appr.permissions = null; dhis2.appr.dataSets = {}; +dhis2.appr.dataApprovalLevels = {}; /** * Object with properties: ds, pe, ou, array of approvals with aoc, ou. @@ -33,6 +34,12 @@ $( "#dataSetId" ).html( dsHtml ); } ); + + $.getJSON( "../api/dataApprovalLevels.json", function( json ) { + $.each( json.dataApprovalLevels, function( inx, al ) { + dhis2.appr.dataApprovalLevels[al.id] = al; + } ); + } ); } ); /** @@ -120,19 +127,28 @@ $.getJSON( apUrl, function( approvals ) { html = "
" + i18n_item + " | " + i18n_organisation_unit + " | " + i18n_action + " | ||
---|---|---|---|---|
" + i18n_item + " | " + i18n_organisation_unit + " | " + i18n_approval_level + " | " + i18n_action + " | |
"; - html += " | "; + html += "data-approve='" + pm.mayApprove + "' data-unapprove='" + pm.mayUnapprove + "' data-accept='" + pm.mayAccept + "' data-unaccept='" + pm.mayUnaccept + "'>"; + html += ""; html += " | " + ap.ouName + " | "; + html += "" + levelName + " | "; html += "" + dhis2.appr.getPermissions( ap ) + " | "; html += "