← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1542: fixed some thing in excel reporting

 

------------------------------------------------------------
revno: 1542
committer: Tran Thanh Tri <Tran Thanh Tri@compaq>
branch nick: trunk
timestamp: Thu 2010-03-04 15:29:37 +0700
message:
  fixed some thing in excel reporting
modified:
  dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/filemanager/action/ValidateUploadExcelTemplate.java
  dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/org/hisp/dhis/reportexcel/i18n_module.properties
  dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/org/hisp/dhis/reportexcel/i18n_module_vi_VN.properties
  dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/struts.xml
  dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/excelTemplateList.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-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/filemanager/action/ValidateUploadExcelTemplate.java'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/filemanager/action/ValidateUploadExcelTemplate.java	2010-03-04 05:58:44 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/filemanager/action/ValidateUploadExcelTemplate.java	2010-03-04 08:29:37 +0000
@@ -63,8 +63,8 @@
     private String uploadContentType; // The content type of the file
 
     private String uploadFileName; // The uploaded file name
-    //
-    // private String fileCaption;// The caption of the file entered by user
+  
+    private String fileCaption;// The caption of the file entered by user
 
     private String message;
 

=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/org/hisp/dhis/reportexcel/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/org/hisp/dhis/reportexcel/i18n_module.properties	2010-03-04 05:58:44 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/org/hisp/dhis/reportexcel/i18n_module.properties	2010-03-04 08:29:37 +0000
@@ -205,4 +205,5 @@
 upload_file_null			= Upload file null
 file_type_not_supported		= File type not supported
 override_confirm			= File is exist. Do you want to override ?
-ready_in_use				= File is ready in use. Can not delete !
\ No newline at end of file
+ready_in_use				= File is ready in use. Can not delete !
+free						= Free
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/org/hisp/dhis/reportexcel/i18n_module_vi_VN.properties'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/org/hisp/dhis/reportexcel/i18n_module_vi_VN.properties	2010-03-04 05:58:44 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/org/hisp/dhis/reportexcel/i18n_module_vi_VN.properties	2010-03-04 08:29:37 +0000
@@ -203,4 +203,5 @@
 update_successful           = C\u1eadp nh\u1eadt th\u00e0nh c\u00f4ng !
 download					= T\u1ea3i v\u1ec1
 override_confirm			= File template n\u00e0y \u0111\u00e3 t\u1ed3n t\u1ea1i. B\u1ea1n c\u00f3 mu\u1ed1n ghi \u0111\u00e8 hay ko ?
-ready_in_use				= File n\u00e0y \u0111ang \u0111\u01b0\u1ee3c d\u00f9ng, kh\u00f4ng th\u1ec3 x\u00f3a \u0111\u01b0\u1ee3c.
\ No newline at end of file
+ready_in_use				= File n\u00e0y \u0111ang \u0111\u01b0\u1ee3c d\u00f9ng, kh\u00f4ng th\u1ec3 x\u00f3a \u0111\u01b0\u1ee3c.
+free						= Ch\u01b0a \u0111\u01b0\u1ee3c d\u00f9ng.
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/struts.xml	2010-03-04 05:58:44 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/struts.xml	2010-03-04 08:29:37 +0000
@@ -1259,8 +1259,7 @@
 
 		<action name="uploadExcelTemplate"
 			class="org.hisp.dhis.reportexcel.filemanager.action.UploadExcelTemplateAction">
-			<result name="success" type="chain">
-				listAllExcelTemplates</result>
+			<result name="success" type="redirect">listAllExcelTemplates.action</result>
 			<param name="requiredAuthorities">F_EXCEL_REPORT_ADMINISTRATION</param>
 			<interceptor-ref name="fileUploadStack" />
 		</action>

=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/excelTemplateList.vm'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/excelTemplateList.vm	2010-03-04 05:58:44 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/excelTemplateList.vm	2010-03-04 08:29:37 +0000
@@ -1,28 +1,29 @@
 <h3>$i18n.getString('excel_template_management')</h3>
 
 <form name="uploadForm" id="uploadForm" action="uploadExcelTemplate.action" method="post" enctype="multipart/form-data">
-	<table>
+	<table width="100%">
 		<tr>
 			<td width="18%" style=" width:25% ">$i18n.getString( 'select_excel_file' ):</td>
 			<td width="82%">
-				<input type="file" id="upload" name="upload" onChange="enable('uploadButton');" />
-				<input name="uploadButton" id="uploadButton" type="submit" value="$i18n.getString( 'upload_file' )" disabled />
-			</td>   
+				<input type="file" id="upload" name="upload" onChange="enable('uploadButton');" />				
+				<input name="uploadButton" id="uploadButton" type="button" value="$i18n.getString( 'upload_file' )" onclick="validateUploadExcelTemplate()" />    
+			</td>  
+			<td></td>			
+		</tr>
+		<tr>
+			<td>
+				$i18n.getString( "filter_by_name" ): 
+			</td>
+			<td>
+				<input type="text" onkeyup="filterValues(this.value , 1)" style="width:300px"/>
+			</td>	
+			<td align=right>				
+				<input type="button" value="$i18n.getString( "cancel" )" onclick="window.location='administration.action'" style="width:100px"/>
+			</td>
 		</tr>
 	</table>
 </form>
 
-<table width="100%">
-	<tr>
-		<td>
-			$i18n.getString( "filter_by_name" ): <input type="text" onkeyup="filterValues(this.value , 1)" style="width:300px"/>
-		</td>
-		<td align=right>
-			<input type="button" value="$i18n.getString( "cancel" )" onclick="window.location='administration.action'" style="width:100px"/>
-		</td>
-	</tr>
-</table>
-
 <table width="100%" class="listTable">
 	<thead>
 		<tr>
@@ -35,9 +36,11 @@
 	#foreach($templateFileName in $mapTemplateFiles.keySet())
 		<tr #id="tr${templateFileName}" >
 			<td>$encoder.htmlEncode( $templateFileName )</td>
-			<td>$encoder.htmlEncode( $mapTemplateFiles.get($templateFileName) )</td>			
+			<td>#if($encoder.htmlEncode( $mapTemplateFiles.get($templateFileName) )=='true') $i18n.getString( 'ready_in_use' ) #else $i18n.getString( 'free' ) #end</td>			
 			<td align="left">
+				#if($encoder.htmlEncode( $mapTemplateFiles.get($templateFileName) )=='false')
 				<a href="javascript:deleteExcelTemplate('$templateFileName');" title="$i18n.getString( 'remove' )"><img src="../images/delete.png" alt="$i18n.getString( 'remove' )"></a>
+				#end
 				<a href="javascript:mode = 'edit'; openEditExcelTemplate( '$templateFileName' );" title="$i18n.getString( 'edit' )"><img src="../images/edit.png" alt="$i18n.getString( 'edit' )"></a>
 				<a href="downloadExcelTemplate.action?fileName=$templateFileName" title="$i18n.getString( 'download' )"><img src="images/download.png" alt="$i18n.getString( 'download' )"></a>
 			</td>