Make moderation view changes less invasive.

This commit is contained in:
Katja Süss 2017-07-27 11:35:15 +02:00 committed by ksuess
parent 71205b552f
commit fb7c68d5e5
4 changed files with 7 additions and 20 deletions

View File

@ -88,7 +88,8 @@
<tbody>
<tal:block repeat="item batch">
<tr class="commentrow"
tal:define="even repeat/item/even"
tal:define="even repeat/item/even;
email python:getattr(item.getObject(), 'author_email')"
tal:attributes="class python: even and 'odd' or 'even'">
<td class="notDraggable">
<input type="checkbox"
@ -105,11 +106,12 @@
</td>
<td>
<span tal:content="python:item.author_name or item.Creator">Name</span>
<div tal:condition="item/author_email"><a
tal:attributes="href string:mailto:${item/author_email}"
tal:content="item/author_email">Email</a></div>
<tal:email tal:condition="email"><br /><a
tal:attributes="href string:mailto:$email"
tal:content="email">Email</a></tal:email>
</td>
<td tal:content="python:toLocalizedTime(item.ModificationDate, long_format=1)" />
<td tal:content="python:toLocalizedTime(item.ModificationDate,
long_format=1)" />
<td>
<a tal:attributes="href item/getURL"
tal:content="item/in_response_to" />

View File

@ -14,6 +14,5 @@
<column value="commentators" />
<column value="in_response_to" />
<column value="author_name" />
<column value="author_email" />
</object>

View File

@ -61,7 +61,3 @@ def upgrade_comment_workflows(context):
comment.reindexObjectSecurity()
except (AttributeError, KeyError):
logger.info('Could not reindex comment %s' % brain.getURL())
def update_catalog(context):
context.runImportStepFromProfile(default_profile, 'catalog')

View File

@ -50,15 +50,5 @@
handler=".upgrades.upgrade_comment_workflows"
/>
</genericsetup:upgradeSteps>
<genericsetup:upgradeStep
title="show email in moderation view"
description="reload catalog config to add author_email in metadata.'"
source="1000"
destination="1001"
handler=".upgrades.update_catalog"
sortkey="1"
profile="plone.app.discussion:default"
/>
</configure>