The code powering m.abunchtell.com https://m.abunchtell.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

22 lines
1.0 KiB

  1. %tr
  2. %td
  3. = truncate(announcement.text)
  4. %td
  5. = time_range(announcement) if announcement.time_range?
  6. %td
  7. - if announcement.scheduled_at.present?
  8. = fa_icon('clock-o') if announcement.scheduled_at > Time.now.utc
  9. = l(announcement.scheduled_at)
  10. - else
  11. = l(announcement.created_at)
  12. %td
  13. - if can?(:update, announcement)
  14. - if announcement.published?
  15. = table_link_to 'pause', t('admin.announcements.unpublish'), unpublish_admin_announcement_path(announcement), method: :post, data: { confirm: t('admin.accounts.are_you_sure') }
  16. - else
  17. = table_link_to 'play', t('admin.announcements.publish'), publish_admin_announcement_path(announcement), method: :post, data: { confirm: t('admin.accounts.are_you_sure') }
  18. = table_link_to 'pencil', t('generic.edit'), edit_admin_announcement_path(announcement)
  19. = table_link_to 'trash', t('generic.delete'), admin_announcement_path(announcement), method: :delete, data: { confirm: t('admin.accounts.are_you_sure') } if can?(:destroy, announcement)