From 96b71fb42464204f081bdbcd90c522c990f17b0a Mon Sep 17 00:00:00 2001 From: AntonioTerceiro Date: Tue, 1 Apr 2008 20:47:57 +0000 Subject: [PATCH] ActionItem155: using proper names that are more meaningful that "hit" --- app/views/search/_article.rhtml | 8 ++++---- app/views/search/_comment.rhtml | 4 ++-- app/views/search/_display_results.rhtml | 6 ++++-- app/views/search/_product.rhtml | 12 ++++++------ app/views/search/_profile.rhtml | 4 ++-- 5 files changed, 18 insertions(+), 16 deletions(-) diff --git a/app/views/search/_article.rhtml b/app/views/search/_article.rhtml index c6c9799..66bb950 100644 --- a/app/views/search/_article.rhtml +++ b/app/views/search/_article.rhtml @@ -1,11 +1,11 @@
  • - <%= link_to(hit.title, hit.url) %> + <%= link_to(article.title, article.url) %>
    - <% if hit.last_changed_by %> + <% if article.last_changed_by %> - <%= _('by %s') % link_to(hit.last_changed_by.name, hit.last_changed_by.url) %> + <%= _('by %s') % link_to(article.last_changed_by.name, article.last_changed_by.url) %> <% end %> - <%= _('Last update: %s.') % show_date(hit.updated_on) %> + <%= _('Last update: %s.') % show_date(article.updated_on) %>
  • diff --git a/app/views/search/_comment.rhtml b/app/views/search/_comment.rhtml index ebc500c..a9e5be7 100644 --- a/app/views/search/_comment.rhtml +++ b/app/views/search/_comment.rhtml @@ -1,7 +1,7 @@
  • - <%= link_to(hit.title, hit.url)%> + <%= link_to(comment.title, comment.url)%>
    - <%= _('by %s, on "%s"') % [hit.author_name, link_to(hit.article.name, hit.article.url)] %> + <%= _('by %s, on "%s"') % [comment.author_name, link_to(comment.article.name, comment.article.url)] %>
  • diff --git a/app/views/search/_display_results.rhtml b/app/views/search/_display_results.rhtml index 1019aab..2d7cec3 100644 --- a/app/views/search/_display_results.rhtml +++ b/app/views/search/_display_results.rhtml @@ -1,10 +1,12 @@ <% @results.each do |name,results| %> <% if !results.nil? and !results.empty? %>
    -

    <%= @names[name] %>

    + <% if params[:action] != 'assets' %> +

    <%= @names[name] %>

    + <% end %>
    diff --git a/app/views/search/_product.rhtml b/app/views/search/_product.rhtml index aa1a226..662a1e8 100644 --- a/app/views/search/_product.rhtml +++ b/app/views/search/_product.rhtml @@ -2,16 +2,16 @@
  • - <%= image_tag(hit.image.public_filename(:minor)) if hit.image %> + <%= image_tag(product.image.public_filename(:minor)) if product.image %> - <%= link_to_product(hit) %> + <%= link_to_product(product) %>
      -
    • <%= _('Price: %d') % hit.price %>
    • - <% if hit.enterprise %> -
    • <%= _('Suplier: %s') % link_to_homepage(hit.enterprise.name, hit.enterprise.identifier) %>
    • +
    • <%= _('Price: %d') % product.price %>
    • + <% if product.enterprise %> +
    • <%= _('Suplier: %s') % link_to_homepage(product.enterprise.name, product.enterprise.identifier) %>
    • <% end %> -
    • <%= _('Category: %s') % link_to_category(hit.product_category) %>
    • +
    • <%= _('Category: %s') % link_to_category(product.product_category) %>
  • diff --git a/app/views/search/_profile.rhtml b/app/views/search/_profile.rhtml index fca8153..7cfb582 100644 --- a/app/views/search/_profile.rhtml +++ b/app/views/search/_profile.rhtml @@ -1,9 +1,9 @@ <%# FIXME add more information %>
  • - <%= image_tag(hit.image.public_filename(:minor)) if hit.image %> + <%= image_tag(profile.image.public_filename(:minor)) if profile.image %> - <%= link_to_homepage(hit.name, hit.identifier) %> + <%= link_to_homepage(profile.name, profile.identifier) %>
  • -- libgit2 0.21.2