Method: EffectivePostsHelper#admin_post_status_badge
- Defined in:
- app/helpers/effective_posts_helper.rb
#admin_post_status_badge(post) ⇒ Object
65 66 67 68 69 70 71 72 73 |
# File 'app/helpers/effective_posts_helper.rb', line 65 def admin_post_status_badge(post) return nil unless EffectivePosts.(self, :admin, :effective_posts) if post.draft? content_tag(:span, 'DRAFT', class: 'badge badge-info') elsif post.published? == false content_tag(:span, "TO BE PUBLISHED AT #{post.published_at.strftime('%F %H:%M')}", class: 'badge badge-info') end end |