mirror of
https://github.com/internetee/registry.git
synced 2025-05-18 18:29:40 +02:00
87 lines
3.4 KiB
Text
87 lines
3.4 KiB
Text
= render 'shared/title', name: t(:domains)
|
|
|
|
.row
|
|
.col-md-12
|
|
= search_form_for [:admin, @q], html: { style: 'margin-bottom: 0;', class: 'js-form', autocomplete: 'off' } do |f|
|
|
.row
|
|
.col-md-3
|
|
.form-group
|
|
= f.label :name
|
|
= f.search_field :name_matches, value: params[:q][:name_matches], class: 'form-control', placeholder: t(:name)
|
|
.col-md-3
|
|
.form-group
|
|
= f.label t(:registrant_ident)
|
|
= f.search_field :registrant_ident_eq, class: 'form-control', placeholder: t(:registrant_ident)
|
|
.col-md-3
|
|
.form-group
|
|
= f.label t(:contact_ident)
|
|
= f.search_field :contacts_ident_eq, class: 'form-control', placeholder: t(:contact_ident)
|
|
.col-md-3
|
|
.form-group
|
|
= f.label t(:nameserver_hostname)
|
|
= f.search_field :nameservers_hostname_eq, class: 'form-control', placeholder: t(:nameserver_hostname)
|
|
.row
|
|
.col-md-6
|
|
.form-group
|
|
= f.label t(:registrar)
|
|
= f.select :registrar_id_eq, Registrar.all.map { |x| [x, x.id] }, { include_blank: true }, class: 'form-control selectize', placeholder: t(:choose)
|
|
.col-md-3
|
|
.form-group
|
|
= f.label t(:valid_to_from)
|
|
= f.search_field :valid_to_gteq, value: params[:q][:valid_to_gteq], class: 'form-control datepicker', placeholder: t(:valid_to_from)
|
|
.col-md-3
|
|
.form-group
|
|
= f.label t(:valid_to_until)
|
|
= f.search_field :valid_to_lteq, value: params[:q][:valid_to_lteq], class: 'form-control datepicker', placeholder: t(:valid_to_until)
|
|
.row
|
|
.col-md-6
|
|
.form-group
|
|
= label_tag t(:status)
|
|
= select_tag :statuses_contains, options_for_select(DomainStatus::STATUSES, params[:statuses_contains]), { multiple: true, placeholder: t(:choose), class: 'form-control js-combobox' }
|
|
.col-md-3
|
|
.form-group
|
|
= label_tag t(:results_per_page)
|
|
= text_field_tag :results_per_page, params[:results_per_page], class: 'form-control', placeholder: t(:results_per_page)
|
|
.col-md-3{style: 'padding-top: 25px;'}
|
|
%button.btn.btn-primary
|
|
|
|
%span.glyphicon.glyphicon-search
|
|
|
|
%button.btn.btn-default.js-reset-form
|
|
= t(:clear_fields)
|
|
%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')
|
|
%th{class: 'col-xs-2'}
|
|
= sort_link(@q, 'registrant_name', t(:registrant))
|
|
%th{class: 'col-xs-2'}
|
|
= sort_link(@q, 'valid_to', t(:valid_to))
|
|
%th{class: 'col-xs-2'}
|
|
= sort_link(@q, 'registrar_name', t(:registrar))
|
|
%tbody
|
|
- @domains.each do |x|
|
|
%tr
|
|
%td= link_to(x, admin_domain_path(x))
|
|
%td
|
|
- if x.registrant
|
|
= link_to(x.registrant, [:admin, x.registrant])
|
|
|
|
%td= l(x.valid_to, format: :short)
|
|
%td= link_to(x.registrar, admin_registrar_path(x.registrar)) if x.registrar
|
|
.row
|
|
.col-md-6
|
|
= paginate @domains
|
|
.col-md-6.text-right
|
|
.pagination
|
|
= t(:result_count, count: @domains.total_count)
|
|
|
|
:coffee
|
|
$(".js-reset-form").on "click", (e) ->
|
|
e.preventDefault();
|
|
window.location = "#{admin_domains_path}"
|