dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #20148
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 9077: local vn - Added more authorities and minor fixed in GUI.
------------------------------------------------------------
revno: 9077
committer: Hieu <hieu.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2012-11-19 11:33:42 +0700
message:
local vn - Added more authorities and minor fixed in GUI.
removed:
local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/javascript/exportReports.js
modified:
local/vn/dhis-web-spreadsheet-reporting/src/main/resources/struts.xml
local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/menu.vm
local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/exportReports.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/vn/dhis-web-spreadsheet-reporting/src/main/resources/struts.xml'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/resources/struts.xml 2012-11-16 11:04:48 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/resources/struts.xml 2012-11-19 04:33:42 +0000
@@ -17,7 +17,8 @@
<action name="administration" class="org.hisp.dhis.reportsheet.action.NoAction">
<result name="success" type="velocity">/main.vm</result>
<param name="page">/dhis-web-spreadsheet-reporting/viewAdministrator.vm</param>
- <param name="menu">/dhis-web-spreadsheet-reporting/menu.vm</param>
+ <param name="menu">/dhis-web-spreadsheet-reporting/menu.vm</param>
+ <param name="requiredAuthorities">F_EXCEL_REPORT_ADMINISTRATION</param>
</action>
<action name="downloadFile"
@@ -205,6 +206,7 @@
<param name="menu">/dhis-web-spreadsheet-reporting/menu.vm</param>
<param name="javascripts">javascript/category.ajax.js,javascript/categoryOptionGroupOrder.js</param>
<param name="stylesheets">style/basic.css,style/style.css</param>
+ <param name="requiredAuthorities">F_EXCEL_CATEGORY_OPTION_GROUP_ORDER_MANAGEMENT</param>
</action>
<action name="listCategoryOptionGroupOrderForImportReport"
@@ -350,6 +352,7 @@
<param name="menu">/dhis-web-spreadsheet-reporting/menu.vm</param>
<param name="javascripts">javascript/dataElementGroupOrder.js</param>
<param name="stylesheets">style/basic.css,style/style.css</param>
+ <param name="requiredAuthorities">F_EXCEL_DATAELEMENT_GROUP_ORDER_MANAGEMENT</param>
</action>
<action name="listDataElementGroupOrderForImportReport"
@@ -468,6 +471,7 @@
<param name="page">/dhis-web-spreadsheet-reporting/updateAttributeValueGroupOrderForReportForm.vm</param>
<param name="menu">/dhis-web-spreadsheet-reporting/menu.vm</param>
<param name="stylesheets">style/basic.css,style/style.css</param>
+ <param name="requiredAuthorities">F_EXCEL_ATTRIBUTE_VALUE_GROUP_ORDER_MANAGEMENT</param>
</action>
<action name="validateAttributeValueGroupOrder"
@@ -550,6 +554,7 @@
<result name="success" type="velocity">/main.vm</result>
<param name="page">/dhis-web-spreadsheet-reporting/organisationUnitGroupListingReport.vm</param>
<param name="menu">/dhis-web-spreadsheet-reporting/menu.vm</param>
+ <param name="requiredAuthorities">F_EXCEL_ORG_UNIT_GROUP_LISTING_MANAGEMENT</param>
</action>
<action name="updateOrgUnitGroupListingReport"
@@ -563,6 +568,7 @@
<result name="success" type="velocity">/main.vm</result>
<param name="page">/dhis-web-spreadsheet-reporting/organisationUnitAtLevels.vm</param>
<param name="menu">/dhis-web-spreadsheet-reporting/menu.vm</param>
+ <param name="requiredAuthorities">F_EXCEL_ORG_UNIT_LEVEL_MANAGEMENT</param>
</action>
<action name="updateOrganisationUnitGroupAtLevel"
@@ -595,6 +601,7 @@
<result name="success" type="velocity">/main.vm</result>
<param name="page">/dhis-web-spreadsheet-reporting/exportReportUserRoles.vm</param>
<param name="menu">/dhis-web-spreadsheet-reporting/menu.vm</param>
+ <param name="requiredAuthorities">F_EXCEL_REPORT_ASSIGN_USER_ROLE</param>
</action>
<action name="updateExportReportUserRole"
@@ -1338,6 +1345,7 @@
<param name="stylesheets">
style/style.css,
style/previewStyle.css</param>
+ <param name="requiredAuthorities">F_EXCEL_IMPORT_DATA</param>
</action>
<action name="getPeriodsByImportReport"
@@ -1441,7 +1449,8 @@
class="org.hisp.dhis.reportsheet.exportreport.action.GetExportReportAction">
<result name="success" type="velocity">/main.vm</result>
<param name="page">/dhis-web-spreadsheet-reporting/periodcolumns.vm</param>
- <param name="menu">/dhis-web-spreadsheet-reporting/menu.vm</param>
+ <param name="menu">/dhis-web-spreadsheet-reporting/menu.vm</param>
+ <param name="requiredAuthorities">F_EXCEL_PERIOD_COLUMN_LISTING_MANAGEMENT</param>
</action>
<action name="savePeriodColumn"
=== removed file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/javascript/exportReports.js'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/javascript/exportReports.js 2012-11-16 11:04:48 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/javascript/exportReports.js 1970-01-01 00:00:00 +0000
@@ -1,138 +0,0 @@
-function checkPermission( reportId, url )
-{
- jQuery.get( 'checkPermission.action', { id: reportId }, function( json )
- {
- if ( json.response == "error" || json.message != "granted" ) {
- showErrorMessage( json.message, 10000 );
- return;
- }
-
- window.location = 'openDefineAssociationsForm.action?exportReportId=' + reportId;
- } );
-}
-
-function openDefineAssociationsForm( reportId )
-{
- if ( $auth.hasAccess( "dhis-web-spreadsheet-reporting", "openDefineAssociationsForm" ) )
- {
- checkPermission( reportId, 'openDefineAssociationsForm.action?exportReportId=' );
- } else {
- showErrorMessage( '$i18n.getString( 'access_denied' )' );
- }
-}
-
-function openExportReportUserRole( reportId )
-{
- if ( $auth.hasAccess( "dhis-web-spreadsheet-reporting", "openExportReportUserRole" ) )
- {
- checkPermission( reportId, 'openExportReportUserRole.action?id=' );
- } else {
- showErrorMessage( '$i18n.getString( 'access_denied' )' );
- }
-}
-
-function updateExportReportForm( reportId )
-{
- if ( $auth.hasAccess( "dhis-web-spreadsheet-reporting", "updateExportReportForm" ) )
- {
- checkPermission( reportId, 'updateExportReportForm.action?id=' );
- } else {
- showErrorMessage( '$i18n.getString( 'access_denied' )' );
- }
-}
-
-function removeReport( reportId, reportName )
-{
- if ( $auth.hasAccess( "dhis-web-spreadsheet-reporting", "deleteExportReport" ) )
- {
- jQuery.get( 'checkPermission.action', { id: reportId }, function( json )
- {
- if ( json.response == "error" || json.message != "granted" ) {
- showErrorMessage( json.message, 10000 );
- return;
- }
-
- removeItem( reportId, reportName, '$i18n.getString( 'confirm_delete' )', 'deleteExportReport.action' );
- } );
- } else {
- showErrorMessage( '$i18n.getString( 'access_denied' )' );
- }
-}
-
-function listExportItemAction( reportId )
-{
- if ( $auth.hasAccess( "dhis-web-spreadsheet-reporting", "listExportItemAction" ) )
- {
- checkPermission( reportId, 'listExportItemAction.action?exportReportId=' );
- } else {
- showErrorMessage( '$i18n.getString( 'access_denied' )' );
- }
-}
-
-function openUpdateOrgUnitGroupListingReport( reportId )
-{
- if ( $auth.hasAccess( "dhis-web-spreadsheet-reporting", "openUpdateOrgUnitGroupListingReport" ) )
- {
- jQuery.get( 'checkPermission.action', { id: reportId }, function( json )
- {
- if ( json.response == "error" || json.message != "granted" ) {
- showErrorMessage( json.message, 10000 );
- return;
- }
-
- window.location = 'openUpdateOrgUnitGroupListingReport.action?id=' + reportId;
- } );
- } else {
- showErrorMessage( '$i18n.getString( 'access_denied' )' );
- }
-}
-
-function organisationUnitAtLevels( reportId )
-{
- if ( $auth.hasAccess( "dhis-web-spreadsheet-reporting", "organisationUnitAtLevels" ) )
- {
- checkPermission( reportId, 'organisationUnitAtLevels.action?id=' );
- } else {
- showErrorMessage( '$i18n.getString( 'access_denied' )' );
- }
-}
-
-function listAttributeValueGroupOrderForExportReport( reportId )
-{
- if ( $auth.hasAccess( "dhis-web-spreadsheet-reporting", "listAttributeValueGroupOrderForExportReport" ) )
- {
- checkPermission( reportId, 'listAttributeValueGroupOrderForExportReport.action?id=' );
- } else {
- showErrorMessage( '$i18n.getString( 'access_denied' )' );
- }
-}
-
-function listDataElementGroupOrderForExportReport( reportId )
-{
- if ( $auth.hasAccess( "dhis-web-spreadsheet-reporting", "listDataElementGroupOrderForExportReport" ) )
- {
- checkPermission( reportId, 'listDataElementGroupOrderForExportReport.action?id=' );
- } else {
- showErrorMessage( '$i18n.getString( 'access_denied' )' );
- }
-}
-
-function listCategoryOptionGroupOrderForExportReport( reportId )
-{
- if ( $auth.hasAccess( "dhis-web-spreadsheet-reporting", "listCategoryOptionGroupOrderForExportReport" ) )
- {
- checkPermission( reportId, 'listCategoryOptionGroupOrderForExportReport.action?id=' );
- } else {
- showErrorMessage( '$i18n.getString( 'access_denied' )' );
- }
-}
-
-function periodColumns( reportId )
-{
- if ( $auth.hasAccess( "dhis-web-spreadsheet-reporting", "periodColumns" ) )
- {
- checkPermission( reportId, 'periodColumns.action?id=' );
- } else {
- showErrorMessage( '$i18n.getString( 'access_denied' )' );
- }
-}
\ No newline at end of file
=== modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/menu.vm'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/menu.vm 2011-07-28 09:50:39 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/menu.vm 2012-11-19 04:33:42 +0000
@@ -1,4 +1,7 @@
<h2><a href="administration.action">$i18n.getString( "administration" ) </a></h2>
+<ul>
+ <li><a href="listAllExportReport.action">$i18n.getString( "design_export_reports" ) </a></li>
+</ul>
<h2><a href="selectExportReportParam.action">$i18n.getString( "generate_report" ) </a></h2>
<ul>
@@ -9,6 +12,10 @@
<li><a href="selectAdvancedExportForm.action">$i18n.getString( "generate_advanced_report" ) </a></li>
<li><a href="dataSetCompletedReports.action">$i18n.getString( "dataset_completed_report" ) </a></li>
-->
+</ul>
+
+<h2><a href="getImportingParams.action">$i18n.getString( "importing" ) </a></h2>
+<ul>
<li><a href="getImportingParams.action">$i18n.getString( "import" ) </a></li>
</ul>
@@ -17,5 +24,4 @@
var i18n_name = '$encoder.jsEncode( $i18n.getString( "name" ) )';
var i18n_size = '$encoder.jsEncode( $i18n.getString( "size" ) )';
var i18n_create_date = '$encoder.jsEncode( $i18n.getString( "create_date" ) )';
-
</script>
=== modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/exportReports.vm'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/exportReports.vm 2012-11-16 11:04:48 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/report/exportReports.vm 2012-11-19 04:33:42 +0000
@@ -1,4 +1,3 @@
-<script type="text/javascript" src="exportReports.js"></script>
<script type="text/javascript">
jQuery(document).ready(function(){
tableSorter( 'listTable' );
@@ -13,7 +12,7 @@
</td>
<td align="right">
<input type="button" onclick="window.location = 'addExportReportForm.action'" value="$i18n.getString('add')" style="width:100px"/>
- <input type="button" value="$i18n.getString( 'cancel' )" onclick="window.location='administration.action'" style="width:100px"/>
+ <!--input type="button" value="$i18n.getString( 'cancel' )" onclick="window.location='administration.action'" style="width:100px"/-->
</td>
</tr>
</table>
@@ -65,4 +64,146 @@
</tr>
#end
</tbody>
-</table>
\ No newline at end of file
+</table>
+
+<script type="text/javascript">
+
+ function checkPermission( reportId, url )
+ {
+ jQuery.get( 'checkPermission.action', { id: reportId }, function( json )
+ {
+ if ( json.response == "error" || json.message != "granted" ) {
+ showErrorMessage( json.message, 10000 );
+ return;
+ }
+
+ window.location = url + reportId;
+ } );
+ }
+
+ function openDefineAssociationsForm( reportId )
+ {
+ if ( $auth.hasAccess( "dhis-web-spreadsheet-reporting", "openDefineAssociationsForm" ) )
+ {
+ checkPermission( reportId, 'openDefineAssociationsForm.action?exportReportId=' );
+ } else {
+ showErrorMessage( '$i18n.getString( "access_denied" )' );
+ }
+ }
+
+ function openExportReportUserRole( reportId )
+ {
+ if ( $auth.hasAccess( "dhis-web-spreadsheet-reporting", "openExportReportUserRole" ) )
+ {
+ checkPermission( reportId, 'openExportReportUserRole.action?id=' );
+ } else {
+ showErrorMessage( '$i18n.getString( "access_denied" )' );
+ }
+ }
+
+ function updateExportReportForm( reportId )
+ {
+ if ( $auth.hasAccess( "dhis-web-spreadsheet-reporting", "updateExportReportForm" ) )
+ {
+ checkPermission( reportId, 'updateExportReportForm.action?id=' );
+ } else {
+ showErrorMessage( '$i18n.getString( "access_denied" )' );
+ }
+ }
+
+ function removeReport( reportId, reportName )
+ {
+ if ( $auth.hasAccess( "dhis-web-spreadsheet-reporting", "deleteExportReport" ) )
+ {
+ jQuery.get( 'checkPermission.action', { id: reportId }, function( json )
+ {
+ if ( json.response == "error" || json.message != "granted" ) {
+ showErrorMessage( json.message, 10000 );
+ return;
+ }
+
+ removeItem( reportId, reportName, '$i18n.getString( "confirm_delete" )', 'deleteExportReport.action' );
+ } );
+ } else {
+ showErrorMessage( '$i18n.getString( "access_denied" )' );
+ }
+ }
+
+ function listExportItemAction( reportId )
+ {
+ if ( $auth.hasAccess( "dhis-web-spreadsheet-reporting", "listExportItemAction" ) )
+ {
+ checkPermission( reportId, 'listExportItemAction.action?exportReportId=' );
+ } else {
+ showErrorMessage( '$i18n.getString( "access_denied" )' );
+ }
+ }
+
+ function openUpdateOrgUnitGroupListingReport( reportId )
+ {
+ if ( $auth.hasAccess( "dhis-web-spreadsheet-reporting", "openUpdateOrgUnitGroupListingReport" ) )
+ {
+ jQuery.get( 'checkPermission.action', { id: reportId }, function( json )
+ {
+ if ( json.response == "error" || json.message != "granted" ) {
+ showErrorMessage( json.message, 10000 );
+ return;
+ }
+
+ window.location = 'openUpdateOrgUnitGroupListingReport.action?id=' + reportId;
+ } );
+ } else {
+ showErrorMessage( '$i18n.getString( "access_denied" )' );
+ }
+ }
+
+ function organisationUnitAtLevels( reportId )
+ {
+ if ( $auth.hasAccess( "dhis-web-spreadsheet-reporting", "organisationUnitAtLevels" ) )
+ {
+ checkPermission( reportId, 'organisationUnitAtLevels.action?id=' );
+ } else {
+ showErrorMessage( '$i18n.getString( "access_denied" )' );
+ }
+ }
+
+ function listAttributeValueGroupOrderForExportReport( reportId )
+ {
+ if ( $auth.hasAccess( "dhis-web-spreadsheet-reporting", "listAttributeValueGroupOrderForExportReport" ) )
+ {
+ checkPermission( reportId, 'listAttributeValueGroupOrderForExportReport.action?id=' );
+ } else {
+ showErrorMessage( '$i18n.getString( "access_denied" )' );
+ }
+ }
+
+ function listDataElementGroupOrderForExportReport( reportId )
+ {
+ if ( $auth.hasAccess( "dhis-web-spreadsheet-reporting", "listDataElementGroupOrderForExportReport" ) )
+ {
+ checkPermission( reportId, 'listDataElementGroupOrderForExportReport.action?id=' );
+ } else {
+ showErrorMessage( '$i18n.getString( "access_denied" )' );
+ }
+ }
+
+ function listCategoryOptionGroupOrderForExportReport( reportId )
+ {
+ if ( $auth.hasAccess( "dhis-web-spreadsheet-reporting", "listCategoryOptionGroupOrderForExportReport" ) )
+ {
+ checkPermission( reportId, 'listCategoryOptionGroupOrderForExportReport.action?id=' );
+ } else {
+ showErrorMessage( '$i18n.getString( "access_denied" )' );
+ }
+ }
+
+ function periodColumns( reportId )
+ {
+ if ( $auth.hasAccess( "dhis-web-spreadsheet-reporting", "periodColumns" ) )
+ {
+ checkPermission( reportId, 'periodColumns.action?id=' );
+ } else {
+ showErrorMessage( '$i18n.getString( "access_denied" )' );
+ }
+ }
+</script>
\ No newline at end of file