dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #12972
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4067: Add Sort Button for Patient Attribute Group Management List.
------------------------------------------------------------
revno: 4067
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2011-07-05 12:23:57 +0700
message:
Add Sort Button for Patient Attribute Group Management List.
added:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/comparator/PatientAttributeGroupSortOrderComparator.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattributegroup/SavePatientAttributeGroupSortOrderAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/sortPatientAttributeGroupForm.vm
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientAttributeGroup.java
dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/PatientAttributeGroup.hbm.xml
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/GetPatientAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/ShowAddPatientFormAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattributegroup/GetPatientAttributeGroupListAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientAttributeGroup.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-api/src/main/java/org/hisp/dhis/patient/PatientAttributeGroup.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientAttributeGroup.java 2011-05-05 21:14:56 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientAttributeGroup.java 2011-07-05 05:23:57 +0000
@@ -48,6 +48,8 @@
private String description;
+ private Integer sortOrder;
+
private List<PatientAttribute> attributes = new ArrayList<PatientAttribute>();
// -------------------------------------------------------------------------
@@ -141,5 +143,13 @@
this.attributes = attributes;
}
+ public Integer getSortOrder()
+ {
+ return sortOrder;
+ }
+ public void setSortOrder( Integer sortOrder )
+ {
+ this.sortOrder = sortOrder;
+ }
}
=== added file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/comparator/PatientAttributeGroupSortOrderComparator.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/comparator/PatientAttributeGroupSortOrderComparator.java 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/comparator/PatientAttributeGroupSortOrderComparator.java 2011-07-05 05:23:57 +0000
@@ -0,0 +1,55 @@
+package org.hisp.dhis.patient.comparator;
+
+/*
+ * 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.
+ */
+
+import java.util.Comparator;
+
+import org.hisp.dhis.patient.PatientAttributeGroup;
+
+/**
+ * @author Chau Thu Tran
+ * @version $Id$
+ */
+public class PatientAttributeGroupSortOrderComparator
+ implements Comparator<PatientAttributeGroup>
+{
+ public int compare( PatientAttributeGroup patientAttributeGroup0, PatientAttributeGroup patientAttributeGroup1 )
+ {
+ if ( patientAttributeGroup0.getSortOrder() == null || patientAttributeGroup0.getSortOrder() == 0 )
+ {
+ return patientAttributeGroup0.getName().compareTo( patientAttributeGroup1.getName() );
+ }
+
+ if ( patientAttributeGroup1.getSortOrder() == null || patientAttributeGroup1.getSortOrder() == 0 )
+ {
+ return patientAttributeGroup0.getName().compareTo( patientAttributeGroup1.getName() );
+ }
+
+ return patientAttributeGroup0.getSortOrder() - patientAttributeGroup1.getSortOrder();
+ }
+}
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/PatientAttributeGroup.hbm.xml'
--- dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/PatientAttributeGroup.hbm.xml 2011-05-28 21:25:46 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/PatientAttributeGroup.hbm.xml 2011-07-05 05:23:57 +0000
@@ -13,7 +13,9 @@
<property name="name" not-null="true" unique="true" length="160" />
<property name="description" />
-
+
+ <property name="sortOrder" />
+
<list name="attributes" table="patientattributegroupmembers">
<key column="patientattributegroupid" />
<list-index column="sort_order" base="1" />
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/GetPatientAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/GetPatientAction.java 2011-05-26 03:19:50 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/GetPatientAction.java 2011-07-05 05:23:57 +0000
@@ -26,8 +26,11 @@
*/
package org.hisp.dhis.patient.action.patient;
+import java.util.ArrayList;
import java.util.Collection;
+import java.util.Collections;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import org.hisp.dhis.patient.Patient;
@@ -40,6 +43,7 @@
import org.hisp.dhis.patient.PatientIdentifierType;
import org.hisp.dhis.patient.PatientIdentifierTypeService;
import org.hisp.dhis.patient.PatientService;
+import org.hisp.dhis.patient.comparator.PatientAttributeGroupSortOrderComparator;
import org.hisp.dhis.patientattributevalue.PatientAttributeValue;
import org.hisp.dhis.patientattributevalue.PatientAttributeValueService;
import org.hisp.dhis.program.Program;
@@ -88,7 +92,7 @@
private Collection<PatientAttribute> noGroupAttributes;
- private Collection<PatientAttributeGroup> attributeGroups;
+ private List<PatientAttributeGroup> attributeGroups;
private Collection<PatientIdentifierType> identifierTypes;
@@ -174,7 +178,9 @@
noGroupAttributes = patientAttributeService.getPatientAttributesNotGroup();
- attributeGroups = patientAttributeGroupService.getAllPatientAttributeGroups();
+ attributeGroups = new ArrayList<PatientAttributeGroup>( patientAttributeGroupService
+ .getAllPatientAttributeGroups() );
+ Collections.sort( attributeGroups, new PatientAttributeGroupSortOrderComparator() );
return SUCCESS;
@@ -254,7 +260,7 @@
return noGroupAttributes;
}
- public Collection<PatientAttributeGroup> getAttributeGroups()
+ public List<PatientAttributeGroup> getAttributeGroups()
{
return attributeGroups;
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/ShowAddPatientFormAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/ShowAddPatientFormAction.java 2011-05-25 02:34:58 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/ShowAddPatientFormAction.java 2011-07-05 05:23:57 +0000
@@ -28,8 +28,11 @@
package org.hisp.dhis.patient.action.patient;
import java.text.SimpleDateFormat;
+import java.util.ArrayList;
import java.util.Collection;
+import java.util.Collections;
import java.util.Date;
+import java.util.List;
import org.hisp.dhis.organisationunit.OrganisationUnit;
import org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager;
@@ -39,6 +42,7 @@
import org.hisp.dhis.patient.PatientAttributeService;
import org.hisp.dhis.patient.PatientIdentifierType;
import org.hisp.dhis.patient.PatientIdentifierTypeService;
+import org.hisp.dhis.patient.comparator.PatientAttributeGroupSortOrderComparator;
import com.opensymphony.xwork2.Action;
@@ -87,14 +91,14 @@
private Collection<PatientAttribute> noGroupAttributes;
- private Collection<PatientAttributeGroup> attributeGroups;
+ private List<PatientAttributeGroup> attributeGroups;
private Collection<PatientIdentifierType> identifierTypes;
private OrganisationUnit organisationUnit;
private String year;
-
+
// -------------------------------------------------------------------------
// Action implementation
// -------------------------------------------------------------------------
@@ -105,15 +109,16 @@
noGroupAttributes = patientAttributeService.getPatientAttributesNotGroup();
- attributeGroups = patientAttributeGroupService.getAllPatientAttributeGroups();
+ attributeGroups = new ArrayList<PatientAttributeGroup>( patientAttributeGroupService
+ .getAllPatientAttributeGroups() );
+ Collections.sort( attributeGroups, new PatientAttributeGroupSortOrderComparator() );
organisationUnit = selectionManager.getSelectedOrganisationUnit();
-
SimpleDateFormat dataFormat = new SimpleDateFormat( "y" );
-
+
year = dataFormat.format( new Date() );
-
+
return SUCCESS;
}
@@ -126,7 +131,7 @@
return identifierTypes;
}
- public Collection<PatientAttributeGroup> getAttributeGroups()
+ public List<PatientAttributeGroup> getAttributeGroups()
{
return attributeGroups;
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattributegroup/GetPatientAttributeGroupListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattributegroup/GetPatientAttributeGroupListAction.java 2011-03-20 17:57:30 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattributegroup/GetPatientAttributeGroupListAction.java 2011-07-05 05:23:57 +0000
@@ -33,7 +33,7 @@
import org.hisp.dhis.patient.PatientAttributeGroup;
import org.hisp.dhis.patient.PatientAttributeGroupService;
-import org.hisp.dhis.patient.comparator.PatientAttributeGroupComparator;
+import org.hisp.dhis.patient.comparator.PatientAttributeGroupSortOrderComparator;
import com.opensymphony.xwork2.Action;
@@ -81,7 +81,7 @@
patientAttributeGroups = new ArrayList<PatientAttributeGroup>( patientAttributeGroupService
.getAllPatientAttributeGroups() );
- Collections.sort( patientAttributeGroups, new PatientAttributeGroupComparator() );
+ Collections.sort( patientAttributeGroups, new PatientAttributeGroupSortOrderComparator() );
return SUCCESS;
}
=== added file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattributegroup/SavePatientAttributeGroupSortOrderAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattributegroup/SavePatientAttributeGroupSortOrderAction.java 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientattributegroup/SavePatientAttributeGroupSortOrderAction.java 2011-07-05 05:23:57 +0000
@@ -0,0 +1,94 @@
+/*
+ * Copyright (c) 2004-2009, 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.patient.action.patientattributegroup;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.hisp.dhis.patient.PatientAttributeGroup;
+import org.hisp.dhis.patient.PatientAttributeGroupService;
+import org.hisp.dhis.patient.PatientAttributeService;
+import org.hisp.dhis.program.ProgramStage;
+
+import com.opensymphony.xwork2.Action;
+
+/**
+ * @author Chau Thu Tran
+ * @version $ SavePatientAttributeGroupSortOrderAction.java Jul 5, 2011 11:07:38 AM $
+ *
+ */
+public class SavePatientAttributeGroupSortOrderAction
+implements Action
+{
+ // -------------------------------------------------------------------------
+ // Dependencies
+ // -------------------------------------------------------------------------
+
+ private PatientAttributeGroupService patientAttributeGroupService;
+
+ public void setPatientAttributeGroupService( PatientAttributeGroupService patientAttributeGroupService )
+ {
+ this.patientAttributeGroupService = patientAttributeGroupService;
+ }
+
+ // -------------------------------------------------------------------------
+ // Input/Output
+ // -------------------------------------------------------------------------
+
+ private List<Integer> patientAttributeGroupIds = new ArrayList<Integer>();
+
+ public void setPatientAttributeGroupIds( List<Integer> patientAttributeGroupIds )
+ {
+ this.patientAttributeGroupIds = patientAttributeGroupIds;
+ }
+
+ // -------------------------------------------------------------------------
+ // Action implementation
+ // -------------------------------------------------------------------------
+
+ public String execute()
+ {
+ int sortOrder = 1;
+
+ List<PatientAttributeGroup> groups = new ArrayList<PatientAttributeGroup>( patientAttributeGroupIds.size() );
+
+ for ( Integer patientAttributeGroupId : patientAttributeGroupIds )
+ {
+ PatientAttributeGroup patientAttributeGroup = patientAttributeGroupService.getPatientAttributeGroup( patientAttributeGroupId );
+
+ groups.add( patientAttributeGroup );
+
+ patientAttributeGroup.setSortOrder( sortOrder++ );
+
+ patientAttributeGroupService.updatePatientAttributeGroup( patientAttributeGroup );
+ }
+
+ return SUCCESS;
+ }
+
+}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/META-INF/dhis/beans.xml 2011-06-22 02:51:13 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/META-INF/dhis/beans.xml 2011-07-05 05:23:57 +0000
@@ -918,6 +918,14 @@
</bean>
<bean
+ id="org.hisp.dhis.patient.action.patientattributegroup.SavePatientAttributeGroupSortOrderAction"
+ class="org.hisp.dhis.patient.action.patientattributegroup.SavePatientAttributeGroupSortOrderAction"
+ scope="prototype">
+ <property name="patientAttributeGroupService"
+ ref="org.hisp.dhis.patient.PatientAttributeGroupService" />
+ </bean>
+
+ <bean
id="org.hisp.dhis.patient.action.patientattributegroup.UpdatePatientAttributeGroupAction"
class="org.hisp.dhis.patient.action.patientattributegroup.UpdatePatientAttributeGroupAction"
scope="prototype">
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties 2011-06-01 09:12:50 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties 2011-07-05 05:23:57 +0000
@@ -466,4 +466,5 @@
add_new_multi_validation = Add New Multi Validation
save_success = Save successfully
configuration_xml_file_null = Configuration of folder where contains xml file is null
-there_is_no_defination_xml_file_in_user_home = There is no any definition related XML file in the user home
\ No newline at end of file
+there_is_no_defination_xml_file_in_user_home = There is no any definition related XML file in the user home
+patient_attribute_group_sort_order = Beneficiary Attribute Group Sort Order
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml 2011-06-28 04:00:08 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml 2011-07-05 05:23:57 +0000
@@ -875,6 +875,22 @@
/dhis-web-commons/ajax/jsonResponseInput.vm</result>
<param name="onExceptionReturn">plainTextError</param>
</action>
+
+ <action name="showSortPatientAttributeGroup"
+ class="org.hisp.dhis.patient.action.patientattributegroup.GetPatientAttributeGroupListAction">
+ <result name="success" type="velocity">/main.vm</result>
+ <param name="page">/dhis-web-maintenance-patient/sortPatientAttributeGroupForm.vm</param>
+ <param name="menu">/dhis-web-maintenance-patient/patientAndProgramMenu.vm</param>
+ <param name="javascripts">javascript/patientAttributeGroup.js</param>
+ <param name="stylesheets">style/basic.css</param>
+ <param name="requiredAuthorities">F_PATIENTATTRIBUTE_ADD</param>
+ </action>
+
+ <action name="savePatientAttributeGroupSortOrder"
+ class="org.hisp.dhis.patient.action.patientattributegroup.SavePatientAttributeGroupSortOrderAction">
+ <result name="success" type="redirect">patientAttributeGroup.action</result>
+ </action>
+
<!-- Patient Identifier Type -->
<action name="showAddPatientIdentifierTypeForm" class="org.hisp.dhis.patient.action.NoAction">
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientAttributeGroup.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientAttributeGroup.vm 2011-05-19 08:14:24 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientAttributeGroup.vm 2011-07-05 05:23:57 +0000
@@ -12,7 +12,10 @@
<col width="20">
<tr>
<td></td>
- <td colspan="3" style="text-align:right"><input type="button" value="$i18n.getString( "add_new" )" onclick="window.location.href='showAddPatientAttributeGroupForm.action'" style="width:70px"></td>
+ <td colspan="3" style="text-align:right">
+ <input type="button" value="$i18n.getString( "sort" )" onclick="window.location.href='showSortPatientAttributeGroup.action'" style="width:75px"><br>
+ <input type="button" value="$i18n.getString( "add_new" )" onclick="window.location.href='showAddPatientAttributeGroupForm.action'" style="width:75px">
+ </td>
</tr>
<tr>
<th>$i18n.getString( "attribute_name" )</th>
=== added file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/sortPatientAttributeGroupForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/sortPatientAttributeGroupForm.vm 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/sortPatientAttributeGroupForm.vm 2011-07-05 05:23:57 +0000
@@ -0,0 +1,27 @@
+<h3>$i18n.getString( "beneficiary_attribute_group_sort_order" )</h3>
+
+<form id="savePatientAttributeGroupSortOrder" name="savePatientAttributeGroupSortOrder" action="savePatientAttributeGroupSortOrder.action" method="get" onsubmit="selectAllById('patientAttributeGroupIds');">
+
+<table>
+ <tr>
+ <td>
+ <select size="15" id="patientAttributeGroupIds" name="patientAttributeGroupIds" multiple="multiple" style="min-width:20em;height:20em">
+ #foreach ( $patientAttributeGroup in $patientAttributeGroups )
+ <option value="$patientAttributeGroup.id">$encoder.htmlEncode( $patientAttributeGroup.name )</option>
+ #end
+ </select>
+ </td>
+
+ <td valign="top" align="center">
+ <a href="#" onclick="moveUpSelectedOption('patientAttributeGroupIds')"><img src="../images/move_up.png" border="0" alt=""></a><br><br>
+ <a href="#" onclick="moveDownSelectedOption('patientAttributeGroupIds')"><img src="../images/move_down.png" border="0" alt=""></a>
+ </td>
+ <tr>
+</table>
+
+<p>
+ <input type="submit" value="$i18n.getString( "save" )" style="width:10em">
+ <input type="button" value="$i18n.getString( "cancel" )" onclick="window.location.href='programStage.action?id=$program.id'" style="width:10em">
+</p>
+
+</form>