forked from lujanfernaud/prevy
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add full-text search and restyle search
- Search for keywords in groups' name, location and description - Do not show search bar in home page - Use only one form field for search and restyle search bar - Extract groups index into a partial: The layout code was the same in 'groups/index' and 'searches/show'.
- Loading branch information
1 parent
dc98fba
commit 5c092db
Showing
17 changed files
with
111 additions
and
139 deletions.
There are no files selected for viewing
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
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
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
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
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
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,24 @@ | ||
<div class="container"> | ||
<div class="row"> | ||
<div class="col-md-12 mt-2rem"> | ||
|
||
<header> | ||
<h2 class="text-center"> | ||
<%= yield :groups_header_title %> | ||
</h2> | ||
</header> | ||
|
||
<main class="row d-flex justify-content-center"> | ||
<%= render groups %> | ||
</main> | ||
|
||
<footer class="row"> | ||
<div class="mx-auto mt-2rem mb-2rem"> | ||
<%= will_paginate groups, | ||
:renderer => WillPaginate::ActionView::Bootstrap4LinkRenderer %> | ||
</div> | ||
</footer> | ||
|
||
</div> | ||
</div> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,7 @@ | ||
<%= render "searches/search_bar" %> | ||
|
||
<div class="container"> | ||
<div class="row"> | ||
<div class="col-md-12 mt-4"> | ||
<h2 class="text-center">Unhidden Groups</h2> | ||
<% content_for :groups_header_title do %> | ||
Unhidden Groups | ||
<% end %> | ||
|
||
<div class="row d-flex justify-content-center"> | ||
<%= render @groups %> | ||
</div> | ||
<div class="row"> | ||
<div class="mx-auto mt-2rem mb-2rem"> | ||
<%= will_paginate @groups, | ||
:renderer => WillPaginate::ActionView::Bootstrap4LinkRenderer %> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<%= render "groups", groups: @groups %> |
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
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,24 +1,26 @@ | ||
<div class="container-fluid search-bar"> | ||
<div class="container d-flex justify-content-center"> | ||
<div class="row"> | ||
<div class="col"> | ||
<%= form_tag search_path, method: :get, | ||
class: "form-inline search-form" do %> | ||
<div class="form-group search-group"> | ||
<%= label_tag :location, nil, class: "search-label" %> | ||
<%= text_field_tag :location, params[:location], | ||
class: "form-control search-input" %> | ||
</div> | ||
<div class="container container-search-bar"> | ||
|
||
<div class="row justify-content-center"> | ||
<div class="col-md-6 col-lg-6 col-xl-4"> | ||
|
||
<%= form_tag search_path, method: :get, class: "form-inline" do %> | ||
|
||
<%= label_tag :keywords, nil, hidden: true %> | ||
|
||
<div class="form-group search-group"> | ||
<%= label_tag :group, nil, class: "search-label" %> | ||
<%= text_field_tag :group, params[:group], | ||
class: "form-control search-input" %> | ||
<div class="input-group w-100"> | ||
<%= text_field_tag :keywords, params[:keywords], | ||
class: "form-control", aria: { label: "Search" } %> | ||
|
||
<div class="input-group-append"> | ||
<%= submit_tag "Search", name: nil, class: "btn" %> | ||
</div> | ||
</div> | ||
|
||
<%= submit_tag "Search", name: nil, class: "btn btn-search" %> | ||
<% end %> | ||
|
||
</div> | ||
</div> | ||
|
||
</div> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,7 @@ | ||
<%= render "searches/search_bar" %> | ||
|
||
<div class="container"> | ||
<div class="row"> | ||
<div class="col-md-12 mt-4"> | ||
<h2 class="text-center"> | ||
<%= @groups.count %> | ||
<%= "group".pluralize(@groups.count) %> found | ||
</h2> | ||
<div class="row"> | ||
<%= render @groups %> | ||
</div> | ||
<div class="row"> | ||
<div class="mx-auto mt-2rem mb-2rem"> | ||
<%= will_paginate @groups, | ||
:renderer => WillPaginate::ActionView::Bootstrap4LinkRenderer %> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<% content_for :groups_header_title do %> | ||
<%= "#{@groups.count} #{'group'.pluralize(@groups.count)}" %> found | ||
<% end %> | ||
|
||
<%= render "groups/groups", groups: @groups %> |
2 changes: 1 addition & 1 deletion
2
public/assets/.sprockets-manifest-3166fa9c4d5aaa1767b17f49852da78c.json
Large diffs are not rendered by default.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
...c/assets/application-40978c30ee5f041d65ebce349f90bb2693fa128a8972356af0d5927d89809fd9.css
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file added
BIN
+25.4 KB
...ssets/application-40978c30ee5f041d65ebce349f90bb2693fa128a8972356af0d5927d89809fd9.css.gz
Binary file not shown.
6 changes: 6 additions & 0 deletions
6
...c/assets/application-9e8381aa1d447f92ad3dc4b08831bd44ae4310e59aed175f35df92d08f9c4070.css
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file added
BIN
+25.4 KB
...ssets/application-9e8381aa1d447f92ad3dc4b08831bd44ae4310e59aed175f35df92d08f9c4070.css.gz
Binary file not shown.
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
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