=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/java/org/hisp/dhis/mobile/action/smscommand/SMSCommandAction.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/java/org/hisp/dhis/mobile/action/smscommand/SMSCommandAction.java 2012-06-14 09:41:45 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/java/org/hisp/dhis/mobile/action/smscommand/SMSCommandAction.java 2012-06-27 07:25:34 +0000 @@ -14,9 +14,12 @@ import com.opensymphony.xwork2.Action; -public class SMSCommandAction implements Action { +public class SMSCommandAction + implements Action +{ private SMSCommandService smsCommandService; + private DataSetService dataSetService; private int selectedCommandID = -1; @@ -27,71 +30,92 @@ // Action implementation // ------------------------------------------------------------------------- - public String execute() throws Exception { - if (getSMSCommand() != null && getSMSCommand().getCodes() != null) { - for (SMSCode x : getSMSCommand().getCodes()) { - codes.put("" + x.getDataElement().getId() + x.getOptionId(), x.getCode()); + public String execute() + throws Exception + { + if ( getSMSCommand() != null && getSMSCommand().getCodes() != null ) + { + for ( SMSCode x : getSMSCommand().getCodes() ) + { + codes.put( "" + x.getDataElement().getId() + x.getOptionId(), x.getCode() ); } } return SUCCESS; } - public Set getDataSetElements() { - if (getSMSCommand() != null) { + public Set getDataSetElements() + { + if ( getSMSCommand() != null ) + { DataSet d = getSMSCommand().getDataset(); - if (d != null) { + if ( d != null ) + { return d.getDataElements(); } } return null; } - public Collection getDataSets() { + public Collection getDataSets() + { return getDataSetService().getAllDataSets(); } - public Collection getSMSCommands() { - System.out.println("get:" + smsCommandService.getSMSCommands()); + public Collection getSMSCommands() + { + System.out.println( "get:" + smsCommandService.getSMSCommands() ); return smsCommandService.getSMSCommands(); } - public SMSCommand getSMSCommand() { - if (selectedCommandID > -1) { - return smsCommandService.getSMSCommand(selectedCommandID); - } else { + public SMSCommand getSMSCommand() + { + if ( selectedCommandID > -1 ) + { + return smsCommandService.getSMSCommand( selectedCommandID ); + } + else + { return null; } } - public SMSCommandService getSmsCommandService() { + public SMSCommandService getSmsCommandService() + { return smsCommandService; } - public void setSmsCommandService(SMSCommandService smsCommandService) { + public void setSmsCommandService( SMSCommandService smsCommandService ) + { this.smsCommandService = smsCommandService; } - public int getSelectedCommandID() { + public int getSelectedCommandID() + { return selectedCommandID; } - public void setSelectedCommandID(int selectedCommandID) { + public void setSelectedCommandID( int selectedCommandID ) + { this.selectedCommandID = selectedCommandID; } - public DataSetService getDataSetService() { + public DataSetService getDataSetService() + { return dataSetService; } - public void setDataSetService(DataSetService dataSetService) { + public void setDataSetService( DataSetService dataSetService ) + { this.dataSetService = dataSetService; } - public Map getCodes() { + public Map getCodes() + { return codes; } - public void setCodes(Map codes) { + public void setCodes( Map codes ) + { this.codes = codes; } === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/org/hisp/dhis/mobile/i18n_module.properties' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/org/hisp/dhis/mobile/i18n_module.properties 2012-06-06 07:48:54 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/org/hisp/dhis/mobile/i18n_module.properties 2012-06-27 07:25:34 +0000 @@ -122,4 +122,8 @@ hierachy_orgunit=Hierarchy organisation unit total_result=Total number of results search_result_matching_the_search_criteria=Result matches the search criteria -search_patients_by_attributes=Search persons by attributes \ No newline at end of file +search_patients_by_attributes=Search persons by attributes +sms_command_form=SMS Commands +add_command=Add command +command_details=Command Details + === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/menu.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/menu.vm 2012-06-13 08:44:07 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/menu.vm 2012-06-27 07:25:34 +0000 @@ -1,11 +1,11 @@ -

DHIS Mobile Configuration

-
    - -
  • $i18n.getString( "patient_mobile_setting" )
  • -
  • $i18n.getString( "mobile_dataset" ) 
  • -
  • $i18n.getString( "sms_service_configuration" )
  • -
  • $i18n.getString( "show_send_sms_form" )
  • -
  • $i18n.getString( "show_receive_sms_form" )
  • -
  • $i18n.getString( "sms_command_from" )
  • - +

    DHIS Mobile Configuration

    + \ No newline at end of file === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/smscommand/edit-sms-command.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/smscommand/edit-sms-command.vm 2012-06-18 08:51:16 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/smscommand/edit-sms-command.vm 2012-06-27 07:25:34 +0000 @@ -18,7 +18,7 @@
    - +

    Edit command

    - #foreach( $dataSet in $dataSets ) #end - + Separator: - + Code seperator: - + @@ -67,12 +72,17 @@
    - +
    + + + + + + + + + - - - - #foreach( $dataElement in $dataSetElements) #if ($dataElement.categoryCombo && $dataElement.categoryCombo.categories) #foreach($category in $dataElement.categoryCombo.categories) === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/smscommand/new-sms-command.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/smscommand/new-sms-command.vm 2012-06-18 08:51:16 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/smscommand/new-sms-command.vm 2012-06-27 07:25:34 +0000 @@ -1,12 +1,21 @@ + +

    Add command

    -
    Data Element Category CombinationCode
    Data Element Category CombinationCode
    +
    + ## Labels + ## Input + + + + + @@ -14,7 +23,7 @@ Parser: + +
    $i18n.getString( "command_details" )
    Name: - +
    - === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/smscommand/sms-commands.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/smscommand/sms-commands.vm 2012-06-18 08:51:16 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/smscommand/sms-commands.vm 2012-06-27 07:25:34 +0000 @@ -1,21 +1,50 @@ -New command - -
    - - - - + +

    Command management

    +
    + +
    + + + + + +
    + +
    + + + + + + + + + + + + #foreach( $command in $SMSCommands ) - - - +
    #end - + - -
    NameEditDelete
    $velocityCount$command.name $command.name Edit Delete
    \ No newline at end of file + +
    +
    + + + +