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]
|
before_action :set_contact, only: [:show]
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@q = Contact.search(params[:q])
|
@q = Contact.includes(:registrar).search(params[:q])
|
||||||
@contacts = @q.result.page(params[:page])
|
@contacts = @q.result.page(params[:page])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -14,6 +14,6 @@ class Admin::ContactsController < AdminController
|
||||||
private
|
private
|
||||||
|
|
||||||
def set_contact
|
def set_contact
|
||||||
@contact = Contact.find(params[:id])
|
@contact = Contact.includes(domains: :registrar).find(params[:id])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -24,20 +24,20 @@
|
||||||
%th{class: 'col-xs-2'}
|
%th{class: 'col-xs-2'}
|
||||||
= sort_link(@q, 'name', t(:name))
|
= sort_link(@q, 'name', t(:name))
|
||||||
%th{class: 'col-xs-2'}
|
%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'}
|
%th{class: 'col-xs-2'}
|
||||||
= sort_link(@q, 'email', t(:email))
|
= sort_link(@q, 'email', t(:email))
|
||||||
%th{class: 'col-xs-2'}
|
|
||||||
= sort_link(@q, 'code', t(:code))
|
|
||||||
%th{class: 'col-xs-2'}
|
%th{class: 'col-xs-2'}
|
||||||
= sort_link(@q, 'registrar_name', t(:registrar))
|
= sort_link(@q, 'registrar_name', t(:registrar))
|
||||||
%tbody
|
%tbody
|
||||||
- @contacts.each do |contact|
|
- @contacts.each do |contact|
|
||||||
%tr
|
%tr
|
||||||
%td= link_to(contact, admin_contact_path(contact))
|
%td= link_to(contact, admin_contact_path(contact))
|
||||||
|
%td= contact.code
|
||||||
%td= ident_for(contact)
|
%td= ident_for(contact)
|
||||||
%td= contact.email
|
%td= contact.email
|
||||||
%td= contact.code
|
|
||||||
%td
|
%td
|
||||||
- if contact.registrar
|
- if contact.registrar
|
||||||
= link_to(contact.registrar, admin_registrar_path(contact.registrar))
|
= link_to(contact.registrar, admin_registrar_path(contact.registrar))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue