Fixed problems with comments panel and deleted comments

This commit is contained in:
Mike
2009-06-25 14:18:06 -07:00
parent 98fdc7bd6e
commit 75e1127a5a
3 changed files with 7 additions and 4 deletions

View File

@@ -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,

View File

@@ -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

View File

@@ -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