From be9cb71f477108ed292b98671a389c380817caa6 Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Thu, 22 Aug 2013 00:22:12 +0200 Subject: [PATCH] Moved search form into navbar. Fixed paginator. --- .../_packages_search_results.html.erb | 1 - app/views/packages/index.html.erb | 55 ++++++------------- 2 files changed, 18 insertions(+), 38 deletions(-) diff --git a/app/views/packages/_packages_search_results.html.erb b/app/views/packages/_packages_search_results.html.erb index f489884..1bba4da 100644 --- a/app/views/packages/_packages_search_results.html.erb +++ b/app/views/packages/_packages_search_results.html.erb @@ -1,7 +1,6 @@ <% # Show search results %> <% if @packages.length>0 %> - <%= paginate @packages %> <% @packages.each do |package| %>
diff --git a/app/views/packages/index.html.erb b/app/views/packages/index.html.erb index 614880f..08db81e 100644 --- a/app/views/packages/index.html.erb +++ b/app/views/packages/index.html.erb @@ -1,11 +1,13 @@ +<%= paginate @packages %> +
-

Search for a package/description:

- - <%= form_tag(url_for, method: "get", class: "form-search") do %> - -
-
- <%= text_field_tag :search, params[:search], autofocus: true, placeholder: 'What are you looking for...', class: "search-query" %> - -
- -
- - - - -
- - - - - -
- -
-
- - -
-
- - <% end %> - <%= render "packages_search_results", object: @packages %>