=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java 2014-09-24 07:43:19 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java 2014-10-28 22:36:19 +0000 @@ -338,6 +338,24 @@ return dataSet != null ? dataSet.getPeriodType() : null; } + + /** + * Indicates whether this data element requires approval of data. Returns true + * if only one of the data sets associated with this data element requires + * approval. + */ + public boolean isApproveData() + { + for ( DataSet dataSet : dataSets ) + { + if ( dataSet != null && dataSet.isApproveData() ) + { + return true; + } + } + + return false; + } /** * Returns the frequency order for the PeriodType of this DataElement. If no === modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonDataElement.vm' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonDataElement.vm 2014-07-13 07:53:57 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonDataElement.vm 2014-10-28 22:36:19 +0000 @@ -14,6 +14,7 @@ "categoryCombo": "$!encoder.xmlEncode( ${dataElement.categoryCombo.name} )", "url": "$!encoder.xmlEncode( ${dataElement.url} )", "lastUpdated": "$!format.formatDate( ${dataElement.lastUpdated} )", + "approveData": "$!{dataElement.approveData}", #set( $size = ${dataElement.dataSets.size()} ) "dataSets": [ === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module.properties' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module.properties 2014-10-15 04:17:05 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module.properties 2014-10-28 22:36:19 +0000 @@ -235,4 +235,5 @@ category_option_combo = Category Option Combo intro_category_option_combo = View and edit data element category option combos. Category Option Combo are fine-grained break-downs of catagory. edit_data_element_category_option_combo = Edit data element category option combo -average_sum_in_org_unit_hierarchy=Average (sum in org unit hierarchy) \ No newline at end of file +average_sum_in_org_unit_hierarchy=Average (sum in org unit hierarchy) +approve_data=Approve data \ No newline at end of file === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElement.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElement.vm 2014-07-16 15:41:33 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElement.vm 2014-10-28 22:36:19 +0000 @@ -104,6 +104,7 @@




+




=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElement.js' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElement.js 2014-10-15 04:17:05 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElement.js 2014-10-28 22:36:19 +0000 @@ -116,6 +116,9 @@ var lastUpdated = json.dataElement.lastUpdated; setInnerHTML('lastUpdatedField', lastUpdated ? lastUpdated : '[' + i18n_none + ']'); + var approveData = json.dataElement.approveData; + setInnerHTML('approveDataField', approveData == "true" ? i18n_yes : i18n_no ); + var dataSets = joinNameableObjects(json.dataElement.dataSets); setInnerHTML('dataSetsField', dataSets ? dataSets : '[' + i18n_none + ']');