allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [7/8] allura git commit: [#8020] ticket:875 updated widget
Date Wed, 06 Jan 2016 19:30:26 GMT
[#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/83458a45
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/83458a45
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/83458a45

Branch: refs/heads/db/8020
Commit: 83458a45037b757f806ff190be8c108ad81369e5
Parents: 7dc7af4
Author: DeV1doR <dev1dor@ukr.net>
Authored: Fri Dec 11 15:14:57 2015 +0200
Committer: Dave Brondsema <dave@brondsema.net>
Committed: Wed Jan 6 12:51:41 2016 -0500

----------------------------------------------------------------------
 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/83458a45/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/83458a45/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 a8aa822..2695c2b 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.&nbsp;</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&nbsp;</span><a
href="/p/test/tickets/_discuss/moderate">here</a>
+          <span class="spam-text">You can see all comments posted by this user&nbsp;</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 %}


Mime
View raw message