delete customers
This commit is contained in:
parent
07f42507bb
commit
514bcb851b
@ -47,5 +47,15 @@ class Admin::CustomersController < ApplicationController
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
def destroy
|
||||||
|
|
||||||
|
@customer = Customer.find(params[:id])
|
||||||
|
@customer.destroy
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -128,14 +128,6 @@ class Public::CustomersController < ApplicationController
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
def destroy
|
|
||||||
|
|
||||||
#@customer = Customer.find(params[:id])
|
|
||||||
#@customer.destroy
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
def mail
|
def mail
|
||||||
|
@ -18,8 +18,8 @@
|
|||||||
=link_to customer.email, "mailto:#{customer.email}"
|
=link_to customer.email, "mailto:#{customer.email}"
|
||||||
|
|
||||||
|
|
||||||
%td.actions
|
%td.actions{:style => "width:150px;"}
|
||||||
=# link_to i(:"trash-o"), [:admin, customer], :confirm => 'Voulez-vous vraiment supprimer ce compte utilisateur ?', :method => :delete, :remote => true
|
= link_to i(:"trash-o"), [:admin, customer], :data => {:confirm => 'Voulez-vous vraiment supprimer ce compte utilisateur ?'}, :method => :delete, :remote => true
|
||||||
=# link_to i(:eye), [:admin, customer]
|
=# link_to i(:eye), [:admin, customer]
|
||||||
= link_to i(:pencil), edit_admin_customer_path(customer)
|
= link_to i(:pencil), edit_admin_customer_path(customer)
|
||||||
= link_to i(:check), validate_admin_customer_path(customer), :data => {:confirm => "Voulez-vous vraiment valider ce compte ?"} if !customer.account_validated
|
= link_to i(:check), validate_admin_customer_path(customer), :data => {:confirm => "Voulez-vous vraiment valider ce compte ?"} if !customer.account_validated
|
||||||
|
3
app/views/admin/customers/destroy.js.erb
Normal file
3
app/views/admin/customers/destroy.js.erb
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
$('#customer_row_<%= @customer.id %>').remove();
|
||||||
|
|
||||||
|
close_pane_hover();
|
Loading…
x
Reference in New Issue
Block a user