internetee-registry/app/views/admin/contacts/index.haml

41 lines
1.2 KiB
Text

.row
.col-sm-12
%h2.text-center-xs= t('contacts')
%hr
.row
.col-md-12
= search_form_for [:admin, @q], html: { class: 'form-horizontal' } do |f|
.col-md-11
.form-group
= f.search_field :name_cont, class: 'form-control'
.col-md-1.text-right.text-center-xs
.form-group
%button.btn.btn-primary
 
%span.glyphicon.glyphicon-search
 
%hr
.row
.col-md-12
.table-responsive
%table.table.table-hover.table-bordered.table-condensed
%thead
%tr
%th{class: 'col-xs-2'}
= sort_link(@q, 'name', t(:name))
%th{class: 'col-xs-2'}
= sort_link(@q, 'ident', t(:identity))
%th{class: 'col-xs-2'}
= sort_link(@q, 'email', t(:email))
%th{class: 'col-xs-2'}
= sort_link(@q, 'code', t(:code))
%tbody
- @contacts.each do |contact|
%tr
%td= link_to(contact, admin_contact_path(contact))
%td= "#{contact.ident} #{ident_indicator(contact)}"
%td= contact.email
%td= contact.code
.row
.col-md-12
= paginate @contacts