Skip to content

Commit 962fee9

Browse files
authored
regroup field for topics search form, remove text (#89)
2 parents f46f1be + de21e95 commit 962fee9

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

app/views/topics/_search.html.erb

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,42 +4,53 @@
44
</div>
55
<div class="card-content">
66
<div class="card-body">
7-
<p class="card-text"> Use these params settings to search topics</p>
87
<%= form_for :search, url: topics_path, method: :get, data: { controller: "topics", topics_target: "form", turbo_frame: "topic-list", turbo_action: "advance" } do |f| %>
98
<div class="form-body">
109
<div class="row">
11-
<div class="col-12">
10+
<div class="col-md-6 col-12">
1211
<div class="form-group">
1312
<%= f.label :provider %>
1413
<%= f.select :provider_id, options_from_collection_for_select(providers, :id, :name, params[:provider_id]), { prompt: "Select provider" }, class: "form-select", data: { action: "change->topics#search" } %>
1514
</div>
15+
</div>
16+
<div class="col-md-6 col-12">
1617
<div class="form-group">
1718
<%= f.label :language %>
1819
<%= f.select :language_id, options_from_collection_for_select(languages, :id, :name, params[:provider_id]), { prompt: "Select language" }, class: "form-select", data: { action: "change->topics#search" } %>
1920
</div>
21+
</div>
22+
<div class="col-md-6 col-12">
2023
<div class="form-group">
2124
<%= f.label :query %>
2225
<%= f.text_field :query, value: params[:query], class: "form-control", data: { action: "input->topics#search" } %>
2326
</div>
27+
</div>
28+
<div class="col-md-3 col-12">
2429
<div class="form-group">
2530
<%= f.label :year %>
2631
<%= f.select :year, options_for_select((Date.today.year-10..Date.today.year).to_a, params[:year]), { prompt: "Select year" }, class: "form-select", data: { action: "change->topics#search" } %>
2732
</div>
33+
</div>
34+
<div class="col-md-3 col-12">
2835
<div class="form-group">
2936
<%= f.label :month %>
3037
<%= f.select :month, options_for_select((1..12).to_a, params[:month]), { prompt: "Select month" }, class: "form-select", data: { action: "change->topics#search" } %>
3138
</div>
39+
</div>
40+
<div class="col-md-6 col-12">
3241
<div class="form-group">
3342
<%= f.label :state %>
3443
<%= f.select :state, options_for_select(Topic::STATES.index_with(&:itself), params[:state]), { prompt: "Select state" }, class: "form-select", data: { action: "change->topics#search" } %>
3544
</div>
45+
</div>
46+
<div class="col-md-6 col-12">
3647
<div class="form-group">
3748
<%= f.label :order %>
3849
<%= f.select :order, options_for_select(Topic::SORTS.reverse.index_with(&:itself), params[:order]), {}, class: "form-select", data: { action: "change->topics#search" } %>
3950
</div>
40-
<div class="col-12 d-flex justify-content-end">
41-
<%= link_to "Clear", topics_path, class: "btn btn-light-secondary me-1 mb-1" %>
42-
</div>
51+
</div>
52+
<div class="col-12 d-flex justify-content-end">
53+
<%= link_to "Clear", topics_path, class: "btn btn-light-secondary me-1 mb-1" %>
4354
</div>
4455
</div>
4556
</div>

0 commit comments

Comments
 (0)