dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #24225
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11832: add uid/created/lastUpdated on ProgramInstance. Minor fixes for Event UI
------------------------------------------------------------
revno: 11832
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2013-08-29 13:59:39 +0200
message:
add uid/created/lastUpdated on ProgramInstance. Minor fixes for Event UI
removed:
dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/javascript/importEventData.js
added:
dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/event/ExportEventAction.java
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/javascript/eventData.js
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramInstance.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/IdentityPopulator.java
dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramInstance.hbm.xml
dhis-2/dhis-web/dhis-web-importexport/src/main/resources/META-INF/dhis/beans.xml
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/struts.xml
dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/index.vm
dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/mainMenu.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-api/src/main/java/org/hisp/dhis/program/ProgramInstance.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramInstance.java 2013-08-23 15:56:19 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramInstance.java 2013-08-29 11:59:39 +0000
@@ -52,8 +52,7 @@
* @version $Id$
*/
@JacksonXmlRootElement( localName = "programInstance", namespace = DxfNamespaces.DXF_2_0 )
-public class ProgramInstance
- implements Serializable
+public class ProgramInstance extends BaseIdentifiableObject
{
public static int STATUS_ACTIVE = 0;
public static int STATUS_COMPLETED = 1;
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/IdentityPopulator.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/IdentityPopulator.java 2013-08-23 16:05:01 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/IdentityPopulator.java 2013-08-29 11:59:39 +0000
@@ -53,7 +53,7 @@
"organisationunit", "orgunitgroup", "orgunitgroupset", "dataelementcategoryoption", "dataelementgroup", "sqlview",
"dataelement", "dataelementgroupset", "dataelementcategory", "categorycombo", "categoryoptioncombo", "map", "mapview",
"reporttable", "report", "messageconversation", "message", "userinfo", "usergroup", "userrole", "maplegend",
- "maplegendset", "maplayer", "section", "optionset", "program", "programstage", "programstageinstance"
+ "maplegendset", "maplayer", "section", "optionset", "program", "programinstance", "programstage", "programstageinstance"
};
private static final Map<String, String> TABLE_ID_MAP = DimensionalObjectUtils.asMap(
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramInstance.hbm.xml'
--- dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramInstance.hbm.xml 2013-04-12 08:25:43 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramInstance.hbm.xml 2013-08-29 11:59:39 +0000
@@ -10,6 +10,12 @@
<generator class="native" />
</id>
+ <property name="uid" column="uid" unique="true" length="11" />
+
+ <property name="created" type="timestamp"/>
+
+ <property name="lastUpdated" type="timestamp"/>
+
<property name="dateOfIncident" column="dateofincident"
not-null="true" />
=== added file 'dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/event/ExportEventAction.java'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/event/ExportEventAction.java 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/event/ExportEventAction.java 2013-08-29 11:59:39 +0000
@@ -0,0 +1,60 @@
+package org.hisp.dhis.importexport.action.event;
+
+/*
+ * Copyright (c) 2004-2013, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * Neither the name of the HISP project nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import com.opensymphony.xwork2.Action;
+import org.hisp.dhis.dxf2.event.EventService;
+import org.springframework.beans.factory.annotation.Autowired;
+
+/**
+ * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
+ */
+public class ExportEventAction implements Action
+{
+ // -------------------------------------------------------------------------
+ // Dependencies
+ // -------------------------------------------------------------------------
+
+ @Autowired
+ private EventService eventService;
+
+ // -------------------------------------------------------------------------
+ // Input & Output
+ // -------------------------------------------------------------------------
+
+ // -------------------------------------------------------------------------
+ // Action Implementation
+ // -------------------------------------------------------------------------
+
+ @Override
+ public String execute() throws Exception
+ {
+ return SUCCESS;
+ }
+}
=== modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/resources/META-INF/dhis/beans.xml 2013-08-28 07:27:01 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/resources/META-INF/dhis/beans.xml 2013-08-29 11:59:39 +0000
@@ -17,11 +17,14 @@
<bean id="org.hisp.dhis.importexport.action.datavalue.ExportDataValueAction"
class="org.hisp.dhis.importexport.action.datavalue.ExportDataValueAction" />
- <!-- Event Import -->
+ <!-- Events -->
<bean id="org.hisp.dhis.importexport.action.event.ImportEventAction"
class="org.hisp.dhis.importexport.action.event.ImportEventAction" />
+ <bean id="org.hisp.dhis.importexport.action.event.ExportEventAction"
+ class="org.hisp.dhis.importexport.action.event.ExportEventAction" />
+
<!-- Import -->
<bean id="org.hisp.dhis.importexport.action.imp.ImportAction"
=== 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-08-28 07:27:01 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/resources/org/hisp/dhis/importexport/i18n_module.properties 2013-08-29 11:59:39 +0000
@@ -296,6 +296,7 @@
csv_data_import=CSV Data Import
pdf_data_import=PDF Data Import
event_data_import=Event Data Import
+event_data_export=Event Data Export
no_data_values_found=No data values found
create_new_route=Create new route
integration=Integration
=== modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/resources/struts.xml 2013-08-28 07:27:01 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/resources/struts.xml 2013-08-29 11:59:39 +0000
@@ -57,7 +57,7 @@
<result name="success" type="velocity">/main.vm</result>
<param name="page">/dhis-web-importexport/eventImportForm.vm</param>
<param name="menu">/dhis-web-importexport/mainMenu.vm</param>
- <param name="javascripts">javascript/importEventData.js</param>
+ <param name="javascripts">javascript/eventData.js</param>
<param name="requiredAuthorities">F_IMPORT_DATA</param>
</action>
@@ -67,6 +67,21 @@
<param name="requiredAuthorities">F_IMPORT_DATA</param>
</action>
+ <!-- Event Export -->
+
+ <action name="displayEventExportForm" class="org.hisp.dhis.importexport.action.NoAction">
+ <result name="success" type="velocity">/main.vm</result>
+ <param name="page">/dhis-web-importexport/eventExportForm.vm</param>
+ <param name="menu">/dhis-web-importexport/mainMenu.vm</param>
+ <param name="javascripts">javascript/eventData.js</param>
+ <param name="requiredAuthorities">F_EXPORT_DATA</param>
+ </action>
+
+ <action name="importDataValue" class="org.hisp.dhis.importexport.action.event.ExportEventAction">
+ <result name="success" type="redirect">displayEventExportForm.action</result>
+ <param name="requiredAuthorities">F_EXPORT_DATA</param>
+ </action>
+
<!-- Menu -->
<action name="displayExternalImportMenu" class="org.hisp.dhis.importexport.action.NoAction">
=== added 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 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/eventExportForm.vm 2013-08-29 11:59:39 +0000
@@ -0,0 +1,2 @@
+
+<h3>$i18n.getString( "event_data_export" )</h3>
=== modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/index.vm'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/index.vm 2013-08-28 07:27:01 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/index.vm 2013-08-29 11:59:39 +0000
@@ -10,6 +10,7 @@
#introListImgItem( "dxf2MetaDataExport.action" "metadata_export" "export" )
#introListImgItem( "displayDataValueExportForm.action" "data_export" "export" )
+ #introListImgItem( "displayEventExportForm.action" "event_data_export" "export" )
#introListImgItem( "displayExternalExportMenu.action" "export_to_other_systems" "export" )
#introListImgItem( "displayConfigDhis14Form.action" "dhis14_file_configuration" "configuration" )
=== added file 'dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/javascript/eventData.js'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/javascript/eventData.js 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/javascript/eventData.js 2013-08-29 11:59:39 +0000
@@ -0,0 +1,12 @@
+
+function importEventData()
+{
+ if ( !$( "#upload" ).val() )
+ {
+ setHeaderDelayMessage( "Please select a file to upload" );
+ return false;
+ }
+
+ $( "#notificationTable" ).empty();
+ $( "#importForm" ).submit();
+}
=== removed file 'dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/javascript/importEventData.js'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/javascript/importEventData.js 2013-08-28 07:27:01 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/javascript/importEventData.js 1970-01-01 00:00:00 +0000
@@ -1,12 +0,0 @@
-
-function importEventData()
-{
- if ( !$( "#upload" ).val() )
- {
- setHeaderDelayMessage( "Please select a file to upload" );
- return false;
- }
-
- $( "#notificationTable" ).empty();
- $( "#importForm" ).submit();
-}
=== modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/mainMenu.vm'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/mainMenu.vm 2013-08-28 07:27:01 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/mainMenu.vm 2013-08-29 11:59:39 +0000
@@ -16,6 +16,7 @@
<ul>
<li><a href="dxf2MetaDataExport.action">$i18n.getString( "metadata_export" ) </a></li>
<li><a href="displayDataValueExportForm.action">$i18n.getString( "data_export" ) </a></li>
+ <li><a href="displayEventExportForm.action">$i18n.getString( "event_data_export" ) </a></li>
<li><a href="displayExternalExportMenu.action">$i18n.getString( "export_to_other_systems" ) </a></li>
</ul>