mirror of
https://github.com/internetee/registry.git
synced 2025-07-05 02:33:35 +02:00
66 lines
2.6 KiB
Text
66 lines
2.6 KiB
Text
- content_for :actions do
|
|
= link_to(t('.new_btn'), new_admin_reserved_domain_path, class: 'btn btn-primary')
|
|
= render 'shared/title', name: t('.title')
|
|
|
|
.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(:created_at_from)
|
|
= f.search_field :created_at_gteq, value: params[:q][:created_at_gteq], class: 'form-control datepicker', placeholder: t(:created_at_from)
|
|
.col-md-3
|
|
.form-group
|
|
= f.label t(:created_at_until)
|
|
= f.search_field :created_at_lteq, value: params[:q][:created_at_lteq], class: 'form-control datepicker', placeholder: t(:created_at_until)
|
|
.row
|
|
.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
|
|
|
|
= link_to(t('.reset_btn'), admin_reserved_domains_path, class: 'btn btn-default')
|
|
%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, 'password')
|
|
%th{class: 'col-xs-2'}
|
|
= sort_link(@q, 'created_at', t(:created_at))
|
|
%th{class: 'col-xs-2'}
|
|
= sort_link(@q, 'updated_at', t(:updated_at))
|
|
%th{class: 'col-xs-2'}
|
|
= t(:actions)
|
|
%tbody
|
|
- @domains.each do |x|
|
|
%tr
|
|
%td= x.name
|
|
%td= x.password
|
|
%td= l(x.created_at, format: :short)
|
|
%td= l(x.updated_at, format: :short)
|
|
%td
|
|
= link_to(t(:edit_pw), edit_admin_reserved_domain_path(id: x.id),
|
|
class: 'btn btn-primary btn-xs')
|
|
= link_to(t(:delete), delete_admin_reserved_domain_path(id: x.id),
|
|
data: { confirm: t(:are_you_sure) }, class: 'btn btn-danger btn-xs')
|
|
.row
|
|
.col-md-6
|
|
= paginate @domains
|
|
.col-md-6.text-right
|
|
.pagination
|
|
= t(:result_count, count: @domains.total_count)
|