-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #55 from TrestleAdmin/improve-searchbox-markup
Improve searchbox markup and CSS
- Loading branch information
Showing
3 changed files
with
14 additions
and
12 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,9 +1,11 @@ | ||
<div class="searchbox"> | ||
<%= form_tag admin.path, method: :get do %> | ||
<div class="input-group"> | ||
<span class="input-group-text"><icon class="fa fa-search"></icon></span> | ||
<%= link_to icon("fa fa-times"), admin.path, class: "clear-search" if params[:q].present? %> | ||
<%= label_tag :q, icon("fas fa-search"), class: "input-group-text" %> | ||
<%= search_field_tag :q, params[:q], class: "form-control", autocomplete: "off", placeholder: admin.t("search.placeholder", default: "Search") %> | ||
<%= link_to icon("fas fa-times"), admin.path, class: "btn btn-clear-search" if params[:q].present? %> | ||
</div> | ||
<% end %> | ||
</div> |
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