mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-27 03:00:12 -04:00
Add NSFW and Quarantined stamps to comments on profile pages.
This commit is contained in:
@@ -1378,6 +1378,8 @@ class Comment(Thing, Printable):
|
||||
extra_css += " border"
|
||||
|
||||
if profilepage:
|
||||
item.nsfw = user.pref_label_nsfw and (item.link.is_nsfw or item.subreddit.over_18)
|
||||
|
||||
link_author = authors[item.link.author_id]
|
||||
if ((item.link._deleted or link_author._deleted) and
|
||||
not user_is_admin):
|
||||
|
||||
@@ -871,7 +871,13 @@ body > .content .link.compressed .midcol {
|
||||
a.author { margin-right: 0.5em; }
|
||||
a.banned-user { color: red; }
|
||||
|
||||
.thing .parent .author { margin-right: 0.5em; }
|
||||
.thing .parent {
|
||||
.stamp,
|
||||
.author {
|
||||
margin-right: 0.5em;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.flair, .linkflairlabel {
|
||||
display: inline-block;
|
||||
@@ -4506,10 +4512,12 @@ form input[type=radio] {margin: 2px .5em 0 0; }
|
||||
@color-archived-stamp: lighten(@color-text-grey, 15%);
|
||||
|
||||
.stamp {
|
||||
display: inline-block;
|
||||
font-size: x-small;
|
||||
padding: 0 2px;
|
||||
border: none;
|
||||
border-radius: 3px;
|
||||
line-height: 1.6em;
|
||||
}
|
||||
|
||||
.nsfw-stamp {
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
from r2.lib.pages import WrappedUser
|
||||
%>
|
||||
|
||||
<%namespace file="utils.html" import="plain_link, thing_timestamp, edited" />
|
||||
<%namespace file="utils.html" import="plain_link, thing_timestamp, edited, nsfw_stamp, quarantine_stamp" />
|
||||
<%inherit file="comment_skeleton.html"/>
|
||||
|
||||
#####################
|
||||
@@ -145,6 +145,17 @@ ${parent.midcol(cls = cls)}
|
||||
</%def>
|
||||
|
||||
<%def name="buttons()">
|
||||
%if c.profilepage:
|
||||
%if thing.subreddit.quarantine:
|
||||
<li class="rounded quarantine-stamp stamp">
|
||||
${quarantine_stamp()}
|
||||
</li>
|
||||
%elif thing.nsfw:
|
||||
<li class="rounded nsfw-stamp stamp">
|
||||
${nsfw_stamp()}
|
||||
</li>
|
||||
%endif
|
||||
%endif
|
||||
${CommentButtons(thing)}
|
||||
${self.admintagline()}
|
||||
</%def>
|
||||
|
||||
Reference in New Issue
Block a user