dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #26262
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13010: CCEM Import CSV file
------------------------------------------------------------
revno: 13010
committer: Samta Bajpayee<samta-bajpayee@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-11-25 07:09:17 +0000
message:
CCEM Import CSV file
added:
local/in/dhis-web-maintenance-ccem/src/main/webapp/dhis-web-maintenance-ccem/importDataForm.vm
local/in/dhis-web-maintenance-ccem/src/main/webapp/dhis-web-maintenance-ccem/javascript/importData.js
modified:
local/in/dhis-web-maintenance-ccem/pom.xml
local/in/dhis-web-maintenance-ccem/src/main/resources/org/hisp/dhis/ccem/i18n_module.properties
local/in/dhis-web-maintenance-ccem/src/main/resources/struts.xml
local/in/dhis-web-maintenance-ccem/src/main/webapp/dhis-web-maintenance-ccem/menu.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 'local/in/dhis-web-maintenance-ccem/pom.xml'
--- local/in/dhis-web-maintenance-ccem/pom.xml 2013-10-18 05:57:53 +0000
+++ local/in/dhis-web-maintenance-ccem/pom.xml 2013-11-25 07:09:17 +0000
@@ -50,11 +50,11 @@
<artifactId>dhis-web-commons-resources</artifactId>
<type>war</type>
</dependency>
- <dependency>
+ <!--<dependency>
<groupId>org.hisp.dhis</groupId>
<artifactId>dhis-service-aggregationengine-default</artifactId>
<version>${project.version}</version>
- </dependency>
+ </dependency>-->
<dependency>
<groupId>org.hisp.dhis</groupId>
<artifactId>dhis-support-external</artifactId>
@@ -80,12 +80,17 @@
<artifactId>jxl</artifactId>
</dependency>
- <dependency>
- <groupId>ar.com.fdvs</groupId>
- <artifactId>DynamicJasper</artifactId>
- <version>4.0.0</version>
+ <dependency>
+ <groupId>ar.com.fdvs</groupId>
+ <artifactId>DynamicJasper</artifactId>
+ <version>4.0.0</version>
</dependency>
-
+
+ <dependency>
+ <groupId>net.sf.opencsv</groupId>
+ <artifactId>opencsv</artifactId>
+ <version>2.3</version>
+ </dependency>
</dependencies>
<properties>
<rootDir>../../</rootDir>
=== modified file 'local/in/dhis-web-maintenance-ccem/src/main/resources/org/hisp/dhis/ccem/i18n_module.properties'
--- local/in/dhis-web-maintenance-ccem/src/main/resources/org/hisp/dhis/ccem/i18n_module.properties 2013-10-18 05:57:53 +0000
+++ local/in/dhis-web-maintenance-ccem/src/main/resources/org/hisp/dhis/ccem/i18n_module.properties 2013-11-25 07:09:17 +0000
@@ -162,3 +162,5 @@
transfer_facility_data = Transfer facility data
option_set = Option Set
+import_export_data = Import / Export Data
+import_data = Import Data
=== modified file 'local/in/dhis-web-maintenance-ccem/src/main/resources/struts.xml'
--- local/in/dhis-web-maintenance-ccem/src/main/resources/struts.xml 2013-09-30 12:17:15 +0000
+++ local/in/dhis-web-maintenance-ccem/src/main/resources/struts.xml 2013-11-25 07:09:17 +0000
@@ -690,5 +690,12 @@
<param name="requiredAuthorities">F_TRANSFER_FACILITY_DATA</param>
</action>
+ <!-- Import ColdChain Data -->
+ <action name="importDataForm" class="org.hisp.dhis.ccem.action.NoAction">
+ <result name="success" type="velocity">/main.vm</result>
+ <param name="page">/dhis-web-maintenance-ccem/importDataForm.vm</param>
+ <param name="menu">/dhis-web-maintenance-ccem/menu.vm</param>
+ </action>
+
</package>
</struts>
\ No newline at end of file
=== added file 'local/in/dhis-web-maintenance-ccem/src/main/webapp/dhis-web-maintenance-ccem/importDataForm.vm'
--- local/in/dhis-web-maintenance-ccem/src/main/webapp/dhis-web-maintenance-ccem/importDataForm.vm 1970-01-01 00:00:00 +0000
+++ local/in/dhis-web-maintenance-ccem/src/main/webapp/dhis-web-maintenance-ccem/importDataForm.vm 2013-11-25 07:09:17 +0000
@@ -0,0 +1,48 @@
+<script >
+function Checkfiles()
+{
+ var fup = document.getElementById('importData');
+ var fileName = fup.value;
+ var ext = fileName.substring(fileName.lastIndexOf('.') + 1);
+ if(ext == "csv")
+ {
+ return true;
+ }
+ else
+ {
+ alert("Upload csv file only");
+ fup.focus();
+ return false;
+ }
+}
+</script>
+<h3>$i18n.getString( "Import Data" )</h3>
+<form id="dataImportForm" name="dataImportForm" method="post" enctype="multipart/form-data" action="#" onsubmit="return Checkfiles();">
+ <table style="width:60%">
+ <tr >
+ <td >
+ Upload CSV File :<br><br>
+ <input type="file" id="importData" name="importData" size="45" class="{validate:{required:true}}">
+ </td>
+ <td>
+ <div class="ui-widget-content ui-corner-all" style="padding:10px 10px 10px 30px;">
+ <b>Upload zip compress csv file for:</b><br/>
+ RefrigeratorCatalog <br/>
+ Refrigerators <br/>
+ Facility<br />
+ Coldrooms<br/>
+ AssetList<br />
+ AdministrativeHierarchy
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td class="NormalB">
+ <input type="submit" name="importReport" value="Upload Data" style="width:325px">
+ </td>
+ <td> </td>
+ </tr>
+
+ </table>
+</form>
+
=== added file 'local/in/dhis-web-maintenance-ccem/src/main/webapp/dhis-web-maintenance-ccem/javascript/importData.js'
--- local/in/dhis-web-maintenance-ccem/src/main/webapp/dhis-web-maintenance-ccem/javascript/importData.js 1970-01-01 00:00:00 +0000
+++ local/in/dhis-web-maintenance-ccem/src/main/webapp/dhis-web-maintenance-ccem/javascript/importData.js 2013-11-25 07:09:17 +0000
@@ -0,0 +1,5 @@
+
+function fileValidations()
+{
+
+}
\ No newline at end of file
=== modified file 'local/in/dhis-web-maintenance-ccem/src/main/webapp/dhis-web-maintenance-ccem/menu.vm'
--- local/in/dhis-web-maintenance-ccem/src/main/webapp/dhis-web-maintenance-ccem/menu.vm 2013-09-05 11:11:36 +0000
+++ local/in/dhis-web-maintenance-ccem/src/main/webapp/dhis-web-maintenance-ccem/menu.vm 2013-11-25 07:09:17 +0000
@@ -17,7 +17,10 @@
<ul>
<li><a href="../dhis-web-coldchain/index.action">$i18n.getString( "equipment_manager" )</a></li>
</ul>
-
+<h2>$i18n.getString( "import_export_data" )</h2>
+<ul>
+ <li><a href="importDataForm.action">$i18n.getString( "import_data" )</a></li>
+</ul>
<!--
<h2>$i18n.getString( "ccem_entry" )</h2>
<ul>