← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11388: add date into view received SMS page, sort viewing received SMS by date

 

------------------------------------------------------------
revno: 11388
committer: Lai <lai.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2013-07-12 13:39:51 +0700
message:
  add date into view received SMS page, sort viewing received SMS by date
modified:
  dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/inbound/HibernateIncomingSmsStore.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/receiveSMSPage.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-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/inbound/HibernateIncomingSmsStore.java'
--- dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/inbound/HibernateIncomingSmsStore.java	2013-06-20 08:08:08 +0000
+++ dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/inbound/HibernateIncomingSmsStore.java	2013-07-12 06:39:51 +0000
@@ -77,7 +77,7 @@
     public Collection<IncomingSms> getSmsByStatus( SmsMessageStatus status, String keyword )
     {
         Session session = sessionFactory.getCurrentSession();
-        Criteria criteria = session.createCriteria( IncomingSms.class );
+        Criteria criteria = session.createCriteria( IncomingSms.class ).addOrder( Order.desc( "sentDate" ) );
         if ( status != null )
         {
             criteria.add( Restrictions.eq( "status", status ) );

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/receiveSMSPage.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/receiveSMSPage.vm	2013-07-11 07:56:43 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/receiveSMSPage.vm	2013-07-12 06:39:51 +0000
@@ -175,25 +175,28 @@
 		</div>	
 	</div>
 	<br/>
-	<table id="detailsSmsList" class="listTable" style="width:840px">
-		<col width="40px"/>
-		<col width="60px"/>
-		<col width="400px"/>
-		<col width="150px"/>
-		<col width="60px"/>
+	<table id="detailsSmsList" class="listTable" style="width:100%">
+		<col width="40px"/>
+		<col width="40px"/>
+		<col width="200px"/>
+		<col width="100px"/>
+		<col width="60px"/>
+		<col width="120px"/>
 		<col width="70px"/>
+		<col width="40px"/>
 		<thead>
 			<th style="text-align:center"><a href="#" onclick="checkAll()" title="$i18n.getString( 'check_all' )"><img src="../images/check.png"/></a></th>
 			<th style="text-align:center">$i18n.getString( "no." )</th>
 			<th>$i18n.getString( "message" )</th>
 			<th>$i18n.getString( "phone_number" )</th>
 			<th>$i18n.getString( "status" )</th>
+			<th>$i18n.getString( "date" )</th>
 			<th style="text-align:center">$i18n.getString( "action" )</th>
 			<th style="text-align:center">$i18n.getString( "delete" )</th>
 		</thead>
 		<tbody>
 			#foreach( $incomingSms in $listIncomingSms )
-			<tr id="tr${incomingSms.id}">
+			<tr id="tr${incomingSms.id}" height="40">
 				<td style="text-align:center"><input type="checkbox" name="mycheck" value="$incomingSms.id"/></td>			
 				<td style="text-align:center">$velocityCount</td>
 				<td>
@@ -201,6 +204,7 @@
 					<input type="hidden" id="$incomingSms.id" value="$incomingSms.text" onblur="makeVisible( $incomingSms.id, $velocityCount )"/></td>
 				<td>$incomingSms.originator</td>
 				<td>$incomingSms.status</td>
+				<td>$incomingSms.sentDate.toLocaleString()</td>
 				<td style="text-align:center">#if($incomingSms.status == 'FAILED' || $incomingSms.status == 'INCOMING')<a href="javascript:reimport('$i18n.getString( 'reimport_confirm' )','$incomingSms.id')"> Re-import </a> #else None #end</td>
 				<td style="text-align:center"><a href="javascript:removeSingleItem( '$incomingSms.id', '$incomingSms.getText()' )" title="$i18n.getString( 'remove' )"><img src="../images/delete.png" alt="$i18n.getString( 'remove' )"/></td>				
 			</tr>