Comment embeds: fix display when a user account has been deleted

This commit is contained in:
David Wick
2015-01-30 15:33:56 -08:00
parent 4898d11c77
commit 5eac2ba9ed
2 changed files with 17 additions and 7 deletions

View File

@@ -93,6 +93,10 @@ p {
}
}
.reddit-embed-author-deleted {
font-weight: bold;
}
// Comment embeds
.reddit-embed-comment-header {
position: relative;

View File

@@ -51,16 +51,22 @@
hide_edits = (not thing.edits_visible) and edited_recently
%>
<article class="reddit-embed-comment ${comment_css_class(thing, hide_edits)}">
%if thing.deleted or thing.author._deleted:
%if thing.deleted:
${_("This comment was deleted.")}
%else:
<header class="reddit-embed-comment-header">
<a class="reddit-embed-author"
href="http://${get_domain(subreddit=False)}/user/${thing.author.name}"
data-redirect-type="user"
data-redirect-thing="${thing.author._id}">
${thing.author.name}
</a>
%if thing.author._deleted:
<span class="reddit-embed-author reddit-embed-author-deleted">
${_("[account deleted]")}
</span>
%else:
<a class="reddit-embed-author"
href="http://${get_domain(subreddit=False)}/user/${thing.author.name}"
data-redirect-type="user"
data-redirect-thing="${thing.author._id}">
${thing.author.name}
</a>
%endif
%if hide_edits:
${_("%(name)s's comment was changed.") % dict(name="")}
%else: