From c5c005145542995978dcf174a0766fd5d5e3daf0 Mon Sep 17 00:00:00 2001 From: Thomas Schmidt Date: Fri, 20 Apr 2012 14:17:47 +0200 Subject: [PATCH] improve display of subpackages in search result list --- .gitignore | 1 + TODO | 1 - app/views/search/_find_results.rhtml | 59 ++++++++++++++++++---------- public/stylesheets/software.css | 6 ++- 4 files changed, 44 insertions(+), 23 deletions(-) diff --git a/.gitignore b/.gitignore index ea7233806..075537e70 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ public/121 public/114 public/113 public/developer +tmp/appdata-factory.xml diff --git a/TODO b/TODO index 0321fad8d..7b7d338b7 100644 --- a/TODO +++ b/TODO @@ -1,7 +1,6 @@ Todo list for software.o.o: Package Search: -- better display of 'sub-packages' in the result list - Check if we can get the distroname into our browsers headers so software.o.o can switch automatically to the users distro - show current distribution in the headline or so with change option diff --git a/app/views/search/_find_results.rhtml b/app/views/search/_find_results.rhtml index 5e6ab2c60..db814cc28 100644 --- a/app/views/search/_find_results.rhtml +++ b/app/views/search/_find_results.rhtml @@ -11,14 +11,8 @@ <% end %> - <%= render :partial => 'search/category_header' if @category %> - - <% if (@packagenames.include? @search_term) || (@packagenames.size == 1) -%> - <% end -%> - - <% if @packagenames.blank? %>
@@ -38,13 +32,17 @@
- <% @packagenames.each_with_index do |package, idx| %> - <% appdata_pkg = @appdata[:apps].select{|a| a[:pkgname] == package} %> - <% package_name = package + <% + @packagenames.each_with_index do |package, idx| + appdata_pkg = @appdata[:apps].select{|a| a[:pkgname] == package} + package_name = package package_name = appdata_pkg.first[:name] unless ( appdata_pkg.blank? || appdata_pkg.first[:name].blank? ) - banner_path = "apps/#{package.downcase}.jpg" %> + <% if idx % 2 == 0 %> +
+ <% end %> +
<% end -%> diff --git a/public/stylesheets/software.css b/public/stylesheets/software.css index dc141ac6e..a9a4f3874 100644 --- a/public/stylesheets/software.css +++ b/public/stylesheets/software.css @@ -595,7 +595,6 @@ select { } #related-categories { - } @@ -604,6 +603,11 @@ select { position: relative; } +.extra-packages { + padding-top: 1px; + padding-bottom: 1px; +} + #footer { padding-top: 15px; }