dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #20246
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 9165: [mobile] provide Messaging on mobile browser function
------------------------------------------------------------
revno: 9165
committer: Homg Em <em.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2012-12-04 15:35:56 +0700
message:
[mobile] provide Messaging on mobile browser function
added:
dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/messaging/
dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/messaging/action/
dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/messaging/action/FindUserAction.java
dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/messaging/action/GetMessageRecipientsAction.java
dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/messaging/action/SendMessagesAction.java
dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/sendMessageOnMobile.vm
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/message/MessageService.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserService.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserStore.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/java/org/hisp/dhis/user/DefaultUserService.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/hibernate/HibernateUserStore.java
dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/StatementBuilder.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/resources/org/hisp/dhis/light/i18n_module.properties
dhis-2/dhis-web/dhis-web-light/src/main/resources/struts.xml
dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/messages.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/message/MessageService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/message/MessageService.java 2012-11-07 09:08:56 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/message/MessageService.java 2012-12-04 08:35:56 +0000
@@ -41,38 +41,38 @@
final String ID = MessageService.class.getName();
final String META_USER_AGENT = "User-agent: ";
-
+
int sendMessage( String subject, String text, String metaData, Set<User> users );
-
+
int sendMessage( String subject, String text, String metaData, Set<User> users, boolean includeFeedbackRecipients );
-
+
int sendFeedback( String subject, String text, String metaData );
-
+
void sendReply( MessageConversation conversation, String text, String metaData );
-
+
int saveMessageConversation( MessageConversation conversation );
-
+
void updateMessageConversation( MessageConversation conversation );
-
+
int sendCompletenessMessage( CompleteDataSetRegistration registration );
MessageConversation getMessageConversation( int id );
MessageConversation getMessageConversation( String uid );
-
+
long getUnreadMessageConversationCount();
-
+
long getUnreadMessageConversationCount( User user );
-
+
List<MessageConversation> getMessageConversations( int first, int max );
-
+
List<MessageConversation> getMessageConversations( boolean followUpOnly, boolean unreadOnly, int first, int max );
-
+
int getMessageConversationCount();
-
+
int getMessageConversationCount( boolean followUpOnly, boolean unreadOnly );
-
- List<MessageConversation> getAllMessageConversations();
+
+ List<MessageConversation> getAllMessageConversations();
void deleteMessages( User sender );
}
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserService.java 2012-11-08 09:46:51 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserService.java 2012-12-04 08:35:56 +0000
@@ -373,4 +373,8 @@
* @param user the user.
*/
void removeUserSettings( User user );
+
+
+ Collection<User> getUsersByName(String name);
+
}
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserStore.java 2012-07-01 07:12:58 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserStore.java 2012-12-04 08:35:56 +0000
@@ -49,7 +49,8 @@
Collection<User> getUsersWithoutOrganisationUnit();
/**
- * Returns a Collection of the Users which are associated with OrganisationUnits.
+ * Returns a Collection of the Users which are associated with
+ * OrganisationUnits.
*
* @param orgunits a Collection of the organization units.
*
@@ -64,11 +65,14 @@
* @return a Collection of Users.
*/
Collection<User> getUsersByPhoneNumber( String phoneNumber );
-
+
/**
* Removes all user settings associated with the given user.
*
* @param user the user.
*/
void removeUserSettings( User user );
+
+ Collection<User> getUsersByName( String name );
+
}
=== 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 2012-11-14 13:11:10 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/message/DefaultMessageService.java 2012-12-04 08:35:56 +0000
@@ -275,5 +275,6 @@
{
messageSender.sendMessage( subject, text, sender, users, false );
}
- }
+ }
+
}
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/DefaultUserService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/DefaultUserService.java 2012-11-25 18:27:00 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/DefaultUserService.java 2012-12-04 08:35:56 +0000
@@ -252,6 +252,9 @@
{
return userStore.getUsersByPhoneNumber( phoneNumber );
}
+ public Collection<User> getUsersByName(String name){
+ return userStore.getUsersByName(name);
+ }
public Collection<User> getUsersWithoutOrganisationUnit()
{
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/hibernate/HibernateUserStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/hibernate/HibernateUserStore.java 2012-10-06 10:40:16 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/hibernate/HibernateUserStore.java 2012-12-04 08:35:56 +0000
@@ -27,9 +27,11 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+
import java.util.Collection;
import java.util.Iterator;
+
import org.hibernate.Criteria;
import org.hibernate.Query;
import org.hibernate.criterion.Order;
@@ -39,12 +41,16 @@
import org.hisp.dhis.user.User;
import org.hisp.dhis.user.UserStore;
+
/**
* @author Nguyen Hong Duc
*/
public class HibernateUserStore
- extends HibernateIdentifiableObjectStore<User> implements UserStore
+ extends HibernateIdentifiableObjectStore<User>
+ implements UserStore
{
+
+
// -------------------------------------------------------------------------
// UserStore implementation
// -------------------------------------------------------------------------
@@ -65,7 +71,8 @@
public Collection<User> getBetweenByName( String name, int first, int max )
{
Criteria criteria = getCriteria();
- criteria.add( Restrictions.or( Restrictions.ilike( "surname", "%" + name + "%" ), Restrictions.ilike( "firstName", "%" + name + "%" ) ) );
+ criteria.add( Restrictions.or( Restrictions.ilike( "surname", "%" + name + "%" ),
+ Restrictions.ilike( "firstName", "%" + name + "%" ) ) );
criteria.addOrder( Order.asc( "surname" ) ).addOrder( Order.asc( "firstName" ) );
criteria.setFirstResult( first );
criteria.setMaxResults( max );
@@ -107,11 +114,26 @@
return sessionFactory.getCurrentSession().createQuery( hql ).setParameterList( "ids", orgunits ).list();
}
-
+
public void removeUserSettings( User user )
{
String hql = "delete from UserSetting us where us.user = :user";
+
+ getQuery( hql ).setEntity( "user", user ).executeUpdate();
+ }
+
+ @Override
+ @SuppressWarnings( "unchecked" )
+ public Collection<User> getUsersByName( String name)
+ {
+ Criteria criteria = getCriteria();
+ criteria.add( Restrictions.or( Restrictions.ilike( "surname", "%" + name + "%" ),
+ Restrictions.ilike( "firstName", "%" + name + "%" ) ) );
+ criteria.addOrder( Order.asc( "surname" ) ).addOrder( Order.asc( "firstName" ) );
- getQuery( hql ).setEntity( "user", user ).executeUpdate();
+ return criteria.list();
+
}
+
+
}
=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/StatementBuilder.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/StatementBuilder.java 2012-10-29 11:18:39 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/StatementBuilder.java 2012-12-04 08:35:56 +0000
@@ -166,4 +166,6 @@
String queryDataElementStructureForOrgUnit();
String queryRawDataElementsForOrgUnitBetweenPeriods( Integer orgUnitId, List<Integer> betweenPeriodIds);
+
+
}
=== added directory 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/messaging'
=== added directory 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/messaging/action'
=== added file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/messaging/action/FindUserAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/messaging/action/FindUserAction.java 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/messaging/action/FindUserAction.java 2012-12-04 08:35:56 +0000
@@ -0,0 +1,104 @@
+package org.hisp.dhis.light.messaging.action;
+
+import java.util.Collection;
+
+import org.hisp.dhis.user.User;
+import org.hisp.dhis.user.UserService;
+
+import com.opensymphony.xwork2.Action;
+
+public class FindUserAction
+ implements Action
+{
+
+ private static final String REDIRECT = "redirect";
+
+ private UserService userService;
+
+ public UserService getUserService()
+ {
+ return userService;
+ }
+
+ public void setUserService( UserService userService )
+ {
+ this.userService = userService;
+ }
+
+ private Collection<User> users;
+
+ public Collection<User> getUsers()
+ {
+ return users;
+ }
+
+ public void setUsers( Collection<User> users )
+ {
+ this.users = users;
+ }
+
+ private String keyword;
+
+ public String getKeyword()
+ {
+ return keyword;
+ }
+
+ public void setKeyword( String keyword )
+ {
+ this.keyword = keyword;
+ }
+
+ private Integer organisationUnitId;
+
+ public Integer getOrganisationUnitId()
+ {
+ return organisationUnitId;
+ }
+
+ public void setOrganisationUnitId( Integer organisationUnitId )
+ {
+ this.organisationUnitId = organisationUnitId;
+ }
+
+ private Integer userId;
+
+ public Integer getUserId()
+ {
+ return userId;
+ }
+
+ public void setUserId( Integer userId )
+ {
+ this.userId = userId;
+ }
+
+
+
+ @Override
+ public String execute()
+ throws Exception
+ {
+ if ( keyword != null )
+ {
+ int index = keyword.indexOf( ' ' );
+
+ if ( index != -1 && index == keyword.lastIndexOf( ' ' ) )
+ {
+ String[] keys = keyword.split( " " );
+ keyword = keys[0] + " " + keys[1];
+ }
+ }
+ users = userService.getUsersByName(keyword);
+
+
+ if(users.size() == 1){
+ User user = users.iterator().next();
+ userId = user.getId();
+ return REDIRECT;
+ }
+
+ return SUCCESS;
+ }
+
+}
=== added file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/messaging/action/GetMessageRecipientsAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/messaging/action/GetMessageRecipientsAction.java 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/messaging/action/GetMessageRecipientsAction.java 2012-12-04 08:35:56 +0000
@@ -0,0 +1,73 @@
+package org.hisp.dhis.light.messaging.action;
+
+/*
+ * Copyright (c) 2004-2012, 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 com.opensymphony.xwork2.Action;
+
+import org.hisp.dhis.user.User;
+import org.hisp.dhis.user.UserService;
+import org.springframework.beans.factory.annotation.Autowired;
+
+/**
+ * @author Le Hong Em <em.hispvietnam@xxxxxxxxx>
+ */
+public class GetMessageRecipientsAction
+ implements Action
+{
+
+ // -------------------------------------------------------------------------
+ // Dependencies
+ // -------------------------------------------------------------------------
+
+ @Autowired
+ private UserService userService;
+
+ private Integer userId;
+
+ public void setUserId( Integer userId )
+ {
+ this.userId = userId;
+ }
+
+ private User user;
+
+ public User getUser()
+ {
+ return user;
+ }
+
+ @Override
+ public String execute()
+ throws Exception
+ {
+ user = userService.getUser( userId );
+
+ return SUCCESS;
+ }
+
+}
=== added file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/messaging/action/SendMessagesAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/messaging/action/SendMessagesAction.java 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/messaging/action/SendMessagesAction.java 2012-12-04 08:35:56 +0000
@@ -0,0 +1,109 @@
+package org.hisp.dhis.light.messaging.action;
+
+/*
+ * Copyright (c) 2004-2012, 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.HashSet;
+import java.util.Set;
+
+import org.apache.struts2.ServletActionContext;
+import org.hisp.dhis.message.MessageService;
+import org.hisp.dhis.user.User;
+import org.hisp.dhis.user.UserService;
+import org.hisp.dhis.util.ContextUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import com.opensymphony.xwork2.Action;
+
+public class SendMessagesAction
+ implements Action
+{
+ // -------------------------------------------------------------------------
+ // Dependencies
+ // -------------------------------------------------------------------------
+
+ @Autowired
+ private MessageService messageService;
+
+ @Autowired
+ private UserService userService;
+
+ // -------------------------------------------------------------------------
+ // Input
+ // -------------------------------------------------------------------------
+
+ private User user;
+
+ private Integer userId;
+
+ public void setUserId( Integer userId )
+ {
+ this.userId = userId;
+ }
+
+ public User getUser()
+ {
+ return user;
+ }
+
+ public void setUser( User user )
+ {
+ this.user = user;
+ }
+
+ 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 = userService.getUser( userId );
+ String metaData = MessageService.META_USER_AGENT
+ + ServletActionContext.getRequest().getHeader( ContextUtils.HEADER_USER_AGENT );
+
+ Set<User> users = new HashSet<User>();
+ users.add( user );
+
+ messageService.sendMessage( subject, text, metaData, users );
+
+ 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 2012-11-15 06:17:43 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/resources/META-INF/dhis/beans.xml 2012-12-04 08:35:56 +0000
@@ -561,5 +561,11 @@
<property name="relationshipService"
ref="org.hisp.dhis.relationship.RelationshipService" />
</bean>
+
+ <bean
+ id="org.hisp.dhis.light.messaging.action.FindUserAction"
+ class="org.hisp.dhis.light.messaging.action.FindUserAction">
+ <property name="userService" ref="org.hisp.dhis.user.UserService" />
+ </bean>
</beans>
=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/resources/org/hisp/dhis/light/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-light/src/main/resources/org/hisp/dhis/light/i18n_module.properties 2012-11-15 06:17:43 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/resources/org/hisp/dhis/light/i18n_module.properties 2012-12-04 08:35:56 +0000
@@ -127,4 +127,6 @@
invalid_phone_number=invalid phone number
save_any_way=Save anyway
form_in_complete= Form InComplete
-allow_provided_elsewhere= Provided elsewhere
\ No newline at end of file
+allow_provided_elsewhere= Provided elsewhere
+search_user= Search user by name
+last_recipients=Last recipients
=== 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 2012-10-31 17:44:45 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/resources/struts.xml 2012-12-04 08:35:56 +0000
@@ -460,6 +460,25 @@
class="org.hisp.dhis.light.message.action.SendFeedbackAction">
<result name="success" type="redirect">/light/index.action</result>
</action>
+
+ <action name="searchUser"
+ class="org.hisp.dhis.light.messaging.action.FindUserAction">
+ <result name="redirect" type="redirect">showUserList.action?userId=${userId}</result>
+ <result name="success" type="velocity">/dhis-web-light/main.vm</result>
+ <param name="page">/dhis-web-light/messages.vm</param>
+ </action>
+
+
+ <action name="showUserList"
+ class="org.hisp.dhis.light.messaging.action.GetMessageRecipientsAction">
+ <result name="success" type="velocity">/dhis-web-light/main.vm</result>
+ <param name="page">/dhis-web-light/sendMessageOnMobile.vm</param>
+ </action>
+
+ <action name="sendMessage"
+ class="org.hisp.dhis.light.messaging.action.SendMessagesAction">
+ <result name="success" type="redirect">/light/messages.action</result>
+ </action>
<!-- Anonymous -->
<action name="anonymous"
@@ -483,5 +502,7 @@
<param name="requiredAuthorities">F_PATIENT_DATAVALUE_ADD,F_PATIENT_DATAVALUE_UPDATE,F_PATIENT_DATAVALUE_DELETE</param>
</action>
+
+
</package>
</struts>
=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/messages.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/messages.vm 2012-09-06 18:52:44 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/messages.vm 2012-12-04 08:35:56 +0000
@@ -15,6 +15,32 @@
<p>
+<form method="POST" action="searchUser.action">
+<div class="header-box" align="center">
+ <h3 style="text-align: left;">$i18n.getString("search_user")</h3>
+
+ <p style="text-align: left;">
+ <input type="text" name="keyword"/>
+ </p>
+ <p style="text-align: left;">
+ <input type="submit" style="width: 100%;" value="$i18n.getString("search")" />
+ </p>
+</div>
+
+</form>
+
+<p>
+<ul>
+#foreach( $user in $users)
+ <li><a href="showUserList.action?userId=$user.getId()">$!encoder.htmlEncode( ${user.getName()} )</a></li>
+#end
+</ul>
+</p>
+
+
+<h2>$i18n.getString( "last_recipients" )</h2>
+
+
<form method="POST" action="sendFeedback.action">
<div class="header-box" align="center">
<h3 style="text-align: left;">$i18n.getString( "send_feedback" )</h3>
=== added file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/sendMessageOnMobile.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/sendMessageOnMobile.vm 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/sendMessageOnMobile.vm 2012-12-04 08:35:56 +0000
@@ -0,0 +1,23 @@
+<h2>Send message to $!encoder.htmlEncode( ${user.getName()} )</h2>
+<form method="POST" action="sendMessage.action">
+<input type="hidden" name="userId" value="$user.id" />
+<div class="header-box" align="center">
+ <p style="text-align: left;">
+ $i18n.getString( "subject" ) *<br />
+ <input type="text" maxlength="255" size="24" name="subject" />
+
+ $i18n.getString( "text" ) *<br />
+ <input type="text" maxlength="255" size="24" name="text" />
+ <input type="submit" style="width: 100%;" value="$i18n.getString("send")" />
+ </p>
+</div>
+</form>
+
+<div id="footer">
+<h2>$i18n.getString( "navigate_to" )</h2>
+<ul>
+ <li><a href="index.action">$i18n.getString("home")</a></li>
+</ul>
+</div>
+
+