From 79febe7bb80c43e9563ab7fb3a4c935b0be9da53 Mon Sep 17 00:00:00 2001 From: kikito Date: Wed, 2 Sep 2015 13:39:27 +0200 Subject: [PATCH] Adds shared/filter_subnav partial to DRY filters --- app/views/admin/comments/index.html.erb | 13 +------------ app/views/admin/debates/index.html.erb | 13 +------------ app/views/admin/organizations/index.html.erb | 13 +------------ app/views/admin/users/index.html.erb | 13 +------------ app/views/moderation/comments/index.html.erb | 13 +------------ app/views/moderation/debates/index.html.erb | 13 +------------ app/views/shared/_filter_subnav.html.erb | 17 +++++++++++++++++ 7 files changed, 23 insertions(+), 72 deletions(-) create mode 100644 app/views/shared/_filter_subnav.html.erb diff --git a/app/views/admin/comments/index.html.erb b/app/views/admin/comments/index.html.erb index 76426098c..f0639047f 100644 --- a/app/views/admin/comments/index.html.erb +++ b/app/views/admin/comments/index.html.erb @@ -1,17 +1,6 @@

<%= t("admin.comments.index.title") %>

- +<%= render 'shared/filter_subnav', i18n_namespace: "admin.comments.index" %>

<%= page_entries_info @comments %>

diff --git a/app/views/admin/debates/index.html.erb b/app/views/admin/debates/index.html.erb index 0a12c74e0..7caa8ecc3 100644 --- a/app/views/admin/debates/index.html.erb +++ b/app/views/admin/debates/index.html.erb @@ -1,17 +1,6 @@

<%= t("admin.debates.index.title") %>

- +<%= render 'shared/filter_subnav', i18n_namespace: "admin.debates.index" %>

<%= page_entries_info @debates %>

diff --git a/app/views/admin/organizations/index.html.erb b/app/views/admin/organizations/index.html.erb index e5dc9b762..464168746 100644 --- a/app/views/admin/organizations/index.html.erb +++ b/app/views/admin/organizations/index.html.erb @@ -13,18 +13,7 @@ <% end %> - +<%= render 'shared/filter_subnav', i18n_namespace: "admin.organizations.index" %>

<%= page_entries_info @organizations %>

diff --git a/app/views/admin/users/index.html.erb b/app/views/admin/users/index.html.erb index 0c557fcab..0d18c8b61 100644 --- a/app/views/admin/users/index.html.erb +++ b/app/views/admin/users/index.html.erb @@ -1,17 +1,6 @@

<%= t("admin.users.index.title") %>

- +<%= render 'shared/filter_subnav', i18n_namespace: "admin.users.index" %>

<%= page_entries_info @users %>

diff --git a/app/views/moderation/comments/index.html.erb b/app/views/moderation/comments/index.html.erb index e02bb76a5..ec642077b 100644 --- a/app/views/moderation/comments/index.html.erb +++ b/app/views/moderation/comments/index.html.erb @@ -1,17 +1,6 @@

<%= t("moderation.comments.index.title") %>

- +<%= render 'shared/filter_subnav', i18n_namespace: "moderation.comments.index" %>

<%= page_entries_info @comments %>

diff --git a/app/views/moderation/debates/index.html.erb b/app/views/moderation/debates/index.html.erb index 7eb771c80..3fc3f402b 100644 --- a/app/views/moderation/debates/index.html.erb +++ b/app/views/moderation/debates/index.html.erb @@ -1,17 +1,6 @@

<%= t("moderation.debates.index.title") %>

- +<%= render 'shared/filter_subnav', i18n_namespace: "moderation.debates.index" %>

<%= page_entries_info @debates %>

diff --git a/app/views/shared/_filter_subnav.html.erb b/app/views/shared/_filter_subnav.html.erb new file mode 100644 index 000000000..0f8975aa3 --- /dev/null +++ b/app/views/shared/_filter_subnav.html.erb @@ -0,0 +1,17 @@ +<% # Params: + # + # i18n_namespace: for example "moderation.debates.index" +%> + +