roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r350283 - in /incubator/roller/trunk: metadata/xdoclet/ src/org/roller/business/ src/org/roller/presentation/tags/menu/ src/org/roller/presentation/weblog/actions/ web/WEB-INF/ web/WEB-INF/classes/ web/weblog/
Date Thu, 01 Dec 2005 17:30:46 GMT
Author: snoopdave
Date: Thu Dec  1 09:30:30 2005
New Revision: 350283

URL: http://svn.apache.org/viewcvs?rev=350283&view=rev
Log:
Ability to manage comments across all weblogs in system

Modified:
    incubator/roller/trunk/metadata/xdoclet/global-forwards.xml
    incubator/roller/trunk/src/org/roller/business/ThemeManagerImpl.java
    incubator/roller/trunk/src/org/roller/presentation/tags/menu/BaseRollerMenu.java
    incubator/roller/trunk/src/org/roller/presentation/tags/menu/MenuImpl.java
    incubator/roller/trunk/src/org/roller/presentation/tags/menu/MenuItemImpl.java
    incubator/roller/trunk/src/org/roller/presentation/weblog/actions/CommentManagementAction.java
    incubator/roller/trunk/web/WEB-INF/admin-menu.xml
    incubator/roller/trunk/web/WEB-INF/classes/ApplicationResources.properties
    incubator/roller/trunk/web/WEB-INF/editor-menu.xml
    incubator/roller/trunk/web/WEB-INF/tiles-defs.xml
    incubator/roller/trunk/web/weblog/CommentManagement.jsp
    incubator/roller/trunk/web/weblog/CommentManagementSidebar.jsp

Modified: incubator/roller/trunk/metadata/xdoclet/global-forwards.xml
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/metadata/xdoclet/global-forwards.xml?rev=350283&r1=350282&r2=350283&view=diff
==============================================================================
--- incubator/roller/trunk/metadata/xdoclet/global-forwards.xml (original)
+++ incubator/roller/trunk/metadata/xdoclet/global-forwards.xml Thu Dec  1 09:30:30 2005
@@ -24,13 +24,13 @@
 <forward name="weblogCreate"           path="/editor/weblog.do?method=create"/>
 <forward name="weblogQuery"            path="/editor/weblogQuery.do?method=query"/>
 <forward name="commentManagement"      path="/editor/commentManagement.do?method=query"/>
+<forward name="commentQuery"           path="/editor/commentQuery.do?method=query"/>
 <forward name="categories"             path="/editor/categories.do?method=selectCategory"/>
 <forward name="bookmarks"              path="/editor/bookmarks.do?method=selectFolder"/>
 <forward name="importBookmarks"        path="/editor/importBookmarks.do"/>
 <forward name="uploadFiles"            path="/editor/uploadFiles.do"/>
 <forward name="referers"               path="/editor/referers.do"/>
 
-
 <!-- manage weblog actions -->
 
 <forward name="editWebsite"            path="/editor/website.do?method=edit"/>
@@ -53,6 +53,7 @@
 <forward name="rollerConfig"            path="/admin/rollerConfig.do?method=edit"/>
 <forward name="adminUser"               path="/admin/user.do?method=edit"/>
 <forward name="commentManagementGlobal" path="/admin/commentManagement.do?method=query"/>
+<forward name="commentQueryGlobal"      path="/admin/commentQuery.do?method=query"/>
 <forward name="addUser"                 path="/admin/user.do?method=add"/>
 <forward name="commonPingTargets"       path="/admin/commonPingTargets.do"/>
 

Modified: incubator/roller/trunk/src/org/roller/business/ThemeManagerImpl.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/src/org/roller/business/ThemeManagerImpl.java?rev=350283&r1=350282&r2=350283&view=diff
==============================================================================
--- incubator/roller/trunk/src/org/roller/business/ThemeManagerImpl.java (original)
+++ incubator/roller/trunk/src/org/roller/business/ThemeManagerImpl.java Thu Dec  1 09:30:30
2005
@@ -216,7 +216,7 @@
      */
     private Theme loadThemeFromDisk(String theme_name, String themepath) {
         
-        mLogger.info("Loading theme "+theme_name+" from "+themepath);  
+        mLogger.info("Loading theme "+theme_name);  
         
         Theme theme = new Theme();
         theme.setName(theme_name);

Modified: incubator/roller/trunk/src/org/roller/presentation/tags/menu/BaseRollerMenu.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/src/org/roller/presentation/tags/menu/BaseRollerMenu.java?rev=350283&r1=350282&r2=350283&view=diff
==============================================================================
--- incubator/roller/trunk/src/org/roller/presentation/tags/menu/BaseRollerMenu.java (original)
+++ incubator/roller/trunk/src/org/roller/presentation/tags/menu/BaseRollerMenu.java Thu Dec
 1 09:30:30 2005
@@ -29,6 +29,7 @@
 {
     protected String mName = null;
 	protected String mForward = null;
+	protected String mSubforwards = null;
     protected String mEnabledProperty = null;
     protected String mDisabledProperty = null;
     protected List mRoles = new ArrayList();
@@ -69,6 +70,12 @@
 
 	/** Struts forward */ 
 	public void setForward( String forward ) { mForward = forward; }
+
+    /** Subforward: other forwards grouped under this menu */ 
+	public String getSubforwards() { return mSubforwards; }
+
+	/** Subforwards: other forwards grouped under this menu */ 
+	public void setSubforwards( String subforwards ) { mSubforwards = subforwards; }
 
     /** Roles allowed to view menu, comma separated */ 
     public void setRoles( String roles ) 

Modified: incubator/roller/trunk/src/org/roller/presentation/tags/menu/MenuImpl.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/src/org/roller/presentation/tags/menu/MenuImpl.java?rev=350283&r1=350282&r2=350283&view=diff
==============================================================================
--- incubator/roller/trunk/src/org/roller/presentation/tags/menu/MenuImpl.java (original)
+++ incubator/roller/trunk/src/org/roller/presentation/tags/menu/MenuImpl.java Thu Dec  1
09:30:30 2005
@@ -1,6 +1,9 @@
 
 package org.roller.presentation.tags.menu;
 
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
 import java.util.Vector;
 import javax.servlet.ServletContext;
 
@@ -140,20 +143,26 @@
         {
             ServletContext ctx = RollerContext.getServletContext();     
 			ModuleConfig mConfig = RequestUtils.getModuleConfig(req, ctx);
-			ForwardConfig fconfig = mConfig.findForwardConfig(mForward);
-            ActionMapping amapping = 
-                    (ActionMapping)req.getAttribute(Globals.MAPPING_KEY);            
-			if (fconfig != null && amapping != null)
-			{
-                String reqPath = amapping.getPath();
+            ActionMapping amapping = (ActionMapping)req.getAttribute(Globals.MAPPING_KEY);
+            List fconfigs = new ArrayList();
+			fconfigs.add(mConfig.findForwardConfig(mForward));
+            if (mSubforwards != null) {
+                String[] subforwards = mSubforwards.split(",");
+                for (int i=0; i<subforwards.length; i++) {
+                    fconfigs.add(mConfig.findForwardConfig(subforwards[i]));
+                }
+            }
+            for (Iterator iter = fconfigs.iterator(); iter.hasNext();) {
+                ForwardConfig fconfig = (ForwardConfig)iter.next();
                 String fwdPath = fconfig.getPath();
                 int end = fwdPath.indexOf(".do");
                 fwdPath = (end == -1) ? fwdPath : fwdPath.substring(0, end);
-                if  (fwdPath.equals(reqPath))
+                if  (fwdPath.equals(amapping.getPath()))
                 {
                     selected = true;
-                }
-			}
+                    break;
+                } 
+            }
         }
 		return selected;
 	}

Modified: incubator/roller/trunk/src/org/roller/presentation/tags/menu/MenuItemImpl.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/src/org/roller/presentation/tags/menu/MenuItemImpl.java?rev=350283&r1=350282&r2=350283&view=diff
==============================================================================
--- incubator/roller/trunk/src/org/roller/presentation/tags/menu/MenuItemImpl.java (original)
+++ incubator/roller/trunk/src/org/roller/presentation/tags/menu/MenuItemImpl.java Thu Dec
 1 09:30:30 2005
@@ -1,12 +1,13 @@
 
 package org.roller.presentation.tags.menu;
 
-import java.util.Hashtable;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
 
 import javax.servlet.ServletContext;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpSession;
-import javax.servlet.jsp.PageContext;
 import org.apache.struts.Globals;
 import org.apache.struts.action.ActionMapping;
 
@@ -66,23 +67,28 @@
         }
 		else if (mForward != null) 
 		{
-			// next, can we use Struts forward name to find menu state
             ServletContext ctx = RollerContext.getServletContext();     
 			ModuleConfig mConfig = RequestUtils.getModuleConfig(req, ctx);
-			ForwardConfig fconfig = mConfig.findForwardConfig(mForward);
-            ActionMapping amapping = 
-                    (ActionMapping)req.getAttribute(Globals.MAPPING_KEY);            
-			if (fconfig != null && amapping != null)
-			{
-                String reqPath = amapping.getPath();
+            ActionMapping amapping = (ActionMapping)req.getAttribute(Globals.MAPPING_KEY);
+            List fconfigs = new ArrayList();
+			fconfigs.add(mConfig.findForwardConfig(mForward));
+            if (mSubforwards != null) {
+                String[] subforwards = mSubforwards.split(",");
+                for (int i=0; i<subforwards.length; i++) {
+                    fconfigs.add(mConfig.findForwardConfig(subforwards[i]));
+                }
+            }
+            for (Iterator iter = fconfigs.iterator(); iter.hasNext();) {
+                ForwardConfig fconfig = (ForwardConfig)iter.next();
                 String fwdPath = fconfig.getPath();
                 int end = fwdPath.indexOf(".do");
                 fwdPath = (end == -1) ? fwdPath : fwdPath.substring(0, end);
-                if  (fwdPath.equals(reqPath))
+                if  (fwdPath.equals(amapping.getPath()))
                 {
                     selected = true;
-                }
-			}
+                    break;
+                } 
+            }
 		}
         
         // still not found, look for menu state in session attributes

Modified: incubator/roller/trunk/src/org/roller/presentation/weblog/actions/CommentManagementAction.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/src/org/roller/presentation/weblog/actions/CommentManagementAction.java?rev=350283&r1=350282&r2=350283&view=diff
==============================================================================
--- incubator/roller/trunk/src/org/roller/presentation/weblog/actions/CommentManagementAction.java
(original)
+++ incubator/roller/trunk/src/org/roller/presentation/weblog/actions/CommentManagementAction.java
Thu Dec  1 09:30:30 2005
@@ -39,7 +39,14 @@
  * @struts.action path="/editor/commentQuery" name="commentQueryForm" 
  *     scope="request" parameter="method"
  *
+ * @struts.action path="/admin/commentManagement" name="commentManagementForm" 
+ *     scope="request" parameter="method"
+ *
+ * @struts.action path="/admin/commentQuery" name="commentQueryForm" 
+ *     scope="request" parameter="method"
+ *
  * @struts.action-forward name="commentManagement.page" path=".CommentManagement"
+ * @struts.action-forward name="commentManagementGlobal.page" path=".CommentManagementGlobal"
  */
 public final class CommentManagementAction extends DispatchAction {
     
@@ -64,8 +71,15 @@
             queryForm.setWeblog(rreq.getWebsite().getHandle());
         }        
         request.setAttribute("model", new CommentManagementPageModel(
-           "commentManagement.title", request, response, mapping, queryForm)); 
-        return mapping.findForward("commentManagement.page");
+           "commentManagement.title", request, response, mapping, queryForm));
+        if (request.getAttribute("commentManagementForm") == null) {
+            request.setAttribute("commentManagementForm", actionForm);
+        }
+        
+        if (rreq.getWebsite() != null) {
+            return mapping.findForward("commentManagement.page");
+        }
+        return mapping.findForward("commentManagementGlobal.page");
     }
 
     public ActionForward update(
@@ -84,9 +98,10 @@
         else if (rreq.getWebsite() != null) {
             queryForm.setWeblog(rreq.getWebsite().getHandle());
         }    
-        RollerSession rollerSession = RollerSession.getRollerSession(request);
+        RollerSession rses = RollerSession.getRollerSession(request);
         try {
-            if (rollerSession.isUserAuthorizedToAuthor(rreq.getWebsite())) { 
+            if (rses.isGlobalAdminUser() 
+                || (rreq.getWebsite()!=null && rses.isUserAuthorizedToAuthor(rreq.getWebsite()))
) { 
                 WeblogManager mgr= RollerFactory.getRoller().getWeblogManager();
                 
                 // delete all comments with delete box checked
@@ -107,8 +122,13 @@
                     } else {
                         comment.setSpam(Boolean.FALSE);
                     }
-                    // all comments have been reviewed, so they're no longer pending
-                    comment.setPending(Boolean.FALSE);
+                    
+                    // Only change pending status in website specific view, because
+                    // we don't want global admins changing pending status of posts.
+                    if (rreq.getWebsite() != null) {
+                        // all comments reviewed, so they're no longer pending
+                        comment.setPending(Boolean.FALSE);
+                    }
                     comment.save();
                 }               
                 RollerFactory.getRoller().commit();
@@ -127,7 +147,14 @@
         CommentManagementPageModel model = new CommentManagementPageModel(
            "commentManagement.title", request, response, mapping, queryForm);
         request.setAttribute("model", model); 
-        return mapping.findForward("commentManagement.page");
+        if (request.getAttribute("commentManagementForm") == null) {
+            request.setAttribute("commentManagementForm", actionForm);
+        }
+        
+        if (rreq.getWebsite() != null) {
+            return mapping.findForward("commentManagement.page");
+        }
+        return mapping.findForward("commentManagementGlobal.page");
     }
     
     public class CommentManagementPageModel extends BasePageModel {
@@ -185,11 +212,18 @@
             return ret > queryForm.getCount() ? queryForm.getCount() : ret;
         }
         
+        /**
+         * Number of pending entries on current page of results.
+         * Returns zero when managing comments across entire site, because 
+         * we don't want global admins to change pending status of posts.
+         */        
         public int getPendingCommentCount() {
             int count = 0;
-            for (Iterator iter = comments.iterator(); iter.hasNext();) {
-                CommentData cd = (CommentData)iter.next();
-                if (cd.getPending().booleanValue()) count++;
+            if (getWebsite() != null) { 
+                for (Iterator iter = comments.iterator(); iter.hasNext();) {
+                    CommentData cd = (CommentData)iter.next();
+                    if (cd.getPending().booleanValue()) count++;
+                }
             }
             return count;
         }

Modified: incubator/roller/trunk/web/WEB-INF/admin-menu.xml
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/web/WEB-INF/admin-menu.xml?rev=350283&r1=350282&r2=350283&view=diff
==============================================================================
--- incubator/roller/trunk/web/WEB-INF/admin-menu.xml (original)
+++ incubator/roller/trunk/web/WEB-INF/admin-menu.xml Thu Dec  1 09:30:30 2005
@@ -12,7 +12,8 @@
         <menu-item forward="adminUser"          name="tabbedmenu.admin.userAdmin" 
                                                 roles="admin" perms="any"/>
         <menu-item forward="commentManagementGlobal" name="tabbedmenu.admin.commentManagement"

-                                                roles="admin" perms="any"/>
+                                                roles="admin" perms="any" 
+                                                subforwards="commentQueryGlobal" />
         <menu-item forward="commonPingTargets"  name="tabbedmenu.admin.pingTargets"
                                                 roles="admin" perms="any"/>
     </menu>

Modified: incubator/roller/trunk/web/WEB-INF/classes/ApplicationResources.properties
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/web/WEB-INF/classes/ApplicationResources.properties?rev=350283&r1=350282&r2=350283&view=diff
==============================================================================
--- incubator/roller/trunk/web/WEB-INF/classes/ApplicationResources.properties (original)
+++ incubator/roller/trunk/web/WEB-INF/classes/ApplicationResources.properties Thu Dec  1
09:30:30 2005
@@ -187,6 +187,12 @@
 Remember to click the <em>Save changes</em> button when you are done \
 (even if you make no changes).
 
+commentManagement.globalTip=As a global administrator \
+You can change spam status and delete comments via the checkboxes below. \
+You cannot change pending and approved status here, so you won\'t interfere \
+with anybody\'s comment approval workflow. If you make any changes, be sure to \
+save them by clicking the <em>Save changes</em> at the bottom of the page.
+
 commentManagement.nowShowing=Displaying <b>{0}</b> comments
 commentManagement.noCommentsFound=No comments found
 
@@ -1252,6 +1258,7 @@
 weblogEdit.changesSaved=Changes saved
 weblogEdit.check=Spell Check
 weblogEdit.comments=Comments
+weblogEdit.commentSettings=Comment settings
 weblogEdit.correctSpelling=Submit Corrections 	
 weblogEdit.entryCol=Weblog Entries
 weblogEdit.edit=Edit

Modified: incubator/roller/trunk/web/WEB-INF/editor-menu.xml
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/web/WEB-INF/editor-menu.xml?rev=350283&r1=350282&r2=350283&view=diff
==============================================================================
--- incubator/roller/trunk/web/WEB-INF/editor-menu.xml (original)
+++ incubator/roller/trunk/web/WEB-INF/editor-menu.xml Thu Dec  1 09:30:30 2005
@@ -28,7 +28,8 @@
         <menu-item forward="weblogQuery"  name="tabbedmenu.weblog.archives" 
                                           perms="admin,author,limited" />
         <menu-item forward="commentManagement" name="tabbedmenu.admin.commentManagement"

-                                          perms="admin"/>
+                                          perms="admin" 
+                                          subforwards="commentQuery" />
         <menu-item forward="categories"   name="tabbedmenu.weblog.categories" />
         <menu-item forward="bookmarks"    name="tabbedmenu.bookmarks.allFolders" />
         <menu-item forward="uploadFiles"  name="tabbedmenu.website.files" />

Modified: incubator/roller/trunk/web/WEB-INF/tiles-defs.xml
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/web/WEB-INF/tiles-defs.xml?rev=350283&r1=350282&r2=350283&view=diff
==============================================================================
--- incubator/roller/trunk/web/WEB-INF/tiles-defs.xml (original)
+++ incubator/roller/trunk/web/WEB-INF/tiles-defs.xml Thu Dec  1 09:30:30 2005
@@ -158,6 +158,11 @@
     <put name="sidebar" value="/website/edit-pages-sidebar.jsp" />
     <put name="styles" value="/theme/css-sidebar.jsp" />
 </definition>
+<definition name=".CommentManagementGlobal" extends=".tiles-adminpage" >
+    <put name="content" value="/weblog/CommentManagement.jsp" />
+    <put name="sidebar" value="/weblog/CommentManagementSidebar.jsp" />
+    <put name="styles" value="/theme/css-sidebar.jsp" />
+</definition>
 <definition name=".MemberPermissions" extends=".tiles-editorpage" >
     <put name="content" value="/website/MemberPermissions.jsp" />
     <put name="sidebar" value="/website/MemberPermissionsSidebar.jsp" />

Modified: incubator/roller/trunk/web/weblog/CommentManagement.jsp
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/web/weblog/CommentManagement.jsp?rev=350283&r1=350282&r2=350283&view=diff
==============================================================================
--- incubator/roller/trunk/web/weblog/CommentManagement.jsp (original)
+++ incubator/roller/trunk/web/weblog/CommentManagement.jsp Thu Dec  1 09:30:30 2005
@@ -2,8 +2,8 @@
 <%@ page import="org.roller.presentation.weblog.actions.CommentManagementAction" %>
 <%@ page import="org.roller.presentation.RollerRequest" %>
 <%
-//CommentManagementAction.CommentManagementPageModel model = 
-    //(CommentManagementAction.CommentManagementPageModel)request.getAttribute("model");
+CommentManagementAction.CommentManagementPageModel model = 
+    (CommentManagementAction.CommentManagementPageModel)request.getAttribute("model");
 %>
 <script type="text/javascript">
 <!-- 
@@ -64,11 +64,14 @@
 <%-- ===================================================================== --%>
 
 <c:choose>
-    <c:when test="${model.pendingCommentCount == 0}">
+    <c:when test="${model.pendingCommentCount > 0}">
+        <p class="pagetip"><fmt:message key="commentManagement.pendingTip" /></p>
   
+    </c:when>
+    <c:when test="${!empty model.website}">
         <p class="pagetip"><fmt:message key="commentManagement.tip" /></p>
   
     </c:when>
     <c:otherwise>
-        <p class="pagetip"><fmt:message key="commentManagement.pendingTip" /></p>
   
+        <p class="pagetip"><fmt:message key="commentManagement.globalTip" /></p>
   
     </c:otherwise>
 </c:choose>
 
@@ -135,7 +138,10 @@
         <%-- Comment table / form with checkboxes --%>
         <%-- ============================================================= --%>
         
-        <html:form action="/editor/commentManagement" method="post">
+        <% String path = model.getWebsite()==null 
+                ? "/admin/commentManagement" : "/editor/commentManagement"; %>
+        <html:form action="<%= path %>" method="post">
+        
             <input type="hidden" name="method" value="update"/>
             <c:if test="${!empty model.website}">
                 <input name="weblog" type="hidden" value='<c:out value="${model.website.handle}"
/>' />
@@ -157,9 +163,11 @@
            <%-- Comment table header --%>
            
            <tr>
-                <th class="rollertable" width="5%" style="font-size:80%">
-                    <fmt:message key="commentManagement.columnApproved" />
-                </th>
+                <c:if test="${!empty model.website}">
+                    <th class="rollertable" width="5%" style="font-size:80%">
+                        <fmt:message key="commentManagement.columnApproved" />
+                    </th>
+                </c:if>
                 <th class="rollertable" width="5%" style="font-size:80%">
                     <fmt:message key="commentManagement.columnSpam" />
                 </th>
@@ -176,13 +184,15 @@
            
             <c:if test="${model.commentCount > 1}">
                 <tr class="actionrow">
-                    <td align="center">
-                        <fmt:message key="commentManagement.select" /><br/>
-                        <a href="#" onclick='setChecked(1,"approvedComments")'>
-                            <fmt:message key="commentManagement.all" /></a><br
/> 
-                        <a href="#" onclick='setChecked(0,"approvedComments")'>
-                            <fmt:message key="commentManagement.none" /></a>
-                    </td>
+                    <c:if test="${!empty model.website}">
+                        <td align="center">
+                            <fmt:message key="commentManagement.select" /><br/>
+                            <a href="#" onclick='setChecked(1,"approvedComments")'>
+                                <fmt:message key="commentManagement.all" /></a><br
/> 
+                            <a href="#" onclick='setChecked(0,"approvedComments")'>
+                                <fmt:message key="commentManagement.none" /></a>
+                        </td>
+                    </c:if>
                     <td align="center">
                         <fmt:message key="commentManagement.select" /><br/>
                         <a href="#" onclick='setChecked(1,"spamComments")'>
@@ -213,11 +223,18 @@
 
             <c:forEach var="comment" items="${model.comments}">
             <tr>
-                <td>
-                    <html:multibox property="approvedComments">
-                        <c:out value="${comment.id}" />
-                    </html:multibox>
-                </td>
+                <c:choose>
+                    <c:when test="${!empty model.website}">
+                        <td>
+                            <html:multibox property="approvedComments">
+                                <c:out value="${comment.id}" />
+                            </html:multibox>
+                        </td>
+                    </c:when>
+                    <c:otherwise>
+                        <html:hidden property="approvedComments"/>
+                    </c:otherwise>
+                </c:choose>
                 <td>
                     <html:multibox property="spamComments">
                         <c:out value="${comment.id}" />

Modified: incubator/roller/trunk/web/weblog/CommentManagementSidebar.jsp
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/web/weblog/CommentManagementSidebar.jsp?rev=350283&r1=350282&r2=350283&view=diff
==============================================================================
--- incubator/roller/trunk/web/weblog/CommentManagementSidebar.jsp (original)
+++ incubator/roller/trunk/web/weblog/CommentManagementSidebar.jsp Thu Dec  1 09:30:30 2005
@@ -16,7 +16,10 @@
 
 <p><fmt:message key="commentManagement.sidebarDescription" /></p>
     
-<html:form action="/editor/commentQuery" method="post">
+ <% String path = model.getWebsite()==null 
+    ? "/admin/commentQuery" : "/editor/commentQuery"; %>
+ <html:form action="<%= path %>" method="post">
+ 
     <c:if test="${!empty model.website}">
         <input name="weblog" type="hidden" value='<c:out value="${model.website.handle}"
/>' />
     </c:if>



Mime
View raw message