-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b1c639e
commit f12b6ab
Showing
2 changed files
with
8 additions
and
0 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
apps/artemis_web/lib/artemis_web/templates/layout/filter_input_field.html.eex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<%= form_for @conn, "", [class: "ui form filter-form"], fn f -> %> | ||
<% selected = Artemis.Helpers.deep_get(@conn, [:query_params, "filters", @value]) || [] %> | ||
<% container_class = if selected, do: "active" %> | ||
<div class="<%= container_class %>"> | ||
<%= text_input f, @value, name: @value, value: selected, class: "filter-input-field", placeholder: "Filter by #{@label}" %> | ||
</div> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters