=== removed file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/reminder/GetGetwayListAction.java' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/reminder/GetGetwayListAction.java 2012-08-09 08:57:01 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/reminder/GetGetwayListAction.java 1970-01-01 00:00:00 +0000 @@ -1,75 +0,0 @@ -/* - * 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.caseentry.action.reminder; - -import java.util.Map; - -import org.hisp.dhis.sms.outbound.OutboundSmsTransportService; -import org.springframework.beans.factory.annotation.Autowired; - -import com.opensymphony.xwork2.Action; - -/** - * @author Chau Thu Tran - * - * @version GetGetwayListAction.java 1:50:25 PM Aug 9, 2012 $ - */ -public class GetGetwayListAction - implements Action -{ - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - @Autowired - private OutboundSmsTransportService transportService; - - // ------------------------------------------------------------------------- - // Output - // ------------------------------------------------------------------------- - - public Map gatewayMap; - - public Map getGatewayMap() - { - return gatewayMap; - } - - // ------------------------------------------------------------------------- - // Action implementation - // ------------------------------------------------------------------------- - - public String execute() - throws Exception - { - gatewayMap = transportService.getGatewayMap(); - - return SUCCESS; - } - -} === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/reminder/GetOutboundSmsListAction.java' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/reminder/GetOutboundSmsListAction.java 2012-08-09 08:57:01 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/reminder/GetOutboundSmsListAction.java 2012-08-09 10:47:22 +0000 @@ -29,10 +29,13 @@ import java.util.ArrayList; import java.util.List; +import java.util.Map; import org.hisp.dhis.program.ProgramStageInstance; import org.hisp.dhis.program.ProgramStageInstanceService; import org.hisp.dhis.sms.outbound.OutboundSms; +import org.hisp.dhis.sms.outbound.OutboundSmsTransportService; +import org.springframework.beans.factory.annotation.Autowired; import com.opensymphony.xwork2.Action; @@ -50,16 +53,21 @@ private ProgramStageInstanceService programStageInstanceService; + @Autowired + private OutboundSmsTransportService transportService; + // ------------------------------------------------------------------------- // Input/Output // ------------------------------------------------------------------------- private Integer programStageInstanceId; - + private ProgramStageInstance programStageInstance; - + private List outboundSms; + public Map gatewayMap; + // ------------------------------------------------------------------------- // Getter/Setter // ------------------------------------------------------------------------- @@ -84,6 +92,11 @@ return outboundSms; } + public Map getGatewayMap() + { + return gatewayMap; + } + // ------------------------------------------------------------------------- // Action implementation // ------------------------------------------------------------------------- @@ -92,11 +105,12 @@ public String execute() throws Exception { - programStageInstance = programStageInstanceService - .getProgramStageInstance( programStageInstanceId ); - + programStageInstance = programStageInstanceService.getProgramStageInstance( programStageInstanceId ); + outboundSms = new ArrayList( programStageInstance.getOutboundSms() ); - + + gatewayMap = transportService.getGatewayMap(); + return SUCCESS; } === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml 2012-08-09 09:50:18 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml 2012-08-09 10:47:22 +0000 @@ -978,9 +978,6 @@ ref="org.hisp.dhis.program.ProgramStageInstanceService" /> - - === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml 2012-08-09 09:50:18 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml 2012-08-09 10:47:22 +0000 @@ -814,19 +814,6 @@ style/style.css - - /content.vm - /dhis-web-caseentry/smsReminderList.vm - style/style.css - - - - /content.vm - /dhis-web-caseentry/sendSMSForm.vm - style/style.css - - /dhis-web-commons/ajax/jsonResponseSuccess.vm /dhis-web-commons/ajax/jsonResponseError.vm === removed file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/images/new_sms.gif' Binary files dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/images/new_sms.gif 2012-08-09 08:57:01 +0000 and dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/images/new_sms.gif 1970-01-01 00:00:00 +0000 differ === added file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/images/sms.gif' Binary files dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/images/sms.gif 1970-01-01 00:00:00 +0000 and dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/images/sms.gif 2012-08-09 10:47:22 +0000 differ === removed file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/images/sms_list.gif' Binary files dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/images/sms_list.gif 2012-08-09 08:57:01 +0000 and dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/images/sms_list.gif 1970-01-01 00:00:00 +0000 differ === removed file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/sendSMSForm.vm' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/sendSMSForm.vm 2012-08-09 08:57:01 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/sendSMSForm.vm 1970-01-01 00:00:00 +0000 @@ -1,48 +0,0 @@ - - -#if ( $!gatewayMap && $!gatewayMap.size() > 0 ) -
- - - - - - - - - - - - - - - - - - - -
$i18n.getString( "gateway_type" )
- #set( $keys = $!gatewayMap.keySet() ) - -
$i18n.getString( "message" )
-
- - -#else -

No Sms service available

-#end \ No newline at end of file === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/smsPatientRecords.vm' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/smsPatientRecords.vm 2012-08-09 09:11:28 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/smsPatientRecords.vm 2012-08-09 10:47:22 +0000 @@ -49,9 +49,8 @@ - ($programStageInstance.outboundSms.size() $i18n.getString('messages') )
- - + + $programStageInstance.outboundSms.size() $i18n.getString('messages') === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/smsReminderList.vm' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/smsReminderList.vm 2012-08-09 08:57:01 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/smsReminderList.vm 2012-08-09 10:47:22 +0000 @@ -1,3 +1,12 @@ + +

$i18n.getString( "sms_message_management" )

@@ -15,32 +24,77 @@
- - - - - - - - - - - #set( $mark = false ) - #foreach( $sms in $outboundSms ) - - - - - #set( $mark = !$mark) - #end - - -
$i18n.getString( "date" )$i18n.getString( "message" )
$format.formatDate($!sms.date)$sms.message
- - - - -
+
+ + +
+ + + + + + + + + + #set( $mark = false ) + #foreach( $sms in $outboundSms ) + + + + + #set( $mark = !$mark) + #end + +
$i18n.getString( "date" )$i18n.getString( "message" )
$format.formatDate($!sms.date)$sms.message
+
+ +
+ #if ( $!gatewayMap && $!gatewayMap.size() > 0 ) +
+ + + + + + + + + + + + + + + + + + + +
$i18n.getString( "gateway_type" )
+ #set( $keys = $!gatewayMap.keySet() ) + +
$i18n.getString( "message" )
+
+ +
+ #else +

No Sms service available

+ #end +
+