Move override into view

This commit is contained in:
Maikel Linke
2018-06-08 15:04:33 +10:00
parent 339b04a044
commit ab9975cb6c
4 changed files with 5 additions and 14 deletions

View File

@@ -1,3 +0,0 @@
/ insert_before "td[data-hook='admin_users_index_row_actions']"
%td.user_enterprise_limit= user.enterprise_limit

View File

@@ -1,3 +0,0 @@
/ insert_before "th[data-hook='admin_users_index_header_actions']"
%th= sort_link @search,:enterprise_limit, t(:enterprise_limit)

View File

@@ -1,6 +0,0 @@
/ replace "table#listing_users colgroup"
%colgroup
%col{ style: "width: 65%" }
%col{ style: "width: 20%" }
%col{ style: "width: 15%" }

View File

@@ -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