You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by je...@apache.org on 2015/12/24 15:33:59 UTC
[6/7] allura git commit: [#8020] ticket:875 updated widget
[#8020] ticket:875 updated widget
Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/b0007616
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/b0007616
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/b0007616
Branch: refs/heads/ib/8020a
Commit: b00076163e5742703a05e691db3fd12b98b1bbc7
Parents: 7a582ac
Author: DeV1doR <de...@ukr.net>
Authored: Fri Dec 11 15:14:57 2015 +0200
Committer: Igor Bondarenko <je...@gmail.com>
Committed: Wed Dec 23 12:48:00 2015 +0200
----------------------------------------------------------------------
Allura/allura/lib/widgets/discuss.py | 1 +
Allura/allura/templates/widgets/post_widget.html | 4 +++-
2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/allura/blob/b0007616/Allura/allura/lib/widgets/discuss.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/widgets/discuss.py b/Allura/allura/lib/widgets/discuss.py
index 5badc98..2d4dfea 100644
--- a/Allura/allura/lib/widgets/discuss.py
+++ b/Allura/allura/lib/widgets/discuss.py
@@ -347,6 +347,7 @@ class Post(HierWidget):
else if (mod == 'Undo'){
spam_block_display($(post), 'block');
$(post).find('.spam-present').hide();
+ $(post).find('.options a').eq(0).hide();
}
}
});
http://git-wip-us.apache.org/repos/asf/allura/blob/b0007616/Allura/allura/templates/widgets/post_widget.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/widgets/post_widget.html b/Allura/allura/templates/widgets/post_widget.html
index 4912757..fa30770 100644
--- a/Allura/allura/templates/widgets/post_widget.html
+++ b/Allura/allura/templates/widgets/post_widget.html
@@ -46,13 +46,15 @@
<div class="grid-14 post-content" style="width: {{indent == 0 and 525 or (indent <= 40 and 515-indent*10 or 65)}}px">
<div class="spam-present">
<span class="spam-text">Comment has been marked as spam. </span>
+ {% if h.has_access(value, 'moderate')() %}
<form method="POST" action="{{value.url()+'moderate'}}">
<input type="hidden" name="undo" value="True"/>
<a href="" class="moderate_post little_link"><span>Undo</span></a>
{{lib.csrf_token()}}
</form>
+ {% endif %}
<br>
- <span class="spam-text">You can see all comments posted by this user </span><a href="/p/test/tickets/_discuss/moderate">here</a>
+ <span class="spam-text">You can see all comments posted by this user </span><a href="/p/test/tickets/_discuss/moderate?username={{value.author().username}}&status=spam">here</a>
</div>
<div class="display_post{% if pending and moderator %} moderate{% endif %}">
{% if pending and not moderator %}