Module: Admin::PostsHelper
- Defined in:
- app/helpers/admin/posts_helper.rb
Instance Method Summary collapse
Instance Method Details
#link_to_disqus_comment_count(post) ⇒ Object
14 15 16 17 18 19 20 21 22 23 |
# File 'app/helpers/admin/posts_helper.rb', line 14 def link_to_disqus_comment_count(post) # TODO: It would be great to link directly to the thread # ie: https://myblog.disqus.com/admin/moderate/#/all/search/thread:4584301535 # # However, we do not know the thread ID at this time. We may be able to fetch it # via the Disqus JavaScript API. # return link_to 'Comments', "https://#{Spud::Blog.disqus_shortname}.disqus.com/admin/moderate/#/all", target: :blank, class: 'disqus-comment-count', data: { disqus_identifier: post.identifier } end |
#options_for_parent_category(parent_id = 0) ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'app/helpers/admin/posts_helper.rb', line 3 def (parent_id = 0) if @categories[parent_id] return @categories[parent_id].collect do |c| opts = [c.name, c.id] opts += (c.id) end else return [] end end |