dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #14536
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4967: Now exporting to PDF not only contains the static properties that consists the attribute values a...
------------------------------------------------------------
revno: 4967
committer: Hieu <hieu.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2011-10-17 15:38:58 +0700
message:
Now exporting to PDF not only contains the static properties that consists the attribute values assigned to Meta-data objects.
modified:
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/PDFUtils.java
dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global.properties
dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global_vi_VN.properties
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module.properties
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_vi_VN.properties
--
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-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/PDFUtils.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/PDFUtils.java 2011-09-24 11:35:11 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/PDFUtils.java 2011-10-17 08:38:58 +0000
@@ -36,6 +36,7 @@
import java.util.HashMap;
import java.util.Map;
+import org.hisp.dhis.attribute.AttributeValue;
import org.hisp.dhis.dataelement.DataElement;
import org.hisp.dhis.expression.ExpressionService;
import org.hisp.dhis.i18n.I18n;
@@ -310,10 +311,10 @@
* @param format The i18nFormat object
*
*/
- public static void printObjectFrontPage( Document document, Collection<?> objectIds, I18n i18n, I18nFormat format,
+ public static void printObjectFrontPage( Document document, Collection<?> objects, I18n i18n, I18nFormat format,
String frontPageLabel )
{
- if ( objectIds == null || objectIds.size() > 0 )
+ if ( objects == null || objects.size() > 0 )
{
String title = i18n.getString( frontPageLabel );
@@ -418,6 +419,12 @@
table.addCell( getTextCell( i18n.getString( getAggregationOperator().get( element.getAggregationOperator() ) ) ) );
}
+ for ( AttributeValue value : element.getAttributeValues() )
+ {
+ table.addCell( getItalicCell( value.getAttribute().getName() ) );
+ table.addCell( getTextCell( value.getValue() ) );
+ }
+
table.addCell( getEmptyCell( 2, 30 ) );
return table;
@@ -482,6 +489,12 @@
table.addCell( getItalicCell( i18n.getString( "denominator_formula" ) ) );
table.addCell( getTextCell( expressionService.getExpressionDescription( indicator.getDenominator() ) ) );
+ for ( AttributeValue value : indicator.getAttributeValues() )
+ {
+ table.addCell( getItalicCell( value.getAttribute().getName() ) );
+ table.addCell( getTextCell( value.getValue() ) );
+ }
+
table.addCell( getEmptyCell( 2, 30 ) );
return table;
@@ -536,6 +549,12 @@
table.addCell( getTextCell( unit.getComment() ) );
}
+ for ( AttributeValue value : unit.getAttributeValues() )
+ {
+ table.addCell( getItalicCell( value.getAttribute().getName() ) );
+ table.addCell( getTextCell( value.getValue() ) );
+ }
+
table.addCell( getEmptyCell( 2, 30 ) );
return table;
@@ -578,8 +597,7 @@
}
table.addCell( getItalicCell( i18n.getString( "last_login" ) ) );
- table.addCell( getTextCell( userCredentials.getLastLogin() != null ? format.formatDate( userCredentials
- .getLastLogin() ) : EMPTY ) );
+ table.addCell( getTextCell( userCredentials.getLastLogin() != null ? format.formatDate( userCredentials.getLastLogin() ) : EMPTY ) );
String temp = "";
@@ -607,6 +625,12 @@
table.addCell( getItalicCell( i18n.getString( "roles" ) ) );
table.addCell( getTextCell( temp ) );
+ for ( AttributeValue value : user.getAttributeValues() )
+ {
+ table.addCell( getItalicCell( value.getAttribute().getName() ) );
+ table.addCell( getTextCell( value.getValue() ) );
+ }
+
table.addCell( getEmptyCell( 2, 30 ) );
return table;
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global.properties'
--- dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global.properties 2011-10-12 13:13:14 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global.properties 2011-10-17 08:38:58 +0000
@@ -446,6 +446,7 @@
active = Active
comment = Comment
type = Type
+value_type = Value Type
actual = Actual
target = Target
percent = Percent
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global_vi_VN.properties'
--- dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global_vi_VN.properties 2011-09-14 03:44:56 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global_vi_VN.properties 2011-10-17 08:38:58 +0000
@@ -378,6 +378,7 @@
active = C\u00f3 hi\u1ec7u l\u1ef1c
comment = Ch\u00fa th\u00edch
type = Ki\u1ec3u/Lo\u1ea1i
+value_type = Lo\u1ea1i gi\u00e1 tr\u1ecb
actual = Th\u1ef1c t\u1ebf
target = M\u1ee5c ti\u00eau
percent = Ph\u1ea7n tr\u0103m
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module.properties 2011-10-06 10:47:50 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module.properties 2011-10-17 08:38:58 +0000
@@ -68,7 +68,6 @@
indicator_groups = Indicator Groups
create_new_data_element = Create new data element
domain_type = Domain Type
-value_type = Value Type
date = Date
create_new_data_element_group = Create new data element group
group_members = Group members
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_vi_VN.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_vi_VN.properties 2011-07-01 03:38:47 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_vi_VN.properties 2011-10-17 08:38:58 +0000
@@ -1,8 +1,6 @@
view_all=Xem t\u1ea5t c\u1ea3
version_status=Tr\u1ea1ng th\u00e1i phi\u00ean b\u1ea3n
version=Phi\u00ean b\u1ea3n
-value_type=Lo\u1ea1i gi\u00e1 tr\u1ecb
-value=Gi\u00e1 tr\u1ecb
validation_rules=C\u00e1c lu\u1eadt ki\u1ec3m tra
url=Li\u00ean k\u1ebft URL
updating_datadictionary_failed=L\u1ed7i do c\u1eadp nh\u1eadt t\u1eeb \u0111i\u1ec3n d\u1eef li\u1ec7u