suite
This commit is contained in:
parent
afd65d67af
commit
e5d4400fc9
@ -14,7 +14,7 @@ class Admin::IWebsitesController < ApplicationController
|
|||||||
|
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@i_websites = IWebsite.order("p_customer_id ASC").all
|
@i_websites = IWebsite.joins(:p_customer).order("p_customers.name ASC, p_customers.id ASC, i_websites.name ASC").all
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -14,6 +14,10 @@ class PCustomer < ActiveRecord::Base
|
|||||||
generate_mlm_token
|
generate_mlm_token
|
||||||
end
|
end
|
||||||
|
|
||||||
|
before_save do
|
||||||
|
self.name = self.show_name
|
||||||
|
end
|
||||||
|
|
||||||
def self.for_search(search)
|
def self.for_search(search)
|
||||||
PCustomer.joins(:particular).where("code LIKE ? or particulars.organisation LIKE ? or particulars.name LIKE ? or particulars.firstname LIKE ?","%#{search}%", "%#{search}%", "%#{search}%", "%#{search}%")
|
PCustomer.joins(:particular).where("code LIKE ? or particulars.organisation LIKE ? or particulars.name LIKE ? or particulars.firstname LIKE ?","%#{search}%", "%#{search}%", "%#{search}%", "%#{search}%")
|
||||||
end
|
end
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
%li= link_to "Sites", admin_i_websites_path
|
%li= link_to "Projets", admin_i_websites_path
|
||||||
%li= link_to "Hébergements", admin_i_hebergements_path
|
%li= link_to "Hébergements", admin_i_hebergements_path
|
||||||
|
%li= link_to "To do", admin_i_tasks_path
|
||||||
|
Loading…
x
Reference in New Issue
Block a user