=== added file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/GetSectionFormAction.java' --- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/GetSectionFormAction.java 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/GetSectionFormAction.java 2011-09-23 18:11:09 +0000 @@ -0,0 +1,125 @@ +/* + * Copyright (c) 2004-2010, University of Oslo + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * * Neither the name of the HISP project nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.hisp.dhis.light.action; + +import org.hisp.dhis.dataset.DataSet; +import org.hisp.dhis.dataset.DataSetService; +import org.hisp.dhis.i18n.I18nFormat; +import org.hisp.dhis.period.Period; +import org.hisp.dhis.period.PeriodService; + +import com.opensymphony.xwork2.Action; + +public class GetSectionFormAction + implements Action +{ + // ------------------------------------------------------------------------- + // Dependencies + // ------------------------------------------------------------------------- + + private DataSetService dataSetService; + + public void setDataSetService( DataSetService dataSetService ) + { + this.dataSetService = dataSetService; + } + + private PeriodService periodService; + + public void setPeriodService( PeriodService periodService ) + { + this.periodService = periodService; + } + + private I18nFormat format; + + public void setFormat( I18nFormat format ) + { + this.format = format; + } + + // ------------------------------------------------------------------------- + // Input & Output + // ------------------------------------------------------------------------- + + private Integer organisationUnitId; + + public void setOrganisationUnitId( Integer organisationUnitId ) + { + this.organisationUnitId = organisationUnitId; + } + + public Integer getOrganisationUnitId() + { + return organisationUnitId; + } + + private Integer dataSetId; + + public void setDataSetId( Integer dataSetId ) + { + this.dataSetId = dataSetId; + } + + public Integer getDataSetId() + { + return dataSetId; + } + + private String periodId; + + public void setPeriodId( String periodId ) + { + this.periodId = periodId; + } + + public String getPeriodId() + { + return periodId; + } + + private DataSet dataSet; + + public DataSet getDataSet() + { + return dataSet; + } + + // ------------------------------------------------------------------------- + // Action Implementation + // ------------------------------------------------------------------------- + + @Override + public String execute() + { + Period period = new Period( String.valueOf( periodId ) ); + dataSet = dataSetService.getDataSet( dataSetId ); + + return SUCCESS; + } +} === 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 2011-09-23 15:49:07 +0000 +++ dhis-2/dhis-web/dhis-web-light/src/main/resources/META-INF/dhis/beans.xml 2011-09-23 18:11:09 +0000 @@ -18,6 +18,11 @@ + + + + + === modified file 'dhis-2/dhis-web/dhis-web-light/src/main/resources/struts.xml' --- dhis-2/dhis-web/dhis-web-light/src/main/resources/struts.xml 2011-09-23 13:11:20 +0000 +++ dhis-2/dhis-web/dhis-web-light/src/main/resources/struts.xml 2011-09-23 18:11:09 +0000 @@ -27,7 +27,7 @@ /dhis-web-light/selectPeriod.vm - + /dhis-web-light/main.vm /dhis-web-light/dataEntry.vm === modified file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/dataEntry.vm' --- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/dataEntry.vm 2011-09-23 13:11:20 +0000 +++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/dataEntry.vm 2011-09-23 18:11:09 +0000 @@ -1,37 +1,24 @@ -

Immunization

+

$dataSet.name

-
-

BCG doses given

-

-
-
-
-
-

-
- -
-

Fully Immunized child

-

-
-
-
-
-

-
- -
-

LLITN given at Penta3

-

-
-
-
-
-

-
+#foreach( $section in $dataSet.sections ) +
+

$section.name

+

+ #foreach( $dataElement in $section.dataElements) + #if( $section.categoryCombo.name == "default" ) +
+ #else + #foreach( $optionCombo in $section.categoryCombo.optionCombos ) +
+ #end + #end + #end +

+
+#end

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/style/light.css' --- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/style/light.css 2011-09-23 15:41:35 +0000 +++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/style/light.css 2011-09-23 18:11:09 +0000 @@ -454,7 +454,7 @@ body div.header-box p { font-size: 0.6em; - border: 1px solid #D8D8D8; + border: 1px solid #C8DBEA; width: 92%; margin: 0 auto 0.6em auto; padding: 0.4em 0.4em; @@ -468,8 +468,8 @@ width: 92%; margin: 0em auto; padding: 0.3em 0.3em; - background-color: #0038E1; - color: white; + background-color: #CBDDEB; + color: #39547D; } /*