dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #26301
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13032: add includeChildren/includeDescendants to event export UI
------------------------------------------------------------
revno: 13032
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2013-11-27 11:00:19 +0100
message:
add includeChildren/includeDescendants to event export UI
modified:
dhis-2/dhis-web/dhis-web-importexport/src/main/resources/org/hisp/dhis/importexport/i18n_module.properties
dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/eventExportForm.vm
--
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-importexport/src/main/resources/org/hisp/dhis/importexport/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/resources/org/hisp/dhis/importexport/i18n_module.properties 2013-10-30 12:51:03 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/resources/org/hisp/dhis/importexport/i18n_module.properties 2013-11-27 10:00:19 +0000
@@ -444,3 +444,8 @@
select_all_values=Select All Values
deselect_all_values=Deselect All Values
+
+inclusion=Inclusion
+include_selected=Selected organisation unit
+include_children=Include children of organisation unit
+include_descendants=Include descendants of organisation unit
=== modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/eventExportForm.vm'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/eventExportForm.vm 2013-09-04 08:11:01 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/eventExportForm.vm 2013-11-27 10:00:19 +0000
@@ -9,6 +9,7 @@
var compression = $( '#compression' ).val();
var program = $( '#programs' ).val();
var programStage = $( '#programStages' ).val();
+ var inclusion = $( '#inclusion' ).val();
var url = '../api/events' + format + compression + "?program=" + program;
@@ -31,6 +32,14 @@
var startDate = $('#startDate' ).val();
var endDate = $('#endDate' ).val();
+ if( inclusion ) {
+ if( "children" == inclusion ) {
+ url += "&includeChildren=true";
+ } else if( "descendants" == inclusion ) {
+ url += "&includeDescendants=true";
+ }
+ }
+
url += "&startDate=" + startDate;
url += "&endDate=" + endDate;
url += "&links=false";
@@ -131,15 +140,26 @@
<td><input type="text" id="endDate" name="endDate" value="$!endDate" style="width:296px"></td>
</tr>
- <tr>
- <td>$i18n.getString( "format" )</td>
- <td>
- <select id="format" style="width: 300px;">
- <option value=".xml">XML</option>
- <option value=".json">Json</option>
- </select>
- </td>
- </tr>
+<tr>
+ <td>$i18n.getString( "inclusion" )</td>
+ <td>
+ <select id="inclusion" style="width: 300px;">
+ <option value="selected">$i18n.getString( "include_selected" )</option>
+ <option value="children">$i18n.getString( "include_children" )</option>
+ <option value="descendants">$i18n.getString( "include_descendants" )</option>
+ </select>
+ </td>
+</tr>
+
+<tr>
+ <td>$i18n.getString( "format" )</td>
+ <td>
+ <select id="format" style="width: 300px;">
+ <option value=".xml">XML</option>
+ <option value=".json">Json</option>
+ </select>
+ </td>
+</tr>
<tr>
<td>$i18n.getString( "compression" )</td>