Quarantine: Disable share feature on quarantined links.

This commit is contained in:
Matt Lee
2015-07-24 11:10:05 -07:00
committed by Florence Yeun
parent 2f6a58ae81
commit 3229d27251
2 changed files with 5 additions and 1 deletions

View File

@@ -87,6 +87,9 @@ class LinkButtons(PrintableButtons):
# do we show the report button?
show_report = not is_author and report
show_share = ((c.user_is_loggedin or not g.read_only_mode) and
not thing.subreddit.quarantine)
# if they are the author, can they edit it?
thing_editable = getattr(thing, 'editable', True)
thing_takendown = getattr(thing, 'admin_takedown', False)
@@ -158,6 +161,7 @@ class LinkButtons(PrintableButtons):
show_rescrape=show_rescrape,
show_givegold=show_givegold,
show_comments = comments,
show_share=show_share,
# promotion
promoted = thing.promoted,
is_link = True,

View File

@@ -236,7 +236,7 @@
${self.simple_button(_("edit"), "edit_usertext", css_class="edit-usertext")}
</li>
%endif
% if c.user_is_loggedin or not g.read_only_mode:
% if thing.show_share:
<li class="share">
%if thing.show_new_post_sharing:
<a class="post-sharing-button" href="javascript: void 0;">${_("share")}</a>