-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy path_search_fields.html.erb
More file actions
62 lines (58 loc) · 2.79 KB
/
_search_fields.html.erb
File metadata and controls
62 lines (58 loc) · 2.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<div class="grid grid-cols-1 md:grid-cols-5 gap-4 items-end mb-6">
<!-- Title -->
<div>
<%= label_tag :title, "Title", class: "block text-sm font-medium text-gray-700 mb-1" %>
<div class="relative">
<%= text_field_tag :title, params[:title],
class: "w-full rounded-lg border border-gray-300 px-3 py-2 text-gray-800 shadow-sm
focus:border-blue-500 focus:ring focus:ring-blue-200 focus:outline-none" %>
<div class="absolute inset-y-0 right-0 flex items-center pr-3 cursor-pointer"
onclick="this.closest('form').submit()">
<i class="fa fa-search text-gray-500"></i>
</div>
</div>
</div>
<!-- Username -->
<div>
<%= label_tag :user_name, "Created by", class: "block text-sm font-medium text-gray-700 mb-1" %>
<div class="relative">
<%= text_field_tag :user_name, params[:user_name],
class: "w-full rounded-lg border border-gray-300 px-3 py-2 text-gray-800 shadow-sm
focus:border-blue-500 focus:ring focus:ring-blue-200 focus:outline-none" %>
<div class="absolute inset-y-0 right-0 flex items-center pr-3 cursor-pointer"
onclick="this.closest('form').submit()">
<i class="fa fa-search text-gray-500"></i>
</div>
</div>
</div>
<!-- Type Dropdown -->
<div>
<%= label_tag :bookmarkable_type, "Bookmark type", class: "block text-sm font-medium text-gray-700 mb-1" %>
<div class="relative">
<%= select_tag :bookmarkable_type,
options_for_select(@bookmarkable_types,
params[:bookmarkable_type]),
include_blank: "All types",
class: "w-full rounded-lg border border-gray-300 px-3 py-2 text-gray-800 shadow-sm
focus:border-blue-500 focus:ring focus:ring-blue-200 focus:outline-none",
onchange: "this.form.submit()" %>
</div>
</div>
<!-- Type Dropdown -->
<div>
<%= label_tag :windows_type, "Windows type", class: "block text-sm font-medium text-gray-700 mb-1" %>
<div class="relative">
<%= select_tag :windows_type,
options_for_select(@windows_types_array,
params[:windows_type]),
include_blank: true,
class: "w-full rounded-lg border border-gray-300 px-3 py-2 text-gray-800 shadow-sm
focus:border-blue-500 focus:ring focus:ring-blue-200 focus:outline-none",
onchange: "this.form.submit()" %>
</div>
</div>
<!-- Clear filters / placeholder for additional fields -->
<div class="flex items-center space-x-2">
<%= link_to 'Clear filters', bookmarks_path, class: "btn btn-utility-outline" %>
</div>
</div>