mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 06:34:46 +02:00
Extract partial
This commit is contained in:
parent
4f1401a1a8
commit
3539c3f28c
3 changed files with 48 additions and 43 deletions
46
app/views/registrar/account_activities/_search_form.html.erb
Normal file
46
app/views/registrar/account_activities/_search_form.html.erb
Normal file
|
@ -0,0 +1,46 @@
|
|||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<%= search_form_for @q, url: [:registrar, :account_activities], html: { style: 'margin-bottom: 0;' } do |f| %>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<%= f.label t(:activity_type) %>
|
||||
<%= f.select :activity_type_in, AccountActivity.types_for_select, {}, class: 'form-control js-combobox', placeholder: t(:choose), multiple: true %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<%= f.label t(:description) %>
|
||||
<%= f.search_field :description_cont, class: 'form-control', placeholder: t(:description), autocomplete: 'off' %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<%= f.label t(:receipt_date_from) %>
|
||||
<%= f.search_field :created_at_gteq, value: params[:q][:created_at_gteq], class: 'form-control js-datepicker', placeholder: t(:receipt_date_from) %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<%= f.label t(:receipt_date_until) %>
|
||||
<%= f.search_field :created_at_lteq, value: params[:q][:created_at_lteq], class: 'form-control js-datepicker', placeholder: t(:receipt_date_until) %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6" style="padding-top: 25px;">
|
||||
<button class="btn btn-default">
|
||||
|
||||
<span class="glyphicon glyphicon-search"></span>
|
||||
|
||||
</button>
|
||||
<%= link_to(t('.reset_btn'), registrar_account_activities_path, class: 'btn btn-default') %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
|
@ -5,48 +5,7 @@
|
|||
|
||||
<%= render 'shared/title', name: t(:account_activity) %>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<%= search_form_for @q, url: [:registrar, :account_activities], html: { style: 'margin-bottom: 0;' } do |f| %>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<%= f.label t(:activity_type) %>
|
||||
<%= f.select :activity_type_in, AccountActivity.types_for_select, {}, class: 'form-control js-combobox', placeholder: t(:choose), multiple: true %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<%= f.label t(:description) %>
|
||||
<%= f.search_field :description_cont, class: 'form-control', placeholder: t(:description), autocomplete: 'off' %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<%= f.label t(:receipt_date_from) %>
|
||||
<%= f.search_field :created_at_gteq, value: params[:q][:created_at_gteq], class: 'form-control js-datepicker', placeholder: t(:receipt_date_from) %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<%= f.label t(:receipt_date_until) %>
|
||||
<%= f.search_field :created_at_lteq, value: params[:q][:created_at_lteq], class: 'form-control js-datepicker', placeholder: t(:receipt_date_until) %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6" style="padding-top: 25px;">
|
||||
<button class="btn btn-default">
|
||||
|
||||
<span class="glyphicon glyphicon-search"></span>
|
||||
|
||||
</button>
|
||||
<%= link_to(t('.reset_btn'), registrar_account_activities_path, class: 'btn btn-default') %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<%= render 'search_form' %>
|
||||
|
||||
<hr/>
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
en:
|
||||
registrar:
|
||||
account_activities:
|
||||
index:
|
||||
search_form:
|
||||
reset_btn: Reset
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue