dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #41757
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21301: introduced new program property called displayFrontPageList. This peoperty controlls if TEIs can ...
------------------------------------------------------------
revno: 21301
committer: Abyot Asalefew Gizaw <abyota@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2015-12-03 17:47:14 +0100
message:
introduced new program property called displayFrontPageList. This peoperty controlls if TEIs can be listed by default or not in first page of tracker capture. This property is false by default - this means users have to always search to get a TEI.
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/trackedentity/startup/TableAlteror.java
dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/program/hibernate/Program.hbm.xml
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/program/AddProgramAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/program/UpdateProgramAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/resources/org/hisp/dhis/trackedentity/i18n_module.properties
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addProgramForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramForm.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/program/Program.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.java 2015-11-30 03:36:54 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.java 2015-12-03 16:47:14 +0000
@@ -139,6 +139,8 @@
* The approval workflow (if any) for this program.
*/
private DataApprovalWorkflow workflow;
+
+ private Boolean displayFrontPageList = false;
// -------------------------------------------------------------------------
// Constructors
@@ -697,6 +699,19 @@
{
this.skipOffline = skipOffline;
}
+
+ @JsonProperty
+ @JsonView( { DetailedView.class, ExportView.class } )
+ @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
+ public Boolean getDisplayFrontPageList()
+ {
+ return displayFrontPageList;
+ }
+
+ public void setDisplayFrontPageList( Boolean displayFrontPageList )
+ {
+ this.displayFrontPageList = displayFrontPageList;
+ }
@Override
public void mergeWith( IdentifiableObject other, MergeStrategy strategy )
@@ -769,5 +784,5 @@
instanceReminders.clear();
instanceReminders.addAll( program.getInstanceReminders() );
}
- }
+ }
}
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/trackedentity/startup/TableAlteror.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/trackedentity/startup/TableAlteror.java 2015-11-18 14:08:06 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/trackedentity/startup/TableAlteror.java 2015-12-03 16:47:14 +0000
@@ -156,6 +156,7 @@
executeSql( "update prorgam set \"operator\"='times' where \"operator\"='SUM'" );
executeSql( "update program set remindCompleted=false where remindCompleted is null" );
executeSql( "UPDATE program SET skipoffline=false where skipoffline is null" );
+ executeSql( "UPDATE program SET displayfrontpagelist=false where displayfrontpagelist is null" );
executeSql( "UPDATE programinstance SET followup=false where followup is null" );
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/program/hibernate/Program.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/program/hibernate/Program.hbm.xml 2015-11-30 03:36:54 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/program/hibernate/Program.hbm.xml 2015-12-03 16:47:14 +0000
@@ -51,6 +51,8 @@
<property name="onlyEnrollOnce" />
<property name="skipOffline" />
+
+ <property name="displayFrontPageList" column="displayfrontpagelist" />
<list name="programAttributes" cascade="all-delete-orphan">
<key column="programid" />
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/program/AddProgramAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/program/AddProgramAction.java 2015-11-30 03:36:54 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/program/AddProgramAction.java 2015-12-03 16:47:14 +0000
@@ -273,6 +273,13 @@
{
this.workflowId = workflowId;
}
+
+ private boolean displayFrontPageList;
+
+ public void setDisplayFrontPageList( boolean displayFrontPageList )
+ {
+ this.displayFrontPageList = displayFrontPageList;
+ }
// -------------------------------------------------------------------------
// Action implementation
@@ -304,6 +311,7 @@
program.setSelectIncidentDatesInFuture( selectIncidentDatesInFuture );
program.setDataEntryMethod( dataEntryMethod );
program.setSkipOffline( skipOffline );
+ program.setDisplayFrontPageList( displayFrontPageList );
if ( programType == ProgramType.WITH_REGISTRATION )
{
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/program/UpdateProgramAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/program/UpdateProgramAction.java 2015-11-30 03:36:54 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/program/UpdateProgramAction.java 2015-12-03 16:47:14 +0000
@@ -294,6 +294,13 @@
{
this.workflowId = workflowId;
}
+
+ private boolean displayFrontPageList;
+
+ public void setDisplayFrontPageList( boolean displayFrontPageList )
+ {
+ this.displayFrontPageList = displayFrontPageList;
+ }
// -------------------------------------------------------------------------
// Action implementation
@@ -326,6 +333,7 @@
program.setSelectIncidentDatesInFuture( selectIncidentDatesInFuture );
program.setDataEntryMethod( dataEntryMethod );
program.setSkipOffline( skipOffline );
+ program.setDisplayFrontPageList( displayFrontPageList );
if ( program.isRegistration() )
{
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/resources/org/hisp/dhis/trackedentity/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/resources/org/hisp/dhis/trackedentity/i18n_module.properties 2015-11-30 03:36:54 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/resources/org/hisp/dhis/trackedentity/i18n_module.properties 2015-12-03 16:47:14 +0000
@@ -539,4 +539,5 @@
category_combo=Combination of categories
missing_value_replacement=Missing value replacement
skip_offline=Skip offline
-data_approval_workflow=Data approval workflow
\ No newline at end of file
+data_approval_workflow=Data approval workflow
+display_front_page_list=Display front page list
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addProgramForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addProgramForm.vm 2015-11-30 03:36:54 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addProgramForm.vm 2015-12-03 16:47:14 +0000
@@ -157,6 +157,16 @@
</select>
</td>
</tr>
+
+ <tr>
+ <td><label>$i18n.getString( "display_front_page_list" )</label></td>
+ <td>
+ <select id="displayFrontPageList" name="displayFrontPageList">
+ <option value="false">$i18n.getString( "no" )</option>
+ <option value="true">$i18n.getString( "yes" )</option>
+ </select>
+ </td>
+ </tr>
<tr name='nonAnonymous'><td> </td></tr>
<tr name='nonAnonymous'>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramForm.vm 2015-11-30 03:36:54 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateProgramForm.vm 2015-12-03 16:47:14 +0000
@@ -172,6 +172,16 @@
</td>
</tr>
+ <tr>
+ <td><label>$i18n.getString( "display_front_page_list" )</label></td>
+ <td>
+ <select id="displayFrontPageList" name="displayFrontPageList">
+ <option value="false">$i18n.getString( "no" )</option>
+ <option value="true"#if( $program.displayFrontPageList == true ) selected="selected"#end>$i18n.getString( "yes" )</option>
+ </select>
+ </td>
+ </tr>
+
<tr name='nonAnonymous'><td> </td></tr>
<tr name='nonAnonymous'>