← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1559: Mirror fix.

 

------------------------------------------------------------
revno: 1559
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: trunk
timestamp: Fri 2010-03-05 15:27:33 +0700
message:
  Mirror fix.
modified:
  dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/action/ListAllExcelItemGroupAction.java
  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/importing/action/GetImportingParamsAction.java
  dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/importing/action/UploadExcelFileAction.java
  dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/importing/action/ViewDataFlowAction.java
  dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/META-INF/dhis/beans.xml
  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/struts.xml
  dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/menu.vm
  dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/viewAdministrator.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/excelitemgroup/action/ListAllExcelItemGroupAction.java'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/action/ListAllExcelItemGroupAction.java	2010-02-22 06:15:52 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/excelitemgroup/action/ListAllExcelItemGroupAction.java	2010-03-05 08:27:33 +0000
@@ -28,7 +28,6 @@
  */
 
 import java.util.ArrayList;
-import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
 

=== 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 08:29:37 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/filemanager/action/ValidateUploadExcelTemplate.java	2010-03-05 08:27:33 +0000
@@ -64,8 +64,6 @@
 
     private String uploadFileName; // The uploaded file name
   
-    private String fileCaption;// The caption of the file entered by user
-
     private String message;
 
     private I18n i18n;

=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/importing/action/GetImportingParamsAction.java'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/importing/action/GetImportingParamsAction.java	2009-12-03 08:35:53 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/importing/action/GetImportingParamsAction.java	2010-03-05 08:27:33 +0000
@@ -31,7 +31,6 @@
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.List;
 
 import org.hisp.dhis.organisationunit.OrganisationUnit;
@@ -39,7 +38,9 @@
 import org.hisp.dhis.reportexcel.action.ActionSupport;
 import org.hisp.dhis.reportexcel.excelitem.ExcelItemGroup;
 import org.hisp.dhis.reportexcel.excelitem.ExcelItemService;
+import org.hisp.dhis.reportexcel.excelitem.comparator.ExcelItemGroupComparator;
 import org.hisp.dhis.reportexcel.state.SelectionManager;
+import org.hisp.dhis.user.CurrentUserService;
 
 /**
  * @author Chau Thu Tran
@@ -59,6 +60,8 @@
 
     private SelectionManager selectionManager;
 
+    private CurrentUserService currentUserService;
+
     // -------------------------------------------------------------------------
     // Inputs && Outputs
     // -------------------------------------------------------------------------
@@ -76,6 +79,11 @@
         this.selectionManager = selectionManager;
     }
 
+    public void setCurrentUserService( CurrentUserService currentUserService )
+    {
+        this.currentUserService = currentUserService;
+    }
+
     public void setExcelItemService( ExcelItemService excelItemService )
     {
 
@@ -94,11 +102,6 @@
         return organisationUnit;
     }
 
-    public Collection<ExcelItemGroup> getExcelItemGroups()
-    {
-        return excelItemGroups;
-    }
-
     private File fileExcel;
 
     public File getFileExcel()
@@ -142,18 +145,7 @@
         // Load and sort ExcelItemGroups
         // ---------------------------------------------------------------------
 
-        excelItemGroups = new ArrayList<ExcelItemGroup>( excelItemService
-            .getExcelItemGroupsByOrganisationUnit( organisationUnit ) );
-
-        Collections.sort( excelItemGroups, new Comparator<ExcelItemGroup>()
-        {
-
-            @Override
-            public int compare( ExcelItemGroup arg0, ExcelItemGroup arg1 )
-            {
-                return arg0.getName().compareTo( arg1.getName() );
-            }
-        } );
+        excelItemGroups = new ArrayList<ExcelItemGroup>( excelItemService.getExcelItemGroups( organisationUnit ) );
 
         return SUCCESS;
     }

=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/importing/action/UploadExcelFileAction.java'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/importing/action/UploadExcelFileAction.java	2009-11-13 10:28:52 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/importing/action/UploadExcelFileAction.java	2010-03-05 08:27:33 +0000
@@ -77,6 +77,10 @@
     {
         this.upload = upload;
     }
+    
+    // -------------------------------------------------------------------------
+    // Action implementation
+    // -------------------------------------------------------------------------
 
     public String execute()
         throws Exception

=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/importing/action/ViewDataFlowAction.java'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/importing/action/ViewDataFlowAction.java	2009-11-13 10:28:52 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/importing/action/ViewDataFlowAction.java	2010-03-05 08:27:33 +0000
@@ -29,12 +29,18 @@
 import java.io.File;
 import java.util.ArrayList;
 import java.util.Collections;
+import java.util.Set;
 
+import org.hisp.dhis.dataset.DataSet;
 import org.hisp.dhis.reportexcel.excelitem.ExcelItem;
 import org.hisp.dhis.reportexcel.excelitem.ExcelItemGroup;
 import org.hisp.dhis.reportexcel.excelitem.ExcelItemService;
 import org.hisp.dhis.reportexcel.excelitem.comparator.ExcelItemComparator;
 import org.hisp.dhis.reportexcel.state.SelectionManager;
+import org.hisp.dhis.user.CurrentUserService;
+import org.hisp.dhis.user.UserAuthorityGroup;
+import org.hisp.dhis.user.UserCredentials;
+import org.hisp.dhis.user.UserStore;
 
 import com.opensymphony.xwork2.Action;
 
@@ -111,13 +117,11 @@
         upload = new File( selectionManager.getUploadFilePath() );
 
         excelItemGroup = excelItemService.getExcelItemGroup( excelItemGroupId );
-
         excelItems = new ArrayList<ExcelItem>( excelItemGroup.getExcelItems() );
-
+ 
         Collections.sort( excelItems, new ExcelItemComparator() );
 
         return excelItemGroup.getType();
 
     }
-
 }

=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/META-INF/dhis/beans.xml	2010-03-04 05:58:44 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/META-INF/dhis/beans.xml	2010-03-05 08:27:33 +0000
@@ -944,6 +944,24 @@
 			ref="org.hisp.dhis.organisationunit.OrganisationUnitGroupService" />
 	</bean>
 
+	<bean
+		id="org.hisp.dhis.reportexcel.excelitemgroup.action.OpenUpdateRolesAssociationAction"
+		class="org.hisp.dhis.reportexcel.excelitemgroup.action.OpenUpdateRolesAssociationAction"
+		scope="prototype">
+		<property name="excelItemService"
+			ref="org.hisp.dhis.reportexcel.excelitem.ExcelItemService" />
+		<property name="userStore" ref="org.hisp.dhis.user.UserStore" />
+	</bean>
+
+	<bean
+		id="org.hisp.dhis.reportexcel.excelitemgroup.action.UpdateRolesAssociationsAction"
+		class="org.hisp.dhis.reportexcel.excelitemgroup.action.UpdateRolesAssociationsAction"
+		scope="prototype">
+		<property name="excelItemService"
+			ref="org.hisp.dhis.reportexcel.excelitem.ExcelItemService" />
+		<property name="userStore" ref="org.hisp.dhis.user.UserStore" />
+	</bean>
+
 	<!--
 		- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 	-->
@@ -1259,8 +1277,7 @@
 		id="org.hisp.dhis.reportexcel.filemanager.action.ExcelTemplateListAction"
 		class="org.hisp.dhis.reportexcel.filemanager.action.ExcelTemplateListAction"
 		scope="prototype">
-		<property name="reportService" 
-			ref="org.hisp.dhis.reportexcel.ReportExcelService" />
+		<property name="reportService" ref="org.hisp.dhis.reportexcel.ReportExcelService" />
 		<property name="reportLocationManager"
 			ref="org.hisp.dhis.reportexcel.ReportLocationManager" />
 		<property name="selectionManager"
@@ -1291,16 +1308,17 @@
 		class="org.hisp.dhis.reportexcel.filemanager.action.RenameExcelTemplateAction"
 		scope="prototype">
 		<property name="systemSettingManager" ref="org.hisp.dhis.options.SystemSettingManager" />
-		<property name="selectionManager" ref="org.hisp.dhis.reportexcel.state.SelectionManager" />
+		<property name="selectionManager"
+			ref="org.hisp.dhis.reportexcel.state.SelectionManager" />
 	</bean>
-	
+
 	<bean
 		id="org.hisp.dhis.reportexcel.filemanager.action.UpdateReportExcelByTemplateAction"
 		class="org.hisp.dhis.reportexcel.filemanager.action.UpdateReportExcelByTemplateAction"
 		scope="prototype">
 		<property name="reportService" ref="org.hisp.dhis.reportexcel.ReportExcelService" />
 	</bean>
-	
+
 	<bean
 		id="org.hisp.dhis.reportexcel.filemanager.action.DownloadExcelTemplateFileAction"
 		class="org.hisp.dhis.reportexcel.filemanager.action.DownloadExcelTemplateFileAction"
@@ -1310,7 +1328,7 @@
 		<property name="selectionManager"
 			ref="org.hisp.dhis.reportexcel.state.SelectionManager" />
 	</bean>
-	
+
 	<bean
 		id="org.hisp.dhis.reportexcel.filemanager.action.ValidateUploadExcelTemplate"
 		class="org.hisp.dhis.reportexcel.filemanager.action.ValidateUploadExcelTemplate"

=== 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 08:29:37 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/org/hisp/dhis/reportexcel/i18n_module.properties	2010-03-05 08:27:33 +0000
@@ -204,6 +204,14 @@
 download					= Download
 upload_file_null			= Upload file null
 file_type_not_supported		= File type not supported
+association_roles			= Association roles
+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 !
-free						= Free
\ No newline at end of file
+free						= Free
+intro_configuration         = Set a path to the directory where the excel template files are stored.
+intro_reports 				= Create reports and its items and to assign the organisation units or the organisation unit groups to the reports.
+intro_data_status			= View the data entry status to know about data  entered, reports finished or not finished yet with data entry.
+intro_clean_up				= Clean files from temporary directory.
+intro_excel_item			= Create template from Excel file in order to import data into database.
+intro_excel_template_management = Manage Template Excel files.

=== 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 08:29:37 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/struts.xml	2010-03-05 08:27:33 +0000
@@ -31,7 +31,6 @@
 			</result>
 		</action>
 
-
 		<!-- SYSTEM CONFIGURATION ACTION -->
 
 		<action name="getConfiguration"
@@ -1046,6 +1045,15 @@
 
 		<!-- IMPORT DATA -->
 
+		<action name="validateUploadExcelImport"
+			class="org.hisp.dhis.reportexcel.filemanager.action.ValidateUploadExcelTemplate">
+			<interceptor-ref name="fileUploadStack" />
+			<result name="success" type="velocity-xml">
+				/dhis-web-excel-reporting/responseSuccess.vm</result>
+			<result name="error" type="velocity-xml">
+				/dhis-web-excel-reporting/responseError.vm</result>
+		</action>
+		
 		<action name="uploadExcelImport"
 			class="org.hisp.dhis.reportexcel.importing.action.UploadExcelFileAction">
 			<result name="success" type="redirect">getImportingParams.action
@@ -1061,7 +1069,7 @@
 			<param name="menu">/dhis-web-excel-reporting/menuWithTree.vm</param>
 			<param name="menuTreeHeight">220</param>
 			<param name="javascripts">../dhis-web-commons/ouwt/ouwt.js,javascript/export.js,
-				javascript/commons.js,javascript/imports.js</param>
+				javascript/commons.js,javascript/imports.js, javascript/ajaxfileupload.js</param>
 			<param name="stylesheets">style/style.css</param>
 		</action>
 

=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/menu.vm'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/menu.vm	2010-02-24 17:47:59 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/menu.vm	2010-03-05 08:27:33 +0000
@@ -4,10 +4,10 @@
 <ul>
 	<li><a href="selectExportReportParam.action">$i18n.getString( "generate_report" )&nbsp;</a></li>
 	<li><a href="selectAdvancedExportForm.action">$i18n.getString( "generate_advanced_report" )&nbsp;</a></li>
- 	<li><a href="getImportingParams.action">$i18n.getString( "import" )&nbsp;</a></li>
+ 	<li><a href="openIndividualReportExcel.action">$i18n.getString( "individual_report" )</a></li>
 	<li><a href="selectDataSetCompletedReport.action">$i18n.getString( "dataset_completed_report" )&nbsp;</a></li>	
 	<li><a href="viewDataEntryStatus.action">$i18n.getString( "data_status" )</a></li>	
-	<li><a href="openIndividualReportExcel.action">$i18n.getString( "individual_report" )</a></li>
+	<li><a href="getImportingParams.action">$i18n.getString( "import" )&nbsp;</a></li>
 </ul>
 
 <script type="text/javascript">

=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/viewAdministrator.vm'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/viewAdministrator.vm	2010-01-26 09:04:04 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/viewAdministrator.vm	2010-03-05 08:27:33 +0000
@@ -1,14 +1,14 @@
-<span id="message" style="top:100px;right:5px;position:fixed;width:200px;z-index:10002" onclick="hideById(this.id);"></span>
-<h3>$i18n.getString( "administration" )</h3>
-<ul>
-	<li><a href="getConfiguration.action">$i18n.getString( "configuration" )&nbsp;</a></li>		
-	<li><a href="listReportExcel.action">$i18n.getString( "reports" )&nbsp;</a></li>		
-	<li><a href="listDataEntryStatus.action">$i18n.getString( "data_status" )&nbsp;</a></li>
-	<li><a href="javascript: cleanUp();">$i18n.getString( "clean_up" )&nbsp;</a></li>
-	<li><a href="listAllExcelItemGroup.action">$i18n.getString( "excel_item" )&nbsp;</a></li>
-	<li><a href="listAllExcelTemplates.action">$i18n.getString( "excel_template_management" )&nbsp;</a></li>
+<h3>$i18n.getString( "administration" )</h3>
+
+<ul class="introList">
+    #introListItem( "getConfiguration.action" "configuration" )
+    #introListItem( "listReportExcel.action" "reports" )
+    #introListItem( "listDataEntryStatus.action" "data_status" )
+	#introListItem( "listAllExcelTemplates.action" "excel_item" )
+    #introListItem( "listAllExcelTemplates.action" "excel_template_management" )
+	#introListItem( "javascript: cleanUp();" "clean_up" )
+
 </ul>
-
 <script>
 	function go(action){
 		window.location = action;
@@ -23,4 +23,5 @@
 	function cleanUpCompleted( xmlObject ){	
 		setMessage(xmlObject.firstChild.nodeValue);
 	}
-</script>
\ No newline at end of file
+</script>
+<span id="message" style="top:100px;right:5px;position:fixed;width:200px;z-index:10002" onclick="hideById(this.id);"></span>