← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7302: Removed duplicate MessageConversation from Resources. Added sorting for Resources list. Fixed ren...

 

------------------------------------------------------------
revno: 7302
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-06-14 21:28:59 +0300
message:
  Removed duplicate MessageConversation from Resources. Added sorting for Resources list. Fixed rendering of MessageConversations.
modified:
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/utils/WebUtils.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/webdomain/Resources.java
  dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/messageConversation.xsl


--
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-web/dhis-web-api/src/main/java/org/hisp/dhis/api/utils/WebUtils.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/utils/WebUtils.java	2012-06-14 10:41:32 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/utils/WebUtils.java	2012-06-14 18:28:59 +0000
@@ -183,7 +183,6 @@
             builder.append( request.getScheme() );
         }
 
-
         builder.append( "://" ).append( request.getServerName() );
 
         int port;

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/webdomain/Resources.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/webdomain/Resources.java	2012-05-30 08:29:20 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/webdomain/Resources.java	2012-06-14 18:28:59 +0000
@@ -40,9 +40,7 @@
 import org.springframework.util.StringUtils;
 import org.springframework.web.bind.annotation.RequestMethod;
 
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 /**
  * At some point this class will be extended to show all available options
@@ -94,6 +92,13 @@
             resources.add( new Resource( StringUtils.capitalize( entry.getValue() ), entry.getKey(), requestMethods, mediaTypes ) );
         }
 
-        resources.add( new Resource( "MessageConversations", MessageConversations.class, requestMethods, mediaTypes ) );
+        Collections.sort(resources, new Comparator<Resource>()
+        {
+            @Override
+            public int compare( Resource o1, Resource o2 )
+            {
+                return o1.getName().compareTo( o2.getName() );
+            }
+        });
     }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/messageConversation.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/messageConversation.xsl	2012-04-08 20:23:29 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/messageConversation.xsl	2012-06-14 18:28:59 +0000
@@ -45,11 +45,7 @@
     <table>
       <tr>
         <td style="width: 80px;">Text</td>
-        <td style="width: 800px;"> <xsl:value-of select="d:text" /> </td>
-      </tr>
-      <tr>
-        <td>Sender</td>
-        <td> <xsl:value-of select="d:sender/@name" /> </td>
+        <td style="width: 800px;"> <xsl:value-of select="@name" /> </td>
       </tr>
     </table>
     <br/>