2009-06-10 22:14:44 +02:00
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
|
|
|
|
xmlns:tal="http://xml.zope.org/namespaces/tal"
|
|
|
|
xmlns:metal="http://xml.zope.org/namespaces/metal"
|
|
|
|
xmlns:i18n="http://xml.zope.org/namespaces/i18n"
|
|
|
|
lang="en"
|
|
|
|
metal:use-macro="context/main_template/macros/master"
|
2009-06-17 01:25:36 +02:00
|
|
|
i18n:domain="plone.app.discussion">
|
2009-06-10 22:14:44 +02:00
|
|
|
<body>
|
|
|
|
|
|
|
|
<metal:scripts fill-slot="javascript_head_slot">
|
|
|
|
<script type="text/javascript">
|
|
|
|
(function($) {$().ready(function() {
|
|
|
|
$('form.background-form').submit(function(e) {
|
|
|
|
e.preventDefault();
|
|
|
|
var target = $(this).attr('action');
|
|
|
|
var params = $(this).serialize();
|
|
|
|
var cell = $(this).parent().get(0);
|
|
|
|
var row = $(cell).parent().get(0);
|
|
|
|
$.post(target, params, function(data) {
|
|
|
|
$(row).fadeOut("normal", function() {
|
|
|
|
$(this).remove();
|
|
|
|
if($('#review-comments tbody tr').length == 0) {
|
|
|
|
$('#comments-help').fadeOut();
|
|
|
|
$('#review-comments').fadeOut("normal", function() {
|
|
|
|
$('#no-comments-message').fadeIn();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
});})(jQuery);
|
|
|
|
</script>
|
|
|
|
</metal:scripts>
|
|
|
|
|
|
|
|
<metal:main fill-slot="main">
|
|
|
|
<tal:main-macro metal:define-macro="main"
|
2009-06-26 16:57:45 +02:00
|
|
|
tal:define="items view/comments">
|
2009-06-10 22:14:44 +02:00
|
|
|
|
|
|
|
<h1 class="documentFirstHeading" i18n:translate="title_review">
|
|
|
|
Review comments
|
|
|
|
</h1>
|
|
|
|
|
2009-06-22 12:07:36 +02:00
|
|
|
<ul class="filter">
|
|
|
|
<li class="all">
|
2009-06-26 16:57:45 +02:00
|
|
|
<form method="post"
|
|
|
|
action="#"
|
|
|
|
tal:attributes="action string:${context/absolute_url}/@@moderate-comments">
|
|
|
|
<input type="submit" value="All" class="context" />
|
|
|
|
</form>
|
2009-06-22 12:07:36 +02:00
|
|
|
</li>
|
2009-06-26 16:57:45 +02:00
|
|
|
<li class="pending">
|
|
|
|
<form method="post" action="#" tal:attributes="action string:${context/absolute_url}/@@moderate-comments">
|
|
|
|
<input type="hidden" name="form.button.FilterPending" value="1" />
|
|
|
|
<input type="submit" value="Pending" class="context" />
|
|
|
|
</form>
|
2009-06-22 12:07:36 +02:00
|
|
|
</li>
|
|
|
|
<li class="approved">
|
2009-06-26 16:57:45 +02:00
|
|
|
<form method="post" action="#" tal:attributes="action string:${context/absolute_url}/@@moderate-comments">
|
|
|
|
<input type="hidden" name="form.button.FilterPublished" value="1" />
|
|
|
|
<input type="submit" value="Published" class="context" />
|
|
|
|
</form>
|
2009-06-22 12:07:36 +02:00
|
|
|
</li>
|
2009-06-26 16:57:45 +02:00
|
|
|
<!--
|
2009-06-22 12:07:36 +02:00
|
|
|
<li class="spam">
|
2009-06-26 16:57:45 +02:00
|
|
|
<a href="#"
|
|
|
|
tal:attributes="href string:${context/absolute_url}/@@comments-spam"
|
|
|
|
i18n:translate="title_filter_spam">Spam</a>
|
2009-06-22 12:07:36 +02:00
|
|
|
</li>
|
2009-06-26 16:57:45 +02:00
|
|
|
-->
|
2009-06-22 12:07:36 +02:00
|
|
|
</ul>
|
|
|
|
|
2009-06-26 16:57:45 +02:00
|
|
|
<form method="post" action="#" tal:attributes="action context/absolute_url">
|
|
|
|
<select name="bulkaction">
|
|
|
|
<option selected="selected" value="-1" i18n:translate="title_bulkactions">Bulk Actions</option>
|
|
|
|
<option value="unapprove" i18n:translate="bulkactions_unapprove">Unapprove</option>
|
|
|
|
<option value="approve" i18n:translate="bulkactions_approve">Approve</option>
|
|
|
|
<option value="markasspam" i18n:translate="bulkactions_markasspam">Mark as Spam</option>
|
|
|
|
<option value="delete" i18n:translate="bulkactions_delete">Delete</option>
|
|
|
|
</select>
|
|
|
|
<input id="dobulkaction"
|
|
|
|
type="submit"
|
|
|
|
class="standalone"
|
|
|
|
value="Apply"
|
|
|
|
name="form.button.BulkAction"
|
|
|
|
i18n:attributes="value label_apply;" />
|
|
|
|
</form>
|
2009-06-22 12:07:36 +02:00
|
|
|
|
2009-06-10 22:14:44 +02:00
|
|
|
<table id="review-comments" class="listing nosort" style="width: 100%" tal:condition="items">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2009-06-22 12:07:36 +02:00
|
|
|
<th colspan="7" class="nosort"
|
|
|
|
i18n:translate="label_select_all">
|
|
|
|
Select:
|
|
|
|
<a tal:attributes="href string:#"
|
|
|
|
id="foldercontents-selectall"
|
|
|
|
i18n:name="label_link_all"
|
|
|
|
i18n:translate="label_all">
|
|
|
|
All
|
|
|
|
</a>
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th class="nosort"> </th>
|
|
|
|
<th i18n:translate="heading_author">Commenter</th>
|
2009-06-10 22:14:44 +02:00
|
|
|
<th i18n:translate="heading_date">Date</th>
|
2009-06-22 12:07:36 +02:00
|
|
|
<th i18n:translate="heading_context">In Response To</th>
|
2009-06-10 22:14:44 +02:00
|
|
|
<th i18n:translate="heading_subject">Subject</th>
|
|
|
|
<th i18n:translate="heading_comment">Comment</th>
|
|
|
|
<th i18n:translate="heading_action">Action</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<tal:block repeat="item items">
|
2009-06-22 12:07:36 +02:00
|
|
|
<tr style="vertical-align: top" class="commentrow"
|
|
|
|
tal:define="odd repeat/item/odd"
|
|
|
|
tal:attributes="class python: odd and 'odd' or 'even'">
|
|
|
|
<td class="notDraggable">
|
|
|
|
<input type="checkbox"
|
|
|
|
class="noborder"
|
|
|
|
name="paths:list" id="#"
|
|
|
|
value="#"
|
|
|
|
tal:attributes="value item/getPath;
|
|
|
|
id string:cb_${item/id};
|
|
|
|
checked item/checked|nothing;
|
|
|
|
alt string:Select ${item/title_or_id};
|
|
|
|
title string:Select ${item/title_or_id}" />
|
|
|
|
<input type="hidden" name="selected_obj_paths:list" value="#"
|
|
|
|
tal:attributes="value item/getURL" />
|
|
|
|
</td>
|
2009-06-10 22:14:44 +02:00
|
|
|
<td tal:content="item/Creator" />
|
2009-06-22 12:07:36 +02:00
|
|
|
<td tal:content="python:toLocalizedTime(item.ModificationDate, long_format=1)" />
|
2009-06-10 22:14:44 +02:00
|
|
|
<td>
|
2009-06-22 12:07:36 +02:00
|
|
|
<a tal:attributes="href item/getURL"
|
|
|
|
tal:content="item/@@plone_context_state/parent|nothing" />
|
2009-06-10 22:14:44 +02:00
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<a tal:attributes="href item/getURL"
|
|
|
|
tal:content="item/Title" />
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td tal:content="structure python:view.cook(item.Description)" />
|
|
|
|
<td style="width: 11em">
|
|
|
|
<form action=""
|
|
|
|
class="background-form"
|
|
|
|
method="post"
|
|
|
|
style="display: inline"
|
2009-06-26 18:03:19 +02:00
|
|
|
tal:attributes="action string:${item/getURL}/@@moderate-publish-comment"
|
|
|
|
tal:condition="python:item.review_state == 'pending'">
|
2009-06-10 22:14:44 +02:00
|
|
|
<input type="hidden" name="comment_id" tal:attributes="value item/getId" />
|
2009-06-26 16:57:45 +02:00
|
|
|
<input type="hidden" name="workflow_action" tal:attributes="value view/transition" />
|
2009-06-10 22:14:44 +02:00
|
|
|
<input class="context comment-publish-button"
|
|
|
|
type="submit"
|
|
|
|
value="Publish"
|
|
|
|
i18n:attributes="value label_publish"
|
|
|
|
/>
|
|
|
|
</form>
|
|
|
|
<form action=""
|
|
|
|
method="post"
|
|
|
|
class="background-form"
|
|
|
|
style="display: inline"
|
2009-06-11 15:44:22 +02:00
|
|
|
tal:attributes="action string:${item/getURL}/@@moderate-delete-comment">
|
2009-06-10 22:14:44 +02:00
|
|
|
<input type="hidden" name="comment_id" tal:attributes="value item/getId" />
|
|
|
|
<input class="destructive comment-delete-button"
|
|
|
|
type="submit"
|
|
|
|
value="Delete"
|
|
|
|
i18n:attributes="value label_delete;"
|
|
|
|
/>
|
|
|
|
</form>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tal:block>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
</tal:main-macro>
|
|
|
|
</metal:main>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|