dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #12501
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3858: Added system settings for setting a user group defined as feedback message recipients. Implemente...
Merge authors:
Lars Helge Øverland (larshelge)
------------------------------------------------------------
revno: 3858 [merge]
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-06-09 16:46:45 +0200
message:
Added system settings for setting a user group defined as feedback message recipients. Implemented function for sending feedback in Dashboard - Messages. Feedback implies that a message is sent from any user to all users which are members of the feedback recipients group. Useful for maintaining contact between a national superuser team and end users.
added:
dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/message/action/SendFeedbackAction.java
dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/sendFeedback.vm
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/configuration/Configuration.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/message/MessageService.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/message/DefaultMessageService.java
dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/configuration/hibernate/Configuration.hbm.xml
dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/cofiguration/ConfigurationServiceTest.java
dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/org/hisp/dhis/dashboard/i18n_module.properties
dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/struts.xml
dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/message.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/GetSystemSettingsAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetSystemSettingsAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/user/GetAvailableUserSettingsAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module.properties
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemSettings.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/configuration/Configuration.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/configuration/Configuration.java 2011-06-07 13:52:04 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/configuration/Configuration.java 2011-06-09 14:43:14 +0000
@@ -46,7 +46,7 @@
private int id;
- private UserGroup messageRecipients;
+ private UserGroup feedbackRecipients;
private DataElementGroup infrastructuralDataElements;
@@ -66,14 +66,14 @@
this.id = id;
}
- public UserGroup getMessageRecipients()
+ public UserGroup getFeedbackRecipients()
{
- return messageRecipients;
+ return feedbackRecipients;
}
- public void setMessageRecipients( UserGroup messageRecipients )
+ public void setFeedbackRecipients( UserGroup feedbackRecipients )
{
- this.messageRecipients = messageRecipients;
+ this.feedbackRecipients = feedbackRecipients;
}
public DataElementGroup getInfrastructuralDataElements()
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/message/MessageService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/message/MessageService.java 2011-04-01 11:33:40 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/message/MessageService.java 2011-06-08 22:04:42 +0000
@@ -41,6 +41,8 @@
int sendMessage( Message message, Set<User> users );
+ int sendFeedback( Message message );
+
int saveMessage( Message message );
Message getMessage( int id );
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/message/DefaultMessageService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/message/DefaultMessageService.java 2011-04-01 13:26:15 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/message/DefaultMessageService.java 2011-06-09 14:43:14 +0000
@@ -32,8 +32,10 @@
import java.util.Set;
import org.hisp.dhis.common.GenericStore;
+import org.hisp.dhis.configuration.ConfigurationService;
import org.hisp.dhis.user.CurrentUserService;
import org.hisp.dhis.user.User;
+import org.hisp.dhis.user.UserGroup;
import org.springframework.transaction.annotation.Transactional;
/**
@@ -67,6 +69,13 @@
{
this.currentUserService = currentUserService;
}
+
+ private ConfigurationService configurationService;
+
+ public void setConfigurationService( ConfigurationService configurationService )
+ {
+ this.configurationService = configurationService;
+ }
// -------------------------------------------------------------------------
// MessageService implementation
@@ -85,7 +94,21 @@
return saveMessage( message );
}
-
+
+ public int sendFeedback( Message message )
+ {
+ UserGroup userGroup = configurationService.getConfiguration().getFeedbackRecipients();
+
+ int count = 0;
+
+ if ( userGroup != null && userGroup.getMembers().size() > 0 )
+ {
+ count = sendMessage( message, userGroup.getMembers() );
+ }
+
+ return count;
+ }
+
public int saveMessage( Message message )
{
return messageStore.save( message );
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml 2011-06-02 08:44:31 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml 2011-06-08 22:04:42 +0000
@@ -467,6 +467,7 @@
<property name="messageStore" ref="org.hisp.dhis.message.MessageStore"/>
<property name="userMessageStore" ref="org.hisp.dhis.message.UserMessageStore"/>
<property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService"/>
+ <property name="configurationService" ref="org.hisp.dhis.configuration.ConfigurationService"/>
</bean>
<bean id="org.hisp.dhis.concept.ConceptService"
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/configuration/hibernate/Configuration.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/configuration/hibernate/Configuration.hbm.xml 2011-06-07 13:52:04 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/configuration/hibernate/Configuration.hbm.xml 2011-06-09 14:43:14 +0000
@@ -10,8 +10,8 @@
<generator class="native" />
</id>
- <many-to-one name="messageRecipients" class="org.hisp.dhis.user.UserGroup"
- column="messagerecipientsid" foreign-key="fk_configuration_message_recipients"/>
+ <many-to-one name="feedbackRecipients" class="org.hisp.dhis.user.UserGroup"
+ column="feedbackrecipientsid" foreign-key="fk_configuration_feedback_recipients"/>
<many-to-one name="infrastructuralDataElements" class="org.hisp.dhis.dataelement.DataElementGroup"
column="infrastructuraldataelementsid" foreign-key="fk_configuration_infrastructural_dataelements"/>
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/cofiguration/ConfigurationServiceTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/cofiguration/ConfigurationServiceTest.java 2011-06-01 15:28:59 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/cofiguration/ConfigurationServiceTest.java 2011-06-09 14:43:14 +0000
@@ -76,15 +76,15 @@
Configuration config = configurationService.getConfiguration();
- assertNull( config.getMessageRecipients() );
+ assertNull( config.getFeedbackRecipients() );
- config.setMessageRecipients( group );
+ config.setFeedbackRecipients( group );
configurationService.setConfiguration( config );
config = configurationService.getConfiguration();
- assertNotNull( config.getMessageRecipients() );
- assertEquals( group, config.getMessageRecipients() );
+ assertNotNull( config.getFeedbackRecipients() );
+ assertEquals( group, config.getFeedbackRecipients() );
}
}
=== added file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/message/action/SendFeedbackAction.java'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/message/action/SendFeedbackAction.java 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/message/action/SendFeedbackAction.java 2011-06-08 22:04:42 +0000
@@ -0,0 +1,63 @@
+package org.hisp.dhis.dashboard.message.action;
+
+import org.hisp.dhis.message.Message;
+import org.hisp.dhis.message.MessageService;
+import org.hisp.dhis.user.CurrentUserService;
+import org.hisp.dhis.user.User;
+
+import com.opensymphony.xwork2.Action;
+
+public class SendFeedbackAction
+ implements Action
+{
+ // -------------------------------------------------------------------------
+ // Dependencies
+ // -------------------------------------------------------------------------
+
+ private MessageService messageService;
+
+ public void setMessageService( MessageService messageService )
+ {
+ this.messageService = messageService;
+ }
+
+ private CurrentUserService currentUserService;
+
+ public void setCurrentUserService( CurrentUserService currentUserService )
+ {
+ this.currentUserService = currentUserService;
+ }
+
+ // -------------------------------------------------------------------------
+ // Input
+ // -------------------------------------------------------------------------
+
+ private String subject;
+
+ public void setSubject( String subject )
+ {
+ this.subject = subject;
+ }
+
+ private String text;
+
+ public void setText( String text )
+ {
+ this.text = text;
+ }
+
+ // -------------------------------------------------------------------------
+ // Action implementation
+ // -------------------------------------------------------------------------
+
+ public String execute()
+ {
+ User sender = currentUserService.getCurrentUser();
+
+ Message message = new Message( subject, text, sender );
+
+ messageService.sendFeedback( message );
+
+ return SUCCESS;
+ }
+}
=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/META-INF/dhis/beans.xml 2011-04-24 12:47:31 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/META-INF/dhis/beans.xml 2011-06-08 22:04:42 +0000
@@ -81,6 +81,13 @@
<property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService"/>
</bean>
+ <bean id="org.hisp.dhis.dashboard.message.action.SendFeedbackAction"
+ class="org.hisp.dhis.dashboard.message.action.SendFeedbackAction"
+ scope="prototype">
+ <property name="messageService" ref="org.hisp.dhis.message.MessageService"/>
+ <property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService"/>
+ </bean>
+
<bean id="org.hisp.dhis.dashboard.message.action.ReadMessageAction"
class="org.hisp.dhis.dashboard.message.action.ReadMessageAction"
scope="prototype">
=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/org/hisp/dhis/dashboard/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/org/hisp/dhis/dashboard/i18n_module.properties 2011-04-11 15:07:08 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/org/hisp/dhis/dashboard/i18n_module.properties 2011-06-08 22:04:42 +0000
@@ -21,7 +21,9 @@
subject = Subject
remove = Remove
new_message = New message
+new_feedback = New feedback
create_new_message = Create new message
+create_new_feedback = Create new feedback
details = Details
recipients = Recipients
mark_unread = Mark as unread
=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/struts.xml 2011-06-01 09:39:57 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/struts.xml 2011-06-09 14:46:45 +0000
@@ -66,6 +66,10 @@
<param name="requiredAuthorities">F_SEND_MESSAGE</param>
</action>
+ <action name="sendFeedback" class="org.hisp.dhis.dashboard.message.action.SendFeedbackAction">
+ <result name="success" type="redirect">message.action</result>
+ </action>
+
<action name="showSendMessage" class="org.hisp.dhis.dashboard.action.NoAction">
<result name="success" type="velocity">/main.vm</result>
<param name="page">/dhis-web-dashboard-integration/sendMessage.vm</param>
@@ -75,6 +79,14 @@
<param name="requiredAuthorities">F_SEND_MESSAGE</param>
</action>
+ <action name="showSendFeedback" class="org.hisp.dhis.dashboard.action.NoAction">
+ <result name="success" type="velocity">/main.vm</result>
+ <param name="page">/dhis-web-dashboard-integration/sendFeedback.vm</param>
+ <param name="menu">/dhis-web-dashboard-integration/menu.vm</param>
+ <param name="javascripts">../dhis-web-commons/oust/oust.js,javascript/message.js</param>
+ <param name="stylesheets">style/dashboard.css</param>
+ </action>
+
<action name="readMessage" class="org.hisp.dhis.dashboard.message.action.ReadMessageAction">
<result name="success" type="velocity">/main.vm</result>
<param name="page">/dhis-web-dashboard-integration/readMessage.vm</param>
=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/message.vm'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/message.vm 2011-04-11 15:07:08 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/message.vm 2011-06-08 22:04:42 +0000
@@ -4,7 +4,8 @@
<h3>$i18n.getString( "messages" )</h3>
-<div style="margin-bottom:15px"><input type="button" value="$i18n.getString( 'new_message' )" onclick="window.location.href='showSendMessage.action'"></div>
+<div style="margin-bottom:15px"><input type="button" value="$i18n.getString( 'new_message' )" onclick="window.location.href='showSendMessage.action'">
+<br><input type="button" value="$i18n.getString( 'new_feedback' )" onclick="window.location.href='showSendFeedback.action'"></div>
<table style="width:90%" class="plainList">
<tr>
=== added file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/sendFeedback.vm'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/sendFeedback.vm 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/sendFeedback.vm 2011-06-08 22:04:42 +0000
@@ -0,0 +1,26 @@
+
+<h3>$i18n.getString( "create_new_feedback" )</h3>
+
+<form action="sendFeedback.action" method="post">
+
+<table>
+
+<tr>
+<td>$i18n.getString( "subject" )</td>
+<td><input type="text" name="subject" style="width:495px"></td>
+</tr>
+
+<tr>
+<td>$i18n.getString( "text" )</td>
+<td><textarea name="text" style="width:495px;height:200px"></textarea></td>
+</tr>
+
+<tr>
+<td></td>
+<td><input type="submit" value="$i18n.getString( 'send' )" style="width:120px">
+<input type="button" value="$i18n.getString( 'cancel' )" style="width:120px" onclick="window.location.href='message.action'"></td>
+</tr>
+
+</table>
+
+</form>
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/GetSystemSettingsAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/GetSystemSettingsAction.java 2011-01-07 11:37:47 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/GetSystemSettingsAction.java 2011-06-09 14:43:14 +0000
@@ -27,14 +27,20 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+import java.util.ArrayList;
import java.util.Collection;
+import java.util.Collections;
import java.util.List;
import java.util.SortedMap;
+import org.hisp.dhis.configuration.ConfigurationService;
import org.hisp.dhis.options.SystemSettingManager;
import org.hisp.dhis.options.style.StyleManager;
import org.hisp.dhis.system.util.Filter;
import org.hisp.dhis.system.util.FilterUtils;
+import org.hisp.dhis.user.UserGroup;
+import org.hisp.dhis.user.UserGroupService;
+import org.hisp.dhis.user.comparator.UserGroupComparator;
import org.hisp.dhis.webportal.module.Module;
import org.hisp.dhis.webportal.module.ModuleManager;
import org.hisp.dhis.webportal.module.StartableModuleFilter;
@@ -75,6 +81,20 @@
this.styleManager = styleManager;
}
+ private UserGroupService userGroupService;
+
+ public void setUserGroupService( UserGroupService userGroupService )
+ {
+ this.userGroupService = userGroupService;
+ }
+
+ private ConfigurationService configurationService;
+
+ public void setConfigurationService( ConfigurationService configurationService )
+ {
+ this.configurationService = configurationService;
+ }
+
// -------------------------------------------------------------------------
// Output
// -------------------------------------------------------------------------
@@ -106,7 +126,21 @@
{
return currentStyle;
}
+
+ private List<UserGroup> userGroups;
+
+ public List<UserGroup> getUserGroups()
+ {
+ return userGroups;
+ }
+
+ private UserGroup feedbackRecipients;
+ public UserGroup getFeedbackRecipients()
+ {
+ return feedbackRecipients;
+ }
+
private Collection<String> aggregationStrategies;
public Collection<String> getAggregationStrategies()
@@ -127,11 +161,17 @@
FilterUtils.filter( modules, startableFilter );
styles = styleManager.getStyles();
-
+
currentStyle = styleManager.getCurrentStyle();
-
+
aggregationStrategies = systemSettingManager.getAggregationStrategies();
+ userGroups = new ArrayList<UserGroup>( userGroupService.getAllUserGroups() );
+
+ Collections.sort( userGroups, new UserGroupComparator() );
+
+ feedbackRecipients = configurationService.getConfiguration().getFeedbackRecipients();
+
return SUCCESS;
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetSystemSettingsAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetSystemSettingsAction.java 2011-04-04 17:23:41 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetSystemSettingsAction.java 2011-06-09 14:43:14 +0000
@@ -36,8 +36,11 @@
import static org.hisp.dhis.options.SystemSettingManager.KEY_START_MODULE;
import org.apache.commons.lang.StringUtils;
+import org.hisp.dhis.configuration.Configuration;
+import org.hisp.dhis.configuration.ConfigurationService;
import org.hisp.dhis.options.SystemSettingManager;
import org.hisp.dhis.options.style.StyleManager;
+import org.hisp.dhis.user.UserGroupService;
import com.opensymphony.xwork2.Action;
@@ -65,6 +68,20 @@
{
this.styleManager = styleManager;
}
+
+ private UserGroupService userGroupService;
+
+ public void setUserGroupService( UserGroupService userGroupService )
+ {
+ this.userGroupService = userGroupService;
+ }
+
+ private ConfigurationService configurationService;
+
+ public void setConfigurationService( ConfigurationService configurationService )
+ {
+ this.configurationService = configurationService;
+ }
// -------------------------------------------------------------------------
// Output
@@ -133,6 +150,13 @@
this.aggregationStrategy = aggregationStrategy;
}
+ private Integer feedbackRecipients;
+
+ public void setFeedbackRecipients( Integer feedbackRecipients )
+ {
+ this.feedbackRecipients = feedbackRecipients;
+ }
+
private Integer completenessOffset;
public void setCompletenessOffset( Integer completenessOffset )
@@ -169,6 +193,10 @@
systemSettingManager.saveSystemSetting( KEY_AGGREGATION_STRATEGY, aggregationStrategy );
systemSettingManager.saveSystemSetting( KEY_COMPLETENESS_OFFSET, completenessOffset );
+ Configuration configuration = configurationService.getConfiguration();
+ configuration.setFeedbackRecipients( userGroupService.getUserGroup( feedbackRecipients ) );
+ configurationService.setConfiguration( configuration );
+
return SUCCESS;
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/user/GetAvailableUserSettingsAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/user/GetAvailableUserSettingsAction.java 2011-05-31 03:26:58 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/user/GetAvailableUserSettingsAction.java 2011-06-09 14:43:14 +0000
@@ -250,15 +250,13 @@
availableLocales.add( localeManager.getFallbackLocale() );
}
+ Collections.sort( availableLocales, new Comparator<Locale>()
{
- Collections.sort( availableLocales, new Comparator<Locale>()
+ public int compare( Locale locale0, Locale locale1 )
{
- public int compare( Locale locale0, Locale locale1 )
- {
- return locale0.getDisplayName().compareTo( locale1.getDisplayName() );
- }
- } );
- }
+ return locale0.getDisplayName().compareTo( locale1.getDisplayName() );
+ }
+ } );
currentLocaleDb = localeManager.getCurrentLocale();
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/META-INF/dhis/beans.xml 2011-05-31 03:26:58 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/META-INF/dhis/beans.xml 2011-06-09 14:43:14 +0000
@@ -9,26 +9,20 @@
<bean id="org.hisp.dhis.settings.action.system.GetSystemSettingsAction"
class="org.hisp.dhis.settings.action.system.GetSystemSettingsAction"
scope="prototype">
- <property name="systemSettingManager">
- <ref bean="org.hisp.dhis.options.SystemSettingManager" />
- </property>
- <property name="moduleManager">
- <ref bean="org.hisp.dhis.webportal.module.ModuleManager" />
- </property>
- <property name="styleManager">
- <ref bean="org.hisp.dhis.options.style.StyleManager" />
- </property>
+ <property name="systemSettingManager" ref="org.hisp.dhis.options.SystemSettingManager" />
+ <property name="moduleManager" ref="org.hisp.dhis.webportal.module.ModuleManager" />
+ <property name="styleManager" ref="org.hisp.dhis.options.style.StyleManager" />
+ <property name="userGroupService" ref="org.hisp.dhis.user.UserGroupService"/>
+ <property name="configurationService" ref="org.hisp.dhis.configuration.ConfigurationService"/>
</bean>
<bean id="org.hisp.dhis.settings.action.system.SetSystemSettingsAction"
class="org.hisp.dhis.settings.action.system.SetSystemSettingsAction"
scope="prototype">
- <property name="systemSettingManager">
- <ref bean="org.hisp.dhis.options.SystemSettingManager" />
- </property>
- <property name="styleManager">
- <ref bean="org.hisp.dhis.options.style.StyleManager" />
- </property>
+ <property name="systemSettingManager" ref="org.hisp.dhis.options.SystemSettingManager" />
+ <property name="styleManager" ref="org.hisp.dhis.options.style.StyleManager" />
+ <property name="userGroupService" ref="org.hisp.dhis.user.UserGroupService"/>
+ <property name="configurationService" ref="org.hisp.dhis.configuration.ConfigurationService"/>
</bean>
<!-- User settings -->
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module.properties 2011-05-06 20:45:30 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module.properties 2011-06-09 14:43:14 +0000
@@ -90,4 +90,6 @@
batch = Batch
days_after_period_timeliness = Days after period end to qualify for timely data submission
system_identifier = System identifier
-can_be_set_once = can only be set once
\ No newline at end of file
+can_be_set_once = can only be set once
+feedback_recipients = Feedback recipients
+no_feedback_recipients = No message recipients
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemSettings.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemSettings.vm 2011-04-11 15:42:51 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemSettings.vm 2011-06-09 14:43:14 +0000
@@ -23,7 +23,7 @@
<h4>$i18n.getString( "style" )</h4>
-<select style="min-width:250px" name='currentStyle' id='currentStyle'>
+<select style="width:30em" name='currentStyle' id='currentStyle'>
#foreach( $style in $styles.entrySet() )
<option value="$style.value" #if( $style.value == $currentStyle )selected="selected"#end>$i18n.getString( $style.key )</option>
#end
@@ -51,6 +51,17 @@
</select>
</p>
+<h4>$i18n.getString( "feedback_recipients" )</h4>
+
+<p>
+<select name="feedbackRecipients" style="width:30em">
+ <option value="-1">$i18n.getString( "no_feedback_recipients" )</option>
+ #foreach ( $group in $userGroups )
+ <option value="$group.id" #if( $group.id == $!feedbackRecipients.id )selected="selected"#end>$encoder.htmlEncode( $group.name )</option>
+ #end
+</select>
+</p>
+
<h4>$i18n.getString( "omit_indicators_zero_numerator_data_mart" )</h4>
<p>