mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-27 03:00:12 -04:00
Quarantine: Disable share feature on quarantined links.
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user