about summary refs log tree commit diff
path: root/app/views/filters/index.html.haml
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/filters/index.html.haml')
-rw-r--r--app/views/filters/index.html.haml20
1 files changed, 20 insertions, 0 deletions
diff --git a/app/views/filters/index.html.haml b/app/views/filters/index.html.haml
new file mode 100644
index 000000000..18ebee570
--- /dev/null
+++ b/app/views/filters/index.html.haml
@@ -0,0 +1,20 @@
+- content_for :page_title do
+  = t('filters.index.title')
+
+.table-wrapper
+  %table.table
+    %thead
+      %tr
+        %th= t('simple_form.labels.defaults.phrase')
+        %th= t('simple_form.labels.defaults.context')
+        %th
+    %tbody
+      - @filters.each do |filter|
+        %tr
+          %td= filter.phrase
+          %td= filter.context.map { |context| I18n.t("filters.contexts.#{context}") }.join(', ')
+          %td
+            = table_link_to 'pencil', t('filters.edit.title'), edit_filter_path(filter)
+            = table_link_to 'times', t('filters.index.delete'), filter_path(filter), method: :delete
+
+= link_to t('filters.new.title'), new_filter_path, class: 'button'