mirror of
https://github.com/internetee/registry.git
synced 2025-07-03 09:43:36 +02:00
Merge branch 'master' of github.com:domify/registry
This commit is contained in:
commit
ff709e8d7b
2 changed files with 6 additions and 6 deletions
|
@ -3,7 +3,7 @@ class Admin::ContactsController < AdminController
|
|||
before_action :set_contact, only: [:show]
|
||||
|
||||
def index
|
||||
@q = Contact.search(params[:q])
|
||||
@q = Contact.includes(:registrar).search(params[:q])
|
||||
@contacts = @q.result.page(params[:page])
|
||||
end
|
||||
|
||||
|
@ -14,6 +14,6 @@ class Admin::ContactsController < AdminController
|
|||
private
|
||||
|
||||
def set_contact
|
||||
@contact = Contact.find(params[:id])
|
||||
@contact = Contact.includes(domains: :registrar).find(params[:id])
|
||||
end
|
||||
end
|
||||
|
|
|
@ -24,20 +24,20 @@
|
|||
%th{class: 'col-xs-2'}
|
||||
= sort_link(@q, 'name', t(:name))
|
||||
%th{class: 'col-xs-2'}
|
||||
= sort_link(@q, 'ident', t(:identity))
|
||||
= sort_link(@q, 'code', t(:code))
|
||||
%th{class: 'col-xs-2'}
|
||||
= sort_link(@q, 'ident', t(:ident))
|
||||
%th{class: 'col-xs-2'}
|
||||
= sort_link(@q, 'email', t(:email))
|
||||
%th{class: 'col-xs-2'}
|
||||
= sort_link(@q, 'code', t(:code))
|
||||
%th{class: 'col-xs-2'}
|
||||
= sort_link(@q, 'registrar_name', t(:registrar))
|
||||
%tbody
|
||||
- @contacts.each do |contact|
|
||||
%tr
|
||||
%td= link_to(contact, admin_contact_path(contact))
|
||||
%td= contact.code
|
||||
%td= ident_for(contact)
|
||||
%td= contact.email
|
||||
%td= contact.code
|
||||
%td
|
||||
- if contact.registrar
|
||||
= link_to(contact.registrar, admin_registrar_path(contact.registrar))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue