mirror of
https://github.com/internetee/registry.git
synced 2025-07-26 04:28:27 +02:00
added registrar status filter
This commit is contained in:
parent
b5b263f4b2
commit
83d896ec17
4 changed files with 60 additions and 9 deletions
29
app/views/admin/registrars/_search_form.html.erb
Normal file
29
app/views/admin/registrars/_search_form.html.erb
Normal file
|
@ -0,0 +1,29 @@
|
|||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<%= search_form_for @q, url: [:admin, :registrars], html: { style: 'margin-bottom: 0;' } do |f| %>
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<%= label_tag t(:status) %>
|
||||
<%= select_tag :status, options_for_select(%w(Active Inactive), params[:status]),
|
||||
{ multiple: false, include_blank: true, selected: params[:status], class: 'form-control selectize'} %>
|
||||
</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 text-right" style="padding-top: 25px;float: right;padding-right: 15px;">
|
||||
<button class="btn btn-default search">
|
||||
|
||||
<span class="glyphicon glyphicon-search"></span>
|
||||
|
||||
</button>
|
||||
<%= link_to(t('.reset_btn'), admin_registrars_path, class: 'btn btn-default') %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
|
@ -10,7 +10,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<%= render 'application/pagination' %>
|
||||
<%= render 'search_form', search: @search %>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
@ -44,9 +44,11 @@
|
|||
<td>
|
||||
<%= x.reg_no %>
|
||||
</td>
|
||||
<td>
|
||||
<%= link_to "#{x.balance}", edit_admin_account_path(x.cash_account) %>
|
||||
</td>
|
||||
<% if x.cash_account.present? %>
|
||||
<td>
|
||||
<%= link_to "#{x.balance}", edit_admin_account_path(x.cash_account) %>
|
||||
</td>
|
||||
<% end %>
|
||||
<td>
|
||||
<%= "#{x.test_registrar}" %>
|
||||
</td>
|
||||
|
@ -69,7 +71,7 @@
|
|||
</div>
|
||||
<div class="col-md-6 text-right">
|
||||
<div class="pagination">
|
||||
<%= t(:result_count, count: @q.result.count) %>
|
||||
<%= t(:result_count, count: @registrars.total_count) %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue