From ab9975cb6cdd994eb1cf1c92daa15eedb63dad27 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Fri, 8 Jun 2018 15:04:33 +1000 Subject: [PATCH] Move override into view --- .../index/add_enterprise_limit_column.html.haml.deface | 3 --- .../add_enterprise_limit_column_header.html.haml.deface | 3 --- .../index/reconfigure_column_spacing.html.haml.deface | 6 ------ app/views/spree/admin/users/index.html.haml | 7 +++++-- 4 files changed, 5 insertions(+), 14 deletions(-) delete mode 100644 app/overrides/spree/admin/users/index/add_enterprise_limit_column.html.haml.deface delete mode 100644 app/overrides/spree/admin/users/index/add_enterprise_limit_column_header.html.haml.deface delete mode 100644 app/overrides/spree/admin/users/index/reconfigure_column_spacing.html.haml.deface diff --git a/app/overrides/spree/admin/users/index/add_enterprise_limit_column.html.haml.deface b/app/overrides/spree/admin/users/index/add_enterprise_limit_column.html.haml.deface deleted file mode 100644 index d16e186be8..0000000000 --- a/app/overrides/spree/admin/users/index/add_enterprise_limit_column.html.haml.deface +++ /dev/null @@ -1,3 +0,0 @@ -/ insert_before "td[data-hook='admin_users_index_row_actions']" - -%td.user_enterprise_limit= user.enterprise_limit \ No newline at end of file diff --git a/app/overrides/spree/admin/users/index/add_enterprise_limit_column_header.html.haml.deface b/app/overrides/spree/admin/users/index/add_enterprise_limit_column_header.html.haml.deface deleted file mode 100644 index f2222ef012..0000000000 --- a/app/overrides/spree/admin/users/index/add_enterprise_limit_column_header.html.haml.deface +++ /dev/null @@ -1,3 +0,0 @@ -/ insert_before "th[data-hook='admin_users_index_header_actions']" - -%th= sort_link @search,:enterprise_limit, t(:enterprise_limit) \ No newline at end of file diff --git a/app/overrides/spree/admin/users/index/reconfigure_column_spacing.html.haml.deface b/app/overrides/spree/admin/users/index/reconfigure_column_spacing.html.haml.deface deleted file mode 100644 index d666e1b7c5..0000000000 --- a/app/overrides/spree/admin/users/index/reconfigure_column_spacing.html.haml.deface +++ /dev/null @@ -1,6 +0,0 @@ -/ replace "table#listing_users colgroup" - -%colgroup - %col{ style: "width: 65%" } - %col{ style: "width: 20%" } - %col{ style: "width: 15%" } \ No newline at end of file diff --git a/app/views/spree/admin/users/index.html.haml b/app/views/spree/admin/users/index.html.haml index 023cb11ec6..854e6f1a08 100644 --- a/app/views/spree/admin/users/index.html.haml +++ b/app/views/spree/admin/users/index.html.haml @@ -5,11 +5,13 @@ = button_link_to Spree.t(:new_user), new_object_url, icon: "icon-plus", id: "admin_new_user_link" %table#listing_users.index{"data-hook" => ""} %colgroup - %col{style: "width: 85%"} - %col{style: "width: 15%"} + %col{ style: "width: 65%" } + %col{ style: "width: 20%" } + %col{ style: "width: 15%" } %thead %tr{"data-hook" => "admin_users_index_headers"} %th= sort_link @search,:email, Spree.t(:user), {}, {title: "users_email_title"} + %th= sort_link @search,:enterprise_limit, t(:enterprise_limit) %th.actions{"data-hook" => "admin_users_index_header_actions"} %tbody - @users.each do |user| @@ -18,6 +20,7 @@ - row_class = cycle("odd", "even") %tr{id: spree_dom_id(user), "data-hook" => "admin_users_index_rows", class: row_class} %td.user_email= link_to user.email, object_url(user) + %td.user_enterprise_limit= user.enterprise_limit %td.actions{"data-hook" => "admin_users_index_row_actions"} = link_to_edit user, no_text: true = link_to_delete user, no_text: true