Add link to full comments in comment listing.

This commit is contained in:
Brian Simpson
2011-09-07 18:50:44 -07:00
committed by Brian Simpson
parent 03eaf83d9a
commit c59bca136f
3 changed files with 12 additions and 1 deletions

View File

@@ -149,6 +149,8 @@ class CommentButtons(PrintableButtons):
is_author = is_author,
profilepage = c.profilepage,
permalink = thing.permalink,
new_window = c.user.pref_newwindow,
full_comment_path = thing.full_comment_path,
deleted = thing.deleted,
parent_permalink = thing.parent_permalink,
can_reply = thing.can_reply,

View File

@@ -781,13 +781,15 @@ class Comment(Thing, Printable):
if site != item.subreddit:
item.subreddit_path += item.subreddit.path
item.full_comment_path = item.link.make_permalink(item.subreddit)
# don't collapse for admins, on profile pages, or if deleted
item.collapsed = False
if ((item.score < min_score) and not (profilepage or
item.deleted or user_is_admin)):
item.collapsed = True
item.collapsed_reason = _("comment score below threshold")
if c.user_is_loggedin and item.author_id in c.user.enemies:
if user_is_loggedin and item.author_id in c.user.enemies:
if "grayed" not in extra_css:
extra_css += " grayed"
item.collapsed = True

View File

@@ -252,6 +252,13 @@
<li>
${self.bylink_button(_("context"), thing.permalink + "?context=3")}
</li>
<li class="first">
${self.comment_button("comment", "full comments",
thing.full_comment_path,
_sr_path = True,
a_class = None,
newwindow = thing.new_window)}
</li>
%endif
%if thing.deleted:
%if thing.parent_permalink and not thing.profilepage: