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.

25 lines
884 B

  1. - content_for :page_title do
  2. = t('filters.index.title')
  3. - content_for :heading_actions do
  4. = link_to t('filters.new.title'), new_filter_path, class: 'button'
  5. - if @filters.count == 0
  6. %div{ style: 'display: flex; justify-content: center' }
  7. %div.muted-hint= t 'filters.index.empty'
  8. - else
  9. .table-wrapper
  10. %table.table
  11. %thead
  12. %tr
  13. %th= t('simple_form.labels.defaults.phrase')
  14. %th= t('simple_form.labels.defaults.context')
  15. %th
  16. %tbody
  17. - @filters.each do |filter|
  18. %tr
  19. %td= filter.phrase
  20. %td= filter.context.map { |context| I18n.t("filters.contexts.#{context}") }.join(', ')
  21. %td
  22. = table_link_to 'pencil', t('filters.edit.title'), edit_filter_path(filter)
  23. = table_link_to 'times', t('filters.index.delete'), filter_path(filter), method: :delete