internetee-registry/app/views/admin/domain_versions/archive.haml
2016-02-12 18:08:39 +02:00

73 lines
2.3 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
= label_tag :name
= f.search_field :name, value: params[:q][:name], class: 'form-control', placeholder: t(:name)
.col-md-3
.form-group
= label_tag :registrant
= f.search_field :registrant, value: params[:q][:registrant], class: 'form-control', placeholder: t(:registrant)
.col-md-3
.form-group
= label_tag t(:registrar)
= f.search_field :registrar, value: params[:q][:registrar], class: 'form-control', placeholder: t(:registrant)
.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)
.row
.col-md-3
.col-md-3
.col-md-3
.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'}
= t(:name)
%th{class: 'col-xs-2'}
= t(:registrant)
%th{class: 'col-xs-2'}
= t(:registrar)
%th{class: 'col-xs-2'}
= t(:action)
%tbody
- @versions.each do |version|
%tr
%td= version.reify.name
%td
- if version.reify.registrant
= link_to(version.reify.registrant, admin_registrant_path(version.reify.registrant))
%td
- if version.reify.registrar
= link_to(version.reify.registrar, admin_registrar_path(version.reify.registrar))
%td= version.event
.row
.col-md-6
= paginate @versions
.col-md-6.text-right
:coffee
$(".js-reset-form").on "click", (e) ->
e.preventDefault();
window.location = "#{admin_domain_versions_path}"