allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jetm...@apache.org
Subject [04/10] allura git commit: [#8020] ticket:875 updated widget
Date Thu, 21 Jan 2016 15:29:43 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/1d86d20e
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/1d86d20e
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/1d86d20e

Branch: refs/heads/ib/8020b
Commit: 1d86d20e619b3d71d0b56548501d72809786836a
Parents: 45c5cf2
Author: DeV1doR <dev1dor@ukr.net>
Authored: Fri Dec 11 15:14:57 2015 +0200
Committer: Denis Kotov <deniskkotov@gmail.com>
Committed: Wed Jan 20 16:03:45 2016 +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/1d86d20e/Allura/allura/lib/widgets/discuss.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/widgets/discuss.py b/Allura/allura/lib/widgets/discuss.py
index 6503d5b..c56e2cd 100644
--- a/Allura/allura/lib/widgets/discuss.py
+++ b/Allura/allura/lib/widgets/discuss.py
@@ -346,6 +346,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/1d86d20e/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