Skip to content

Commit

Permalink
Added allow_comments and category has_category to feature
Browse files Browse the repository at this point in the history
  • Loading branch information
cykod committed Jan 9, 2012
1 parent b05426d commit 8f3f304
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions vendor/modules/blog/app/controllers/blog/page_feature.rb
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ def blog_entry_tags(c,data)
c.expansion_tag('entry:comments') { |t| t.locals.entry.comments_count > 0 }
c.value_tag('entry:comment_count') { |t| t.locals.entry.comments_count }
c.value_tag('entry:approved_comment_count') { |t| t.locals.entry.approved_comments_count }
c.expansion_tag('entry:allow_comments') { |t| !t.locals.entry.disallow_comments? }


%w(title author).each do |elem|
Expand Down Expand Up @@ -158,6 +159,7 @@ def blog_entry_tags(c,data)
c.link_tag('entry:categories:category:') { |t| SiteNode.link(data[:list_page], 'category', CGI::escape(t.locals.category)) }
c.value_tag('entry:categories:category:name') { |t| t.locals.category }
c.value_tag('entry:categories:category:escaped_name') { |t| CGI::escape(t.locals.category) }
c.expansion_tag('entry:categories:has_category') { |t| t.locals.categories.include?(t.attr['category']) }

c.value_tag('entry:tags') do |tag|
tags = tag.locals.entry.content_tags
Expand Down

0 comments on commit 8f3f304

Please sign in to comment.