plone.app.discussion/plone/app/discussion/browser/moderation.pt

151 lines
7.9 KiB
Plaintext
Raw Normal View History

<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"
i18n:domain="plone.app.discussion">
<body>
<metal:main fill-slot="main">
<tal:main-macro metal:define-macro="main"
tal:define="items view/comments;
filter view/filter|nothing;">
<h1 class="documentFirstHeading" i18n:translate="title_review">
Review comments
</h1>
<ul class="filter">
<li class="all">
<form method="post"
action="#"
tal:attributes="action string:${context/absolute_url}/@@moderate-comments">
<input type="submit" value="All" class="context"
tal:attributes="class python: not filter and 'context selected' or 'context'" />
</form>
</li>
<li class="pending">
<form method="post" action="#" tal:attributes="action string:${context/absolute_url}/@@moderate-comments">
<input type="hidden" name="form.button.Filter" value="pending" />
<input type="submit" value="Pending" class="context"
tal:attributes="class python:filter == 'pending' and 'context selected' or 'context'"/>
</form>
</li>
<li class="approved">
<form method="post" action="#" tal:attributes="action string:${context/absolute_url}/@@moderate-comments">
<input type="hidden" name="form.button.Filter" value="published" />
<input type="submit" value="Published" class="context"
tal:attributes="class python:filter == 'published' and 'context selected' or 'context'"/>
</form>
</li>
<!--
<li class="spam">
<a href="#"
tal:attributes="href string:${context/absolute_url}/@@comments-spam"
i18n:translate="title_filter_spam">Spam</a>
</li>
-->
</ul>
<form method="post"
action="#"
class="bulkactions"
tal:attributes="action string:${context/absolute_url}/@@bulk-actions">
<select name="form.select.BulkAction">
<option selected="selected" value="-1" i18n:translate="title_bulkactions">Bulk Actions</option>
<!--<option value="retract" i18n:translate="bulkactions_retract">Retract</option>-->
<option value="publish"
i18n:translate="bulkactions_publish"
tal:condition="python: filter != 'published'">Publish</option>
<!--<option value="mark_as_spam" i18n:translate="bulkactions_markasspam">Mark as Spam</option>-->
<option value="delete" i18n:translate="bulkactions_delete">Delete</option>
</select>
<input type="hidden" name="form.button.Filter" tal:attributes="value filter" value="" />
<input id="dobulkaction"
type="submit"
class="standalone allowMultiSubmit"
value="Apply"
name="form.button.BulkAction"
i18n:attributes="value label_apply;" />
<table id="review-comments" class="listing" style="width: 100%" tal:condition="items">
<thead>
<tr>
<th class="nosort"><input name="check_all" type="checkbox" value="0" /></th>
<th i18n:translate="heading_author">Commenter</th>
<th i18n:translate="heading_date">Date</th>
<th i18n:translate="heading_context">In Response To</th>
<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">
<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};
title string:Select ${item/Title}" />
<input type="hidden" name="selected_obj_paths:list" value="#"
tal:attributes="value item/getURL" />
</td>
<td tal:content="item/Creator" />
<td tal:content="python:toLocalizedTime(item.ModificationDate, long_format=1)" />
<td>
<a tal:attributes="href item/getURL"
tal:content="item/@@plone_context_state/parent|nothing" />
</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 workflow_action"
method="post"
tal:attributes="action string:${item/getURL}/@@moderate-publish-comment"
tal:condition="python:item.review_state == 'pending'">
<input type="hidden" name="comment_id" tal:attributes="value item/getId" />
<input type="hidden" name="workflow_action" tal:attributes="value view/transition" />
<input type="hidden" name="form.button.Filter" tal:attributes="value filter" value="" />
<input class="context comment-publish-button"
type="submit"
value="Publish"
i18n:attributes="value label_publish"
/>
</form>
<form action=""
method="post"
class="background-form delete"
tal:attributes="action string:${item/getURL}/@@moderate-delete-comment">
<input type="hidden" name="comment_id" tal:attributes="value item/getId" />
<input type="hidden" name="form.button.Filter" tal:attributes="value filter" value="" />
<input class="destructive comment-delete-button"
type="submit"
value="Delete"
i18n:attributes="value label_delete;"
/>
</form>
</td>
</tr>
</tal:block>
</tbody>
</table>
</form>
</tal:main-macro>
</metal:main>
</body>
</html>