Author: channa
Date: Tue Apr  1 01:56:33 2008
New Revision: 15430

Log:

Added recent activity query to user page. MASHUP-727.


Modified:
   trunk/mashup/java/modules/www/activity.jsp
   trunk/mashup/java/modules/www/user.jsp

Modified: trunk/mashup/java/modules/www/activity.jsp
==============================================================================
--- trunk/mashup/java/modules/www/activity.jsp  (original)
+++ trunk/mashup/java/modules/www/activity.jsp  Tue Apr  1 01:56:33 2008
@@ -10,8 +10,9 @@
     QueryResults results;
     String mashupPath = request.getParameter("mashup_path");
     String title = request.getParameter("title");
+    String user = request.getParameter("user");
     String queryPath = MashupConstants.ACTIVITY_QUERY_PATH;
-    String[] params = {mashupPath, "all", "null", "7"};
+    String[] params = {mashupPath, "all", user, "7"};
     Registry registry = RegistryUtils.getRegistry(request);
     results = RegistryUtils
             .doQuery(registry, title, queryPath, params, 
MashupConstants.SHOW_RESULTS_COUNT);
@@ -67,6 +68,7 @@
                     <% } %>
                 </td>
                 <td valign="top" colspan="3">
+                    <% if (user == null || user.equals("")) { %>
                     <% if 
(result.getAuthor().equals(RegistryUtils.getCurrentUser(registry))) { %>
                     <a href="user.jsp?name=<%=result.getAuthor()%>">You</a>
                     <% } else { %>
@@ -74,8 +76,19 @@
                             .getFullName(request, result.getAuthor())%>
                     </a> (<%=result.getAuthor()%>)
                     <% } %>
+                    <% } else { %>
+                    <%=result.getAuthor()%>
+                    <% } %>
                     <%= action %>
-                    <%
+                    <% if (mashupPath == null || mashupPath.equals("")) {
+                        if (action.equals("commented")) { %>on<% }
+                    if (action.equals("deleted")) { %>
+                    <%=result.getName()%>
+                    <% } else { %>
+                    <a href="mashup.jsp?path=<%=path%>"><%=result.getName()%>
+                    </a>
+                    <% }
+                    }
                         if (action.equals("rated")) { %>
                     <%=result.getContentString() %> stars
                     <% } else if (action.equals("tagged")) { %>

Modified: trunk/mashup/java/modules/www/user.jsp
==============================================================================
--- trunk/mashup/java/modules/www/user.jsp      (original)
+++ trunk/mashup/java/modules/www/user.jsp      Tue Apr  1 01:56:33 2008
@@ -443,6 +443,14 @@
                 <% } %>
             </tbody>
         </table>
+        <br>
+        <div class="heading"><%=customizedAuthor%> Actions</div>
+        <div id="activitylist" class="detail-section">
+            <jsp:include page="activity.jsp">
+                <jsp:param name="user" value="<%=memberName%>"/>
+                <jsp:param name="title" value="Actions"/>
+            </jsp:include>
+        </div>
 </tr>
 </table>
 

_______________________________________________
Mashup-dev mailing list
[email protected]
http://www.wso2.org/cgi-bin/mailman/listinfo/mashup-dev

Reply via email to