dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #19385
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8428: Added function for viewing follow up and unread messages
Merge authors:
Lars Helge Øverland (larshelge)
------------------------------------------------------------
revno: 8428 [merge]
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2012-10-08 15:44:41 +0200
message:
Added function for viewing follow up and unread messages
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/message/MessageConversation.java
dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/message/action/GetMessagesAction.java
dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/org/hisp/dhis/dashboard/i18n_module.properties
dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/mainForm.vm
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/profile.vm
dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/style/dashboard.css
--
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-09-30 14:58:00 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/message/MessageConversation.java 2012-10-08 13:44:41 +0000
@@ -78,6 +78,8 @@
private transient String lastSenderFirstname;
+ private transient int messageCount;
+
public MessageConversation()
{
}
@@ -378,6 +380,16 @@
this.lastSenderFirstname = lastSenderFirstname;
}
+ public int getMessageCount()
+ {
+ return messageCount;
+ }
+
+ public void setMessageCount( int messageCount )
+ {
+ this.messageCount = messageCount;
+ }
+
@Override
public void mergeWith( IdentifiableObject other )
{
=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/message/action/GetMessagesAction.java'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/message/action/GetMessagesAction.java 2012-02-14 19:19:27 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/message/action/GetMessagesAction.java 2012-10-08 13:44:41 +0000
@@ -51,6 +51,24 @@
}
// -------------------------------------------------------------------------
+ // Input
+ // -------------------------------------------------------------------------
+
+ private boolean followUp;
+
+ public void setFollowUp( boolean followUp )
+ {
+ this.followUp = followUp;
+ }
+
+ private boolean unread;
+
+ public void setUnread( boolean unread )
+ {
+ this.unread = unread;
+ }
+
+ // -------------------------------------------------------------------------
// Output
// -------------------------------------------------------------------------
@@ -69,7 +87,7 @@
{
this.paging = createPaging( messageService.getMessageConversationCount() );
- conversations = messageService.getMessageConversations( paging.getStartPos(), paging.getPageSize() );
+ conversations = messageService.getMessageConversations( followUp, unread, paging.getStartPos(), paging.getPageSize() );
return SUCCESS;
}
=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/org/hisp/dhis/dashboard/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/org/hisp/dhis/dashboard/i18n_module.properties 2012-10-07 20:10:20 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/org/hisp/dhis/dashboard/i18n_module.properties 2012-10-08 13:44:41 +0000
@@ -78,4 +78,7 @@
email=Email
phone_number=Phone number
org_units=Org units
-edit_profile=Edit profile
\ No newline at end of file
+edit_profile=Edit profile
+inbox=Inbox
+follow_up=Follow up
+unread=Unread
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/mainForm.vm'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/mainForm.vm 2012-10-08 07:13:57 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/mainForm.vm 2012-10-08 13:29:11 +0000
@@ -14,9 +14,9 @@
<div id="dashboardMenu" class="horizontalMenu">
<ul>
- <li><span class="greyButtonLink"><a href="profile.action?id=${currentUser.uid}">$i18n.getString( "profile" )</a></span></li>
- <li><span class="greyButtonLink"><a href="message.action">$i18n.getString( "messages" )</a></span></li>
- <li><span class="greyButtonLink"><a href="interpretation.action">$i18n.getString( "interpretations" )</a></li>
+ <li><a class="greyButtonLink" href="profile.action?id=${currentUser.uid}">$i18n.getString( "profile" )</a></li>
+ <li><a class="greyButtonLink" href="message.action">$i18n.getString( "messages" )</a></li>
+ <li><a class="greyButtonLink" href="interpretation.action">$i18n.getString( "interpretations" )</a></li>
</ul>
</div>
=== 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-07 20:27:56 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/message.vm 2012-10-08 13:44:41 +0000
@@ -1,12 +1,16 @@
<h3>$i18n.getString( "messages" ) #openHelp( "dashboard_messages" )</h3>
-<div class="horizontalMenu" style="padding: 8px 0 36px 0;">
+<div class="horizontalMenu" style="padding: 8px 0 40px 0;">
<ul>
#if( $auth.hasAccess( "dhis-web-dashboard-integration", "sendMessage" ) )
- <li><span class="greyButtonLink"><a href="showSendMessage.action">$i18n.getString( 'write_message' )</a></span></li>
+ <li><a class="blueButtonLink" href="showSendMessage.action">$i18n.getString( 'write_message' )</a></li>
#end
- <li><span class="greyButtonLink"><a href="showSendFeedback.action">$i18n.getString( "write_feedback" )</a></span></li>
+ <li><a class="blueButtonLink" href="showSendFeedback.action">$i18n.getString( "write_feedback" )</a></li>
+ <li><span style="padding-left:12px"></span></li>
+ <li><a class="greyButtonLink" href="message.action">$i18n.getString( "inbox" )</a></li>
+ <li><a class="greyButtonLink" href="message.action?followUp=true">$i18n.getString( "follow_up" )</a></li>
+ <li><a class="greyButtonLink" href="message.action?unread=true">$i18n.getString( "unread" )</a></li>
</ul>
</div>
=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/profile.vm'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/profile.vm 2012-10-08 07:13:57 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/profile.vm 2012-10-08 13:29:11 +0000
@@ -6,7 +6,7 @@
</style>
<div id="userHeader">$!encoder.htmlEncode( $user.firstName ) $!encoder.htmlEncode( $user.surname )</div>
-<div id="userProfileLink" class="blueButtonLink"><a href="../dhis-web-commons-about/showUpdateUserProfileForm.action">$i18n.getString( "edit_profile" )</a></div>
+<div id="userProfileLink"><a class="blueButtonLink" href="../dhis-web-commons-about/showUpdateUserProfileForm.action">$i18n.getString( "edit_profile" )</a></div>
<div id="userCover"><img src="images/profile_cover.jpg" style="border: none; border-bottom-right-radius: 5px;"></div>
=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/style/dashboard.css'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/style/dashboard.css 2012-10-08 07:13:57 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/style/dashboard.css 2012-10-08 13:29:11 +0000
@@ -84,7 +84,7 @@
float: left;
}
-.greyButtonLink a
+.greyButtonLink
{
padding: 6px 12px;
height: 25px;
@@ -93,17 +93,18 @@
margin-right: 4px;
font-family: LiberationSansBold, arial;
font-size: 13px;
- color: #606060;
background-color: #f3f3f3;
+ color: #606060 !important;
+ text-decoration: none !important;
}
-.greyButtonLink a:hover
+.greyButtonLink:hover
{
text-decoration: none;
background-color: #f8f8f8;
}
-.blueButtonLink a
+.blueButtonLink
{
padding: 6px 12px;
height: 25px;
@@ -112,11 +113,12 @@
margin-right: 4px;
font-family: LiberationSansBold, arial;
font-size: 13px;
- color: #fff;
background-color: #4685dd;
+ color: #fff !important;
+ text-decoration: none !important;
}
-.blueButtonLink a:hover
+.blueButtonLink:hover
{
text-decoration: none;
background-color: #3f7fd3;