mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-26 23:39:11 -05:00
Fixed problems with comments panel and deleted comments
This commit is contained in:
@@ -1447,6 +1447,7 @@ class UserText(Wrapped):
|
||||
editable = False,
|
||||
creating = False,
|
||||
nofollow = False,
|
||||
target = None,
|
||||
display = True,
|
||||
post_form = 'editusertext',
|
||||
cloneable = False,
|
||||
@@ -1465,6 +1466,7 @@ class UserText(Wrapped):
|
||||
editable = editable,
|
||||
creating = creating,
|
||||
nofollow = nofollow,
|
||||
target = target,
|
||||
display = display,
|
||||
post_form = post_form,
|
||||
cloneable = cloneable,
|
||||
|
||||
@@ -573,9 +573,8 @@ class Comment(Thing, Printable):
|
||||
|
||||
extra_css = ''
|
||||
if item._deleted:
|
||||
if c.user_is_admin:
|
||||
extra_css += "grayed"
|
||||
else:
|
||||
extra_css += "grayed"
|
||||
if not c.user_is_admin:
|
||||
item.author = DeletedUser()
|
||||
item.body = '[deleted]'
|
||||
|
||||
@@ -606,6 +605,7 @@ class Comment(Thing, Printable):
|
||||
item.usertext = UserText(item, item.body,
|
||||
editable = item.author == c.user,
|
||||
nofollow = item.nofollow,
|
||||
target = item.target,
|
||||
extra_css = extra_css)
|
||||
class StarkComment(Comment):
|
||||
"""Render class for the comments in the top-comments display in
|
||||
|
||||
@@ -49,7 +49,8 @@
|
||||
|
||||
%if not thing.creating:
|
||||
<div class="usertext-body">
|
||||
${unsafe(safemarkdown(thing.text, nofollow = thing.nofollow))}
|
||||
${unsafe(safemarkdown(thing.text, nofollow = thing.nofollow,
|
||||
target = thing.target))}
|
||||
</div>
|
||||
%endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user