dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #19387
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8430: Displaying number of messages in list of message conversations
------------------------------------------------------------
revno: 8430
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2012-10-08 16:17:25 +0200
message:
Displaying number of messages in list of message conversations
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/message/MessageConversation.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/message/hibernate/HibernateMessageConversationStore.java
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/green/green.css
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/india/india.css
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/light_blue/light_blue.css
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/vietnam/vietnam.css
dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/message.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/MessageConversation.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/message/MessageConversation.java 2012-10-08 13:44:41 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/message/MessageConversation.java 2012-10-08 14:17:25 +0000
@@ -50,9 +50,9 @@
public class MessageConversation
extends BaseIdentifiableObject
{
- //-------------------------------------------------------------------------------------------------------
+ //--------------------------------------------------------------------------
// Persistent fields
- //-------------------------------------------------------------------------------------------------------
+ //--------------------------------------------------------------------------
private String subject;
@@ -66,9 +66,9 @@
@Scanned
private List<Message> messages = new ArrayList<Message>();
- //-------------------------------------------------------------------------------------------------------
+ //--------------------------------------------------------------------------
// Transient fields
- //-------------------------------------------------------------------------------------------------------
+ //--------------------------------------------------------------------------
private transient boolean read;
@@ -79,7 +79,11 @@
private transient String lastSenderFirstname;
private transient int messageCount;
-
+
+ //--------------------------------------------------------------------------
+ // Constructors
+ //--------------------------------------------------------------------------
+
public MessageConversation()
{
}
@@ -91,9 +95,9 @@
this.lastMessage = new Date();
}
- //-------------------------------------------------------------------------------------------------------
+ //--------------------------------------------------------------------------
// Logic
- //-------------------------------------------------------------------------------------------------------
+ //--------------------------------------------------------------------------
@Override
public int hashCode()
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/message/hibernate/HibernateMessageConversationStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/message/hibernate/HibernateMessageConversationStore.java 2012-06-30 12:58:55 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/message/hibernate/HibernateMessageConversationStore.java 2012-10-08 14:17:25 +0000
@@ -66,7 +66,8 @@
SqlHelper sh = new SqlHelper();
String sql =
- "select mc.messageconversationid, mc.uid, mc.subject, mc.lastmessage, ui.surname, ui.firstname, um.isread, um.isfollowup " +
+ "select mc.messageconversationid, mc.uid, mc.subject, mc.lastmessage, ui.surname, ui.firstname, um.isread, um.isfollowup, (" +
+ "select count(messageconversationid) from messageconversation_messages mcm where mcm.messageconversationid=mc.messageconversationid) as messagecount " +
"from messageconversation mc " +
"left join messageconversation_usermessages mu on mc.messageconversationid=mu.messageconversationid " +
"left join usermessage um on mu.usermessageid=um.usermessageid " +
@@ -108,6 +109,7 @@
conversation.setLastSenderFirstname( resultSet.getString( 6 ) );
conversation.setRead( resultSet.getBoolean( 7 ) );
conversation.setFollowUp( resultSet.getBoolean( 8 ) );
+ conversation.setMessageCount( resultSet.getInt( 9 ) );
return conversation;
}
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/green/green.css'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/green/green.css 2012-10-07 19:07:53 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/green/green.css 2012-10-08 14:17:25 +0000
@@ -407,7 +407,12 @@
.bold, .bold td
{
- font-family: LiberationSansBold, arial;
+ font-family: LiberationSansBold, arial, sans-serif;
+}
+
+.normal
+{
+ font-family: LiberationSansRegular, arial, sans-serif;
}
/*----------------------------------------------------------------------------*/
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/india/india.css'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/india/india.css 2012-08-01 18:04:45 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/india/india.css 2012-10-08 14:17:25 +0000
@@ -425,7 +425,12 @@
.bold, .bold td
{
- font-family: LiberationSansBold, arial;
+ font-family: LiberationSansBold, arial, sans-serif;
+}
+
+.normal
+{
+ font-family: LiberationSansRegular, arial, sans-serif;
}
/*----------------------------------------------------------------------------*/
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/light_blue/light_blue.css'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/light_blue/light_blue.css 2012-10-07 19:07:53 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/light_blue/light_blue.css 2012-10-08 14:17:25 +0000
@@ -403,7 +403,12 @@
.bold, .bold td
{
- font-family: LiberationSansBold, arial;
+ font-family: LiberationSansBold, arial, sans-serif;
+}
+
+.normal
+{
+ font-family: LiberationSansRegular, arial, sans-serif;
}
/*----------------------------------------------------------------------------*/
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/vietnam/vietnam.css'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/vietnam/vietnam.css 2012-10-03 14:08:20 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/vietnam/vietnam.css 2012-10-08 14:17:25 +0000
@@ -401,7 +401,12 @@
.bold, .bold td
{
- font-family: LiberationSansBold, arial;
+ font-family: LiberationSansBold, arial, sans-serif;
+}
+
+.normal
+{
+ font-family: LiberationSansRegular, arial, sans-serif;
}
/*----------------------------------------------------------------------------*/
=== 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 2012-10-08 13:44:41 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/message.vm 2012-10-08 14:17:25 +0000
@@ -26,7 +26,9 @@
<tr id="tr${conversation.id}" #if( !$conversation.read )class="unread bold"#end>
<td style="width:40px;padding-left:5px;" onclick="toggleFollowUp( '${conversation.id}' )">
<img id="followUp${conversation.id}" #if( $conversation.followUp ) src="../images/marked.png"#else src="../images/unmarked.png"#end></td>
- <td style="width:200px" onclick="read( '${conversation.id}' )">$!encoder.htmlEncode( $conversation.lastSenderName )</td>
+ <td style="width:200px" onclick="read( '${conversation.id}' )">
+ $!encoder.htmlEncode( $conversation.lastSenderName )#if( $conversation.messageCount > 1 ) <span class="normal">(${conversation.messageCount})</span>#end
+ </td>
<td onclick="read( '${conversation.id}' )">$!encoder.htmlEncode( $conversation.subject )</td>
<td onclick="read( '${conversation.id}' )" style="width:80px">$!format.formatDate( $conversation.lastMessage )</td>
<td style="width:70px; text-align:center;">