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

140 lines
7.7 KiB
XML

<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="toLocalizedTime nocall:context/@@plone/toLocalizedTime;
items view/comments;
filter view/filter|nothing;
Batch python:modules['Products.CMFPlone'].Batch;
b_size python:30;
b_start python:0;
b_start request/b_start | b_start;
moderation_enabled view/moderation_enabled;">
<h1 class="documentFirstHeading" i18n:translate="title_review">
Moderate comments
</h1>
<form tal:condition="not:items">
<fieldset id="fieldset-moderate-comments" class="formPanel">
<p id="no-comments-message" i18n:translate="message_nothing_to_moderate">
No comments to moderate.
</p>
</fieldset>
</form>
<form method="post"
action="#"
tal:attributes="action string:${context/absolute_url}/@@bulk-actions"
tal:condition="items"
tal:define="batch python:Batch(items, b_size, int(b_start), orphan=1);">
<fieldset id="fieldset-moderate-comments" class="formPanel">
<div metal:use-macro="here/batch_macros/macros/navigation" />
<table id="review-comments" class="listing" style="width: 100%">
<thead>
<tr>
<th id="bulkactions" class="nosort" colspan="7">
<select name="form.select.BulkAction">
<option selected="selected" value="-1" i18n:translate="title_bulkactions">Bulk Actions</option>
<option value="publish"
i18n:translate="bulkactions_publish"
tal:condition="python: filter != 'published' and moderation_enabled">Publish</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;" />
</th>
</tr>
<tr>
<th class="nosort"><input name="check_all" type="checkbox" value="0" /></th>
<th class="nosort" i18n:translate="heading_author">Commenter</th>
<th class="nosort" i18n:translate="heading_date">Date</th>
<th class="nosort" i18n:translate="heading_context">In Response To</th>
<th class="nosort" i18n:translate="heading_subject">Subject</th>
<th class="nosort" i18n:translate="heading_comment">Comment</th>
<th class="nosort" i18n:translate="heading_action">Action</th>
</tr>
</thead>
<tbody>
<tal:block repeat="item batch">
<tr style="vertical-align: top" class="commentrow"
tal:define="even repeat/item/even"
tal:attributes="class python: even 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/in_response_to" />
</td>
<td>
<a tal:attributes="href item/getURL"
tal:content="item/Title" />
</td>
<td>
<span tal:replace="structure python:view.cook(item.Description)" />
<a href=""
tal:attributes="href string:${item/getURL}/getText"
tal:condition="python:item.Description.endswith('[...]')"
i18n:translate="label_show_full_comment_text"
class="show-full-comment-text">show full comment text</a>
</td>
<td class="actions">
<input id=""
class="context comment-publish-button"
type="submit"
value="Publish"
name="form.button.Publish"
i18n:attributes="value label_publish"
tal:attributes="id item/id"
tal:condition="python:item.review_state == 'pending'"
/>
<input id=""
class="destructive comment-delete-button"
type="submit"
value="Delete"
name="form.button.Delete"
i18n:attributes="value label_delete;"
tal:attributes="id item/id"
/>
</td>
</tr>
</tal:block>
</tbody>
</table>
<div metal:use-macro="here/batch_macros/macros/navigation" />
</fieldset>
</form>
</tal:main-macro>
</metal:main>
</body>
</html>