You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by he...@apache.org on 2016/01/27 21:22:22 UTC

[08/50] 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/f7637031
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/f7637031
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/f7637031

Branch: refs/heads/hs/8035
Commit: f7637031a7ed3ea491386e057a079dd8cda3e75c
Parents: 63740ee
Author: DeV1doR <de...@ukr.net>
Authored: Fri Dec 11 15:14:57 2015 +0200
Committer: Dave Brondsema <da...@brondsema.net>
Committed: Wed Jan 27 12:03:18 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/f7637031/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/f7637031/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 %}