You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by sn...@apache.org on 2005/12/01 23:27:25 UTC
svn commit: r351506 - in /incubator/roller/trunk:
src/org/roller/presentation/weblog/actions/CommentManagementAction.java
web/theme/roller.css web/weblog/CommentManagement.jsp
Author: snoopdave
Date: Thu Dec 1 14:27:15 2005
New Revision: 351506
URL: http://svn.apache.org/viewcvs?rev=351506&view=rev
Log:
Fixes and style tweaks in comment management page
Modified:
incubator/roller/trunk/src/org/roller/presentation/weblog/actions/CommentManagementAction.java
incubator/roller/trunk/web/theme/roller.css
incubator/roller/trunk/web/weblog/CommentManagement.jsp
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=351506&r1=351505&r2=351506&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 14:27:15 2005
@@ -110,24 +110,37 @@
if (deleteIds != null && deleteIds.length > 0) {
mgr.removeComments(deleteIds);
}
- // loop through all comments displayed on page
+ // loop through IDs of all comments displayed on page
String[] ids = Utilities.stringToStringArray(queryForm.getIds(),",");
- for (int i=0; i<ids.length; i++) {
- if (deletedList.contains(ids[i])) continue;
+ for (int i=0; i<ids.length; i++) {
+ if (deletedList.contains(ids[i])) continue;
CommentData comment = mgr.retrieveComment(ids[i]);
+
+ // apply spam checkbox
List spamIds = Arrays.asList(queryForm.getSpamComments());
- List approvedIds = Arrays.asList(queryForm.getApprovedComments());
if (spamIds.contains(ids[i])) {
comment.setSpam(Boolean.TRUE);
} else {
comment.setSpam(Boolean.FALSE);
}
- // Only change pending status in website specific view, because
- // we don't want global admins changing pending status of posts.
+ // Only participate in comment review workflow if we're
+ // working within one specfic weblog. Global admins should
+ // be able to mark-as-spam and delete comments without
+ // interfering with moderation by bloggers.
if (rreq.getWebsite() != null) {
+
// all comments reviewed, so they're no longer pending
comment.setPending(Boolean.FALSE);
+
+ // apply pending checkbox
+ List approvedIds =
+ Arrays.asList(queryForm.getApprovedComments());
+ if (approvedIds.contains(ids[i])) {
+ comment.setApproved(Boolean.TRUE);
+ } else {
+ comment.setApproved(Boolean.FALSE);
+ }
}
comment.save();
}
@@ -140,7 +153,7 @@
} catch (Exception e) {
ActionMessages errors = new ActionMessages();
errors.add(ActionErrors.GLOBAL_MESSAGE,
- new ActionMessage("commentManagement.updateError", e.toString()));
+ new ActionMessage("commentManagement.updateError",e.toString()));
saveErrors(request, errors);
logger.error("ERROR updating comments", e);
}
Modified: incubator/roller/trunk/web/theme/roller.css
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/web/theme/roller.css?rev=351506&r1=351505&r2=351506&view=diff
==============================================================================
--- incubator/roller/trunk/web/theme/roller.css (original)
+++ incubator/roller/trunk/web/theme/roller.css Thu Dec 1 14:27:15 2005
@@ -248,12 +248,18 @@
Table styles
---------------------------------------------------------------------- */
+div.tablenav {
+ font-size: 110%
+}
+
table.rollertable {
border-collapse: collapse;
width: 100%;
}
-table.rollertable th, table.rollertable th {
+table.rollertable th {
border: 1px solid #ccc;
+ font-size: 110%;
+ padding: 3px;
}
table.rollertable th {
color: white;
Modified: incubator/roller/trunk/web/weblog/CommentManagement.jsp
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/web/weblog/CommentManagement.jsp?rev=351506&r1=351505&r2=351506&view=diff
==============================================================================
--- incubator/roller/trunk/web/weblog/CommentManagement.jsp (original)
+++ incubator/roller/trunk/web/weblog/CommentManagement.jsp Thu Dec 1 14:27:15 2005
@@ -82,6 +82,8 @@
<%-- Number of comments and date message --%>
<%-- ============================================================= --%>
+ <div class="tablenav">
+
<div style="float:left;">
<fmt:message key="commentManagement.nowShowing">
<fmt:param value="${model.commentCount}" />
@@ -125,13 +127,15 @@
<br /><center>
«
<fmt:message key="commentManagement.prev" />
- | <a href='<c:out value="${model.nextLink}" />'>
+ | <a class="" href='<c:out value="${model.nextLink}" />'>
<fmt:message key="commentManagement.next" /></a>
»
</center><br />
</c:when>
<c:otherwise><br /></c:otherwise>
</c:choose>
+
+ </div> <%-- class="tablenav" --%>
<%-- ============================================================= --%>
@@ -144,10 +148,12 @@
<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}" />' />
+ <input name="weblog" type="hidden"
+ value='<c:out value="${model.website.handle}" />' />
</c:if>
<c:if test="${!empty model.weblogEntry}">
- <input name="entryid" type="hidden" value='<c:out value="${model.weblogEntry.id}" />' />
+ <input name="entryid" type="hidden"
+ value='<c:out value="${model.weblogEntry.id}" />' />
</c:if>
<html:hidden property="ids" />
<html:hidden property="offset" />
@@ -164,17 +170,17 @@
<tr>
<c:if test="${!empty model.website}">
- <th class="rollertable" width="5%" style="font-size:80%">
+ <th class="rollertable" width="5%">
<fmt:message key="commentManagement.columnApproved" />
</th>
</c:if>
- <th class="rollertable" width="5%" style="font-size:80%">
+ <th class="rollertable" width="5%">
<fmt:message key="commentManagement.columnSpam" />
</th>
- <th class="rollertable" width="5%" style="font-size:80%">
+ <th class="rollertable" width="5%" >
<fmt:message key="commentManagement.columnDelete" />
</th>
- <th class="rollertable" width="85%">
+ <th class="rollertable">
<fmt:message key="commentManagement.columnComment" />
</th>
</tr>