dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #33784
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17306: Data dictionary, data element details, added field for approve data
------------------------------------------------------------
revno: 17306
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2014-10-28 18:36:19 -0400
message:
Data dictionary, data element details, added field for approve data
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonDataElement.vm
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/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/javascript/dataElement.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-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 @@
<p><label>$i18n.getString( "category_combination" ):</label><br/><span id="categoryComboField"></span></p>
<p><label>$i18n.getString( "url" ):</label><br/><span id="urlField"></span></p>
<p><label>$i18n.getString( "last_updated" ):</label><br/><span id="lastUpdatedField"></span></p>
+ <p><label>$i18n.getString( "approve_data" ):</label><br/><span id="approveDataField"></span></p>
<p><label>$i18n.getString( "data_sets" ):</label><br/><span id="dataSetsField"></span></p>
<p><label>$i18n.getString( "id" ):</label><br/><span id="idField"></span></p>
</div>
=== 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 + ']');