mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 01:47:18 +02:00
Extract partial
This commit is contained in:
parent
ae61f1acdd
commit
f148fb9aa0
3 changed files with 74 additions and 71 deletions
70
app/views/admin/domains/_search_form.html.erb
Normal file
70
app/views/admin/domains/_search_form.html.erb
Normal file
|
@ -0,0 +1,70 @@
|
||||||
|
<%= search_form_for [:admin, @q], html: { class: 'search-form', autocomplete: 'off' } do |f| %>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="form-group">
|
||||||
|
<%= f.label :name %>
|
||||||
|
<%= f.search_field :name_matches, value: params[:q][:name_matches], class: 'form-control', placeholder: t(:name) %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="form-group">
|
||||||
|
<%= f.label t(:registrant_ident) %>
|
||||||
|
<%= f.search_field :registrant_ident_eq, class: 'form-control', placeholder: t(:registrant_ident) %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="form-group">
|
||||||
|
<%= f.label t(:contact_ident) %>
|
||||||
|
<%= f.search_field :contacts_ident_eq, class: 'form-control', placeholder: t(:contact_ident) %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="form-group">
|
||||||
|
<%= f.label t(:nameserver_hostname) %>
|
||||||
|
<%= f.search_field :nameservers_hostname_eq, class: 'form-control', placeholder: t(:nameserver_hostname) %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<%= f.label t(:registrar_name) %>
|
||||||
|
<%= f.select :registrar_id_eq, Registrar.all.map { |x| [x, x.id] }, { include_blank: true }, class: 'form-control selectize', placeholder: t(:choose) %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="form-group">
|
||||||
|
<%= f.label t(:valid_to_from) %>
|
||||||
|
<%= f.search_field :valid_to_gteq, value: params[:q][:valid_to_gteq], class: 'form-control js-datepicker', placeholder: t(:valid_to_from) %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="form-group">
|
||||||
|
<%= f.label t(:valid_to_until) %>
|
||||||
|
<%= f.search_field :valid_to_lteq, value: params[:q][:valid_to_lteq], class: 'form-control js-datepicker', placeholder: t(:valid_to_until) %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="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' } %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="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) %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3 actions">
|
||||||
|
<button class="btn btn-primary">
|
||||||
|
|
||||||
|
<span class="glyphicon glyphicon-search"></span>
|
||||||
|
|
||||||
|
</button>
|
||||||
|
<%= link_to(t('.reset_btn'), admin_domains_path, class: 'btn btn-default') %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
|
@ -4,76 +4,7 @@
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<%= search_form_for [:admin, @q], html: { class: 'search-form', autocomplete: 'off' } do |f| %>
|
<%= render 'search_form' %>
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-3">
|
|
||||||
<div class="form-group">
|
|
||||||
<%= f.label :name %>
|
|
||||||
<%= f.search_field :name_matches, value: params[:q][:name_matches], class: 'form-control', placeholder: t(:name) %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-3">
|
|
||||||
<div class="form-group">
|
|
||||||
<%= f.label t(:registrant_ident) %>
|
|
||||||
<%= f.search_field :registrant_ident_eq, class: 'form-control', placeholder: t(:registrant_ident) %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-3">
|
|
||||||
<div class="form-group">
|
|
||||||
<%= f.label t(:contact_ident) %>
|
|
||||||
<%= f.search_field :contacts_ident_eq, class: 'form-control', placeholder: t(:contact_ident) %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-3">
|
|
||||||
<div class="form-group">
|
|
||||||
<%= f.label t(:nameserver_hostname) %>
|
|
||||||
<%= f.search_field :nameservers_hostname_eq, class: 'form-control', placeholder: t(:nameserver_hostname) %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-6">
|
|
||||||
<div class="form-group">
|
|
||||||
<%= f.label t(:registrar_name) %>
|
|
||||||
<%= f.select :registrar_id_eq, Registrar.all.map { |x| [x, x.id] }, { include_blank: true }, class: 'form-control selectize', placeholder: t(:choose) %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-3">
|
|
||||||
<div class="form-group">
|
|
||||||
<%= f.label t(:valid_to_from) %>
|
|
||||||
<%= f.search_field :valid_to_gteq, value: params[:q][:valid_to_gteq], class: 'form-control js-datepicker', placeholder: t(:valid_to_from) %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-3">
|
|
||||||
<div class="form-group">
|
|
||||||
<%= f.label t(:valid_to_until) %>
|
|
||||||
<%= f.search_field :valid_to_lteq, value: params[:q][:valid_to_lteq], class: 'form-control js-datepicker', placeholder: t(:valid_to_until) %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-6">
|
|
||||||
<div class="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' } %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-3">
|
|
||||||
<div class="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) %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-3 actions">
|
|
||||||
<button class="btn btn-primary">
|
|
||||||
|
|
||||||
<span class="glyphicon glyphicon-search"></span>
|
|
||||||
|
|
||||||
</button>
|
|
||||||
<%= link_to(t('.reset_btn'), admin_domains_path, class: 'btn btn-default') %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<hr/>
|
<hr/>
|
||||||
|
|
|
@ -3,9 +3,11 @@ en:
|
||||||
domains:
|
domains:
|
||||||
index:
|
index:
|
||||||
header: Domains
|
header: Domains
|
||||||
reset_btn: Reset
|
|
||||||
registrant: Registrant
|
registrant: Registrant
|
||||||
|
|
||||||
|
search_form:
|
||||||
|
reset_btn: Reset
|
||||||
|
|
||||||
edit:
|
edit:
|
||||||
add_new_status_btn: Add new status
|
add_new_status_btn: Add new status
|
||||||
back_btn: Back to domain
|
back_btn: Back to domain
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue