dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #15746
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5792: (mobile) minor changes
------------------------------------------------------------
revno: 5792
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2012-01-23 16:19:32 +0530
message:
(mobile) minor changes
modified:
dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/action/GetDataSetsAction.java
dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/action/GetPeriodsAction.java
dhis-2/dhis-web/dhis-web-light/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/dataEntryOverview.vm
dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/selectDataSet.vm
dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/selectPeriod.vm
dhis-2/dhis-web/dhis-web-light/src/test/java/org/hisp/dhis/light/dataentry/action/GetDataSetsActionTest.java
--
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-light/src/main/java/org/hisp/dhis/light/dataentry/action/GetDataSetsAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/action/GetDataSetsAction.java 2012-01-23 09:28:45 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/action/GetDataSetsAction.java 2012-01-23 10:49:32 +0000
@@ -31,6 +31,8 @@
import org.apache.commons.lang.Validate;
import org.hisp.dhis.dataset.DataSet;
import org.hisp.dhis.light.utils.FormUtils;
+import org.hisp.dhis.organisationunit.OrganisationUnit;
+import org.hisp.dhis.organisationunit.OrganisationUnitService;
import java.util.ArrayList;
import java.util.List;
@@ -45,6 +47,13 @@
// Dependencies
// -------------------------------------------------------------------------
+ private OrganisationUnitService organisationUnitService;
+
+ public void setOrganisationUnitService( OrganisationUnitService organisationUnitService )
+ {
+ this.organisationUnitService = organisationUnitService;
+ }
+
private FormUtils formUtils;
public void setFormUtils( FormUtils formUtils )
@@ -73,6 +82,13 @@
return organisationUnitId;
}
+ private OrganisationUnit organisationUnit;
+
+ public OrganisationUnit getOrganisationUnit()
+ {
+ return organisationUnit;
+ }
+
private Integer dataSetId;
public Integer getDataSetId()
@@ -98,6 +114,8 @@
dataSets = formUtils.getDataSetsForCurrentUser( organisationUnitId );
+ organisationUnit = organisationUnitService.getOrganisationUnit( organisationUnitId );
+
if ( dataSets.size() == 1 )
{
dataSetId = dataSets.get( 0 ).getId();
=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/action/GetPeriodsAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/action/GetPeriodsAction.java 2012-01-23 06:32:10 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/action/GetPeriodsAction.java 2012-01-23 10:49:32 +0000
@@ -118,6 +118,13 @@
return organisationUnitId;
}
+ private OrganisationUnit organisationUnit;
+
+ public OrganisationUnit getOrganisationUnit()
+ {
+ return organisationUnit;
+ }
+
private Integer dataSetId;
public void setDataSetId( String dataSetId )
@@ -197,7 +204,7 @@
Validate.notNull( organisationUnitId );
Validate.notNull( dataSetId );
- OrganisationUnit organisationUnit = organisationUnitService.getOrganisationUnit( organisationUnitId );
+ organisationUnit = organisationUnitService.getOrganisationUnit( organisationUnitId );
dataSet = dataSetService.getDataSet( dataSetId );
=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-light/src/main/resources/META-INF/dhis/beans.xml 2012-01-23 09:28:45 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/resources/META-INF/dhis/beans.xml 2012-01-23 10:49:32 +0000
@@ -39,6 +39,7 @@
class="org.hisp.dhis.light.dataentry.action.GetDataSetsAction"
scope="prototype">
<property name="formUtils" ref="org.hisp.dhis.light.dataentry.utils.FormUtils" />
+ <property name="organisationUnitService" ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
</bean>
<bean id="org.hisp.dhis.light.dataentry.action.GetPeriodsAction"
=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/dataEntryOverview.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/dataEntryOverview.vm 2012-01-23 06:32:10 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/dataEntryOverview.vm 2012-01-23 10:49:32 +0000
@@ -6,9 +6,9 @@
#end
<div class="header-box" align="center">
- <h3 style="text-align: left; background-color: #719953; border-color: #719953; color: white;">$dataSetName</h3>
+ <h3 style="text-align: left; background-color: #719953; border-color: #719953; color: white;">$organisationUnit.name</h3>
<p style="text-align: left;">
- $organisationUnit.name <br />
+ $dataSetName <br />
$period.name
</p>
</div>
=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/selectDataSet.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/selectDataSet.vm 2011-10-14 13:06:43 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/selectDataSet.vm 2012-01-23 10:49:32 +0000
@@ -1,5 +1,13 @@
+<div class="header-box" align="center">
+ <h3 style="text-align: left; background-color: #719953; border-color: #719953; color: white;">$organisationUnit.name</h3>
+ <p style="text-align: left;">
+
+ </p>
+</div>
+
<h2>$i18n.getString( "available_datasets" )</h2>
+
<p>
<ul>
#foreach( $dataSet in $dataSets )
=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/selectPeriod.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/selectPeriod.vm 2012-01-16 18:30:37 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/selectPeriod.vm 2012-01-23 10:49:32 +0000
@@ -1,4 +1,17 @@
+#if( $dataSet.alternativeName )
+ #set( $dataSetName = $dataSet.alternativeName )
+#else
+ #set( $dataSetName = $dataSet.name )
+#end
+
+<div class="header-box" align="center">
+ <h3 style="text-align: left; background-color: #719953; border-color: #719953; color: white;">$organisationUnit.name</h3>
+ <p style="text-align: left;">
+ $dataSetName
+ </p>
+</div>
+
<h2>$i18n.getString( "available_periods" )</h2>
<p>
=== modified file 'dhis-2/dhis-web/dhis-web-light/src/test/java/org/hisp/dhis/light/dataentry/action/GetDataSetsActionTest.java'
--- dhis-2/dhis-web/dhis-web-light/src/test/java/org/hisp/dhis/light/dataentry/action/GetDataSetsActionTest.java 2012-01-23 06:32:10 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/test/java/org/hisp/dhis/light/dataentry/action/GetDataSetsActionTest.java 2012-01-23 10:49:32 +0000
@@ -46,6 +46,7 @@
// Initializing action
getDataSetsAction.setOrganisationUnitId( 1 );
+ getDataSetsAction.setOrganisationUnitService( organisationUnitService );
getDataSetsAction.setFormUtils( formUtils );
// Populating mocks