From 90067814e456f1a55028115702df96d304bf95cc Mon Sep 17 00:00:00 2001 From: decabeza Date: Fri, 20 Oct 2017 13:59:58 +0200 Subject: [PATCH] moves table ids to fixes specs --- app/views/admin/managers/index.html.erb | 80 ++++++------- app/views/admin/moderators/index.html.erb | 86 +++++++------- app/views/admin/organizations/search.html.erb | 106 +++++++++--------- 3 files changed, 139 insertions(+), 133 deletions(-) diff --git a/app/views/admin/managers/index.html.erb b/app/views/admin/managers/index.html.erb index 0eded59b3..a31998323 100644 --- a/app/views/admin/managers/index.html.erb +++ b/app/views/admin/managers/index.html.erb @@ -13,44 +13,46 @@
-<% if @managers.any? %> -

<%= page_entries_info @managers %>

+
+ <% if @managers.any? %> +

<%= page_entries_info @managers %>

- - - - - - - - <% @managers.each do |manager| %> - - - - - - <% end %> - -
<%= t("admin.managers.index.name") %><%= t("admin.managers.index.email") %><%= t("admin.shared.actions") %>
- <%= manager.name %> - - <%= manager.email %> - - <% if manager.persisted? %> - <%= link_to t('admin.managers.manager.delete'), - admin_manager_path(manager), - method: :delete, - class: "button hollow alert expanded" - %> - <% else %> - <%= link_to t('admin.managers.manager.add'),{ controller: "admin/managers", action: :create, user_id: manager.user_id }, - method: :post, class: "button success expanded" %> - <% end %> -
+ + + + + + + + <% @managers.each do |manager| %> + + + + + + <% end %> + +
<%= t("admin.managers.index.name") %><%= t("admin.managers.index.email") %><%= t("admin.shared.actions") %>
+ <%= manager.name %> + + <%= manager.email %> + + <% if manager.persisted? %> + <%= link_to t('admin.managers.manager.delete'), + admin_manager_path(manager), + method: :delete, + class: "button hollow alert expanded" + %> + <% else %> + <%= link_to t('admin.managers.manager.add'),{ controller: "admin/managers", action: :create, user_id: manager.user_id }, + method: :post, class: "button success expanded" %> + <% end %> +
- <%= paginate @managers %> -<% else %> -
- <%= t("admin.managers.index.no_managers") %> -
-<% end %> \ No newline at end of file + <%= paginate @managers %> + <% else %> +
+ <%= t("admin.managers.index.no_managers") %> +
+ <% end %> +
diff --git a/app/views/admin/moderators/index.html.erb b/app/views/admin/moderators/index.html.erb index d6a9b50bb..061180970 100644 --- a/app/views/admin/moderators/index.html.erb +++ b/app/views/admin/moderators/index.html.erb @@ -15,48 +15,50 @@
-<% if @moderators.any? %> +
+ <% if @moderators.any? %> -

<%= page_entries_info @moderators %>

+

<%= page_entries_info @moderators %>

- - - - - - - - <% @moderators.each do |moderator| %> - - - - - - <% end %> - -
<%= t("admin.moderators.index.name") %><%= t("admin.moderators.index.email") %><%= t("admin.shared.actions") %>
- <%= moderator.name %> - - <%= moderator.email %> - - <% if moderator.persisted? %> - <%= link_to t('admin.moderators.moderator.delete'), - admin_moderator_path(moderator), - method: :delete, - class: "button hollow alert expanded" - %> - <% else %> - <%= link_to t('admin.moderators.moderator.add'), - { controller: "admin/moderators", action: :create, - user_id: moderator.user_id }, - method: :post, - class: "button success expanded" %> - <% end %> -
+ + + + + + + + <% @moderators.each do |moderator| %> + + + + + + <% end %> + +
<%= t("admin.moderators.index.name") %><%= t("admin.moderators.index.email") %><%= t("admin.shared.actions") %>
+ <%= moderator.name %> + + <%= moderator.email %> + + <% if moderator.persisted? %> + <%= link_to t('admin.moderators.moderator.delete'), + admin_moderator_path(moderator), + method: :delete, + class: "button hollow alert expanded" + %> + <% else %> + <%= link_to t('admin.moderators.moderator.add'), + { controller: "admin/moderators", action: :create, + user_id: moderator.user_id }, + method: :post, + class: "button success expanded" %> + <% end %> +
- <%= paginate @moderators %> -<% else %> -
- <%= t("admin.moderators.index.no_moderators") %> -
-<% end %> + <%= paginate @moderators %> + <% else %> +
+ <%= t("admin.moderators.index.no_moderators") %> +
+ <% end %> +
diff --git a/app/views/admin/organizations/search.html.erb b/app/views/admin/organizations/search.html.erb index 01b5420bd..e3d0564cf 100644 --- a/app/views/admin/organizations/search.html.erb +++ b/app/views/admin/organizations/search.html.erb @@ -11,58 +11,60 @@ <% end %> -<% if @organizations.any? %> -

<%= page_entries_info @organizations %>

+
+ <% if @organizations.any? %> +

<%= page_entries_info @organizations %>

- - - - - - - - - - - <% @organizations.each do |organization| %> - - - - - - - + + <% end %> + +
<%= t("admin.organizations.index.name") %><%= t("admin.organizations.index.email") %><%= t("admin.organizations.index.phone_number") %><%= t("admin.organizations.index.responsible_name") %><%= t("admin.organizations.index.status") %><%= t("admin.shared.actions") %>
<%= organization.name %><%= organization.email %><%= organization.phone_number %><%= organization.responsible_name %> - <% if organization.verified? %> - - <%= t("admin.organizations.index.verified") %> - <% elsif organization.rejected? %> - - <%= t("admin.organizations.index.rejected") %> - <% else %> - - <%= t("admin.organizations.index.pending") %> - <% end %> - - <% if can? :verify, organization %> - <%= link_to t("admin.organizations.index.verify"), - verify_admin_organization_path(organization, request.query_parameters), - method: :put, class: "button success small-5" %> - <% end %> + + + + + + + + + + + <% @organizations.each do |organization| %> + + + + + + + - - <% end %> - -
<%= t("admin.organizations.index.name") %><%= t("admin.organizations.index.email") %><%= t("admin.organizations.index.phone_number") %><%= t("admin.organizations.index.responsible_name") %><%= t("admin.organizations.index.status") %><%= t("admin.shared.actions") %>
<%= organization.name %><%= organization.email %><%= organization.phone_number %><%= organization.responsible_name %> + <% if organization.verified? %> + + <%= t("admin.organizations.index.verified") %> + <% elsif organization.rejected? %> + + <%= t("admin.organizations.index.rejected") %> + <% else %> + + <%= t("admin.organizations.index.pending") %> + <% end %> + + <% if can? :verify, organization %> + <%= link_to t("admin.organizations.index.verify"), + verify_admin_organization_path(organization, request.query_parameters), + method: :put, class: "button success small-5" %> + <% end %> - <% if can? :reject, organization %> - <%= link_to t("admin.organizations.index.reject"), - reject_admin_organization_path(organization, request.query_parameters), - method: :put, class: "button hollow alert small-5" %> - <% end %> -
+ <% if can? :reject, organization %> + <%= link_to t("admin.organizations.index.reject"), + reject_admin_organization_path(organization, request.query_parameters), + method: :put, class: "button hollow alert small-5" %> + <% end %> +
- <%= paginate @organizations %> -<% else %> -
- <%= t("admin.organizations.search.no_results") %> -
-<% end %> + <%= paginate @organizations %> + <% else %> +
+ <%= t("admin.organizations.search.no_results") %> +
+ <% end %> +