Full comments link: add comment count

This commit is contained in:
Chad Birch
2013-07-18 16:00:12 -06:00
parent c4fa6d3290
commit d0463930f4
3 changed files with 4 additions and 1 deletions

View File

@@ -169,6 +169,7 @@ class CommentButtons(PrintableButtons):
ignore_reports = thing.ignore_reports,
new_window = c.user.pref_newwindow,
full_comment_path = thing.full_comment_path,
full_comment_count = thing.full_comment_count,
deleted = thing.deleted,
parent_permalink = thing.parent_permalink,
can_reply = thing.can_reply,

View File

@@ -1010,6 +1010,7 @@ class Comment(Thing, Printable):
item.subreddit_path += item.subreddit.path
item.full_comment_path = item.link.make_permalink(item.subreddit)
item.full_comment_count = item.link.num_comments
# don't collapse for admins, on profile pages, or if deleted
item.collapsed = False

View File

@@ -277,7 +277,8 @@
${self.bylink_button(_("context"), thing.permalink + "?context=3")}
</li>
<li class="first">
${self.comment_button("comment", _("full comments"),
${self.comment_button("comment",
_("full comments") + " (%d)" % thing.full_comment_count,
thing.full_comment_path,
_sr_path = True,
a_class = None,