[Python-checkins] r56570 - tracker/instances/python-dev-spambayes-integration/html/file.item.html tracker/instances/python-dev-spambayes-integration/html/issue.item.html tracker/instances/python-dev-spambayes-integration/html/msg.item.html
erik.forsberg
python-checkins at python.org
Fri Jul 27 15:21:45 CEST 2007
Author: erik.forsberg
Date: Fri Jul 27 15:21:45 2007
New Revision: 56570
Modified:
tracker/instances/python-dev-spambayes-integration/html/file.item.html
tracker/instances/python-dev-spambayes-integration/html/issue.item.html
tracker/instances/python-dev-spambayes-integration/html/msg.item.html
Log:
Modified templates to notify users that msg/file instances are
classified as spam, and that they may not be viewed by anonymous
users.
Modified: tracker/instances/python-dev-spambayes-integration/html/file.item.html
==============================================================================
--- tracker/instances/python-dev-spambayes-integration/html/file.item.html (original)
+++ tracker/instances/python-dev-spambayes-integration/html/file.item.html Fri Jul 27 15:21:45 2007
@@ -39,7 +39,7 @@
<td tal:content="structure context/spambayes_misclassified/plain"></td>
</tr>
- <tr>
+ <tr tal:condition="python:context.is_edit_ok()">
<td>
<input type="hidden" name="@template" value="item">
@@ -53,13 +53,24 @@
</table>
</form>
-<a tal:condition="python:context.id and context.is_view_ok()"
+<p tal:condition="python:utils.sb_is_spam(context)" class="error-message">
+ File has been classified as spam.</p>
+
+<a tal:condition="python:context.id and utils.sb_is_view_ok(context)"
tal:attributes="href string:file${context/id}/${context/name}"
i18n:translate="">download</a>
+<p tal:condition="python:context.id and not utils.sb_is_view_ok(context)">
+ Files classified as spam are not available for download by
+ unathorized users. If you think the file has been misclassified,
+ please login and click on the button for reclassification.
+</p>
+
+
<form method="POST" onSubmit="return submit_once()"
enctype="multipart/form-data"
- tal:attributes="action context/designator">
+ tal:attributes="action context/designator"
+ tal:condition="python:utils.sb_may_classify(context)">
<input type="hidden" name="@action" value="spambayes_classify">
<input type="submit" name="trainspam" value="Mark as SPAM" i18n:attributes="value">
Modified: tracker/instances/python-dev-spambayes-integration/html/issue.item.html
==============================================================================
--- tracker/instances/python-dev-spambayes-integration/html/issue.item.html (original)
+++ tracker/instances/python-dev-spambayes-integration/html/issue.item.html Fri Jul 27 15:21:45 2007
@@ -243,7 +243,12 @@
</tr>
<tr>
<td colspan="4" class="content">
- <pre tal:content="structure msg/content/hyperlinked">content</pre>
+ <p class="error-message"
+ tal:condition="python:utils.sb_is_spam(msg)">
+ Message has been classified as spam.
+ </p>
+ <pre tal:condition="python:utils.sb_is_view_ok(msg)"
+ tal:content="structure msg/content/hyperlinked">content</pre>
</td>
</tr>
</tal:block>
Modified: tracker/instances/python-dev-spambayes-integration/html/msg.item.html
==============================================================================
--- tracker/instances/python-dev-spambayes-integration/html/msg.item.html (original)
+++ tracker/instances/python-dev-spambayes-integration/html/msg.item.html Fri Jul 27 15:21:45 2007
@@ -60,10 +60,14 @@
</table>
+<p tal:condition="python:utils.sb_is_spam(context)" class="error-message">
+ Message has been classified as spam</p>
+
<table class="messages">
+
<tr>
<th class="header" i18n:translate="">Content</th>
- <th class="header">
+ <th class="header" tal:condition="python:utils.sb_may_classify(context)">
<form method="POST" onSubmit="return submit_once()"
enctype="multipart/form-data"
tal:attributes="action context/designator">
@@ -75,8 +79,18 @@
</th>
</tr>
+
<tr>
- <td class="content" colspan=2><pre tal:content="structure context/content/hyperlinked"></pre></td>
+ <td class="content" colspan=2
+ tal:condition="python:utils.sb_is_view_ok(context)"><pre
+ tal:content="structure context/content/hyperlinked"></pre></td>
+ <td class="content" colspan=2
+ tal:condition="python:not utils.sb_is_view_ok(context)">
+ Message has been classified as spam and is therefore not
+ available to unathorized users. If you think this is
+ incorrect, please login and report the message as being
+ misclassified.
+ </td>
</tr>
</table>
More information about the Python-checkins
mailing list