about summary refs log tree commit diff
path: root/app/views/admin/domain_blocks
diff options
context:
space:
mode:
authorMatt Jankowski <mjankowski@thoughtbot.com>2017-05-02 14:56:28 -0400
committerEugen Rochko <eugen@zeonfederated.com>2017-05-02 20:56:28 +0200
commitb5eec3423044f66066d64bd5c9422f40113c543a (patch)
tree253ae02c771888fe7c84d32383bc838fb626a45c /app/views/admin/domain_blocks
parent212868216230120b63b162ab40cf271deadadd63 (diff)
Add admin area view partials for each record type (#2700)
Diffstat (limited to 'app/views/admin/domain_blocks')
-rw-r--r--app/views/admin/domain_blocks/_domain_block.html.haml10
-rw-r--r--app/views/admin/domain_blocks/index.html.haml13
2 files changed, 12 insertions, 11 deletions
diff --git a/app/views/admin/domain_blocks/_domain_block.html.haml b/app/views/admin/domain_blocks/_domain_block.html.haml
new file mode 100644
index 000000000..17a3de81c
--- /dev/null
+++ b/app/views/admin/domain_blocks/_domain_block.html.haml
@@ -0,0 +1,10 @@
+%tr
+  %td.domain
+    %samp= domain_block.domain
+  %td.severity
+    = t("admin.domain_blocks.severities.#{domain_block.severity}")
+  %td.reject_media
+    - if domain_block.reject_media? || domain_block.suspend?
+      %i.fa.fa-check
+  %td
+    = table_link_to 'undo', t('admin.domain_blocks.undo'), admin_domain_block_path(domain_block)
diff --git a/app/views/admin/domain_blocks/index.html.haml b/app/views/admin/domain_blocks/index.html.haml
index bdef4294e..5ae9fec53 100644
--- a/app/views/admin/domain_blocks/index.html.haml
+++ b/app/views/admin/domain_blocks/index.html.haml
@@ -9,16 +9,7 @@
       %th= t('admin.domain_blocks.reject_media')
       %th
   %tbody
-    - @blocks.each do |block|
-      %tr
-        %td
-          %samp= block.domain
-        %td= t("admin.domain_blocks.severities.#{block.severity}")
-        %td
-          - if block.reject_media? || block.suspend?
-            %i.fa.fa-check
-        %td
-          = table_link_to 'undo', t('admin.domain_blocks.undo'), admin_domain_block_path(block)
+    = render @domain_blocks
 
-= paginate @blocks
+= paginate @domain_blocks
 = link_to t('admin.domain_blocks.add_new'), new_admin_domain_block_path, class: 'button'