Commit 96b71fb42464204f081bdbcd90c522c990f17b0a
1 parent
7f4b555e
Exists in
master
and in
29 other branches
ActionItem155: using proper names that are more meaningful that "hit"
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1628 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
5 changed files
with
18 additions
and
16 deletions
Show diff stats
app/views/search/_article.rhtml
1 | 1 | <li> |
2 | - <strong><%= link_to(hit.title, hit.url) %></strong> | |
2 | + <strong><%= link_to(article.title, article.url) %></strong> | |
3 | 3 | <div class="item_meta"> |
4 | - <% if hit.last_changed_by %> | |
4 | + <% if article.last_changed_by %> | |
5 | 5 | <span class="cat_item_by"> |
6 | - <%= _('by %s') % link_to(hit.last_changed_by.name, hit.last_changed_by.url) %> | |
6 | + <%= _('by %s') % link_to(article.last_changed_by.name, article.last_changed_by.url) %> | |
7 | 7 | </span> |
8 | 8 | <% end %> |
9 | - <span class="cat_item_update"><%= _('Last update: %s.') % show_date(hit.updated_on) %></span> | |
9 | + <span class="cat_item_update"><%= _('Last update: %s.') % show_date(article.updated_on) %></span> | |
10 | 10 | </div> |
11 | 11 | </li> | ... | ... |
app/views/search/_comment.rhtml
1 | 1 | <li> |
2 | - <strong><%= link_to(hit.title, hit.url)%></strong> | |
2 | + <strong><%= link_to(comment.title, comment.url)%></strong> | |
3 | 3 | <div class="item_meta"> |
4 | - <span class="cat_item_by"><%= _('by %s, on "%s"') % [hit.author_name, link_to(hit.article.name, hit.article.url)] %></span> | |
4 | + <span class="cat_item_by"><%= _('by %s, on "%s"') % [comment.author_name, link_to(comment.article.name, comment.article.url)] %></span> | |
5 | 5 | </div> |
6 | 6 | </li> |
7 | 7 | ... | ... |
app/views/search/_display_results.rhtml
1 | 1 | <% @results.each do |name,results| %> |
2 | 2 | <% if !results.nil? and !results.empty? %> |
3 | 3 | <div id="search-results-<%= name %>"> |
4 | - <h3><%= @names[name] %></h3> | |
4 | + <% if params[:action] != 'assets' %> | |
5 | + <h3><%= @names[name] %></h3> | |
6 | + <% end %> | |
5 | 7 | <ul> |
6 | 8 | <% results.each do |hit| %> |
7 | - <%= render :partial => partial_for_class(hit.class), :locals => { :hit => hit } %> | |
9 | + <%= render :partial => partial_for_class(hit.class), :object => hit %> | |
8 | 10 | <% end %> |
9 | 11 | </ul> |
10 | 12 | </div> | ... | ... |
app/views/search/_product.rhtml
... | ... | @@ -2,16 +2,16 @@ |
2 | 2 | |
3 | 3 | <li> |
4 | 4 | <div class='search-result-text'> |
5 | - <%= image_tag(hit.image.public_filename(:minor)) if hit.image %> | |
5 | + <%= image_tag(product.image.public_filename(:minor)) if product.image %> | |
6 | 6 | <strong> |
7 | - <%= link_to_product(hit) %> | |
7 | + <%= link_to_product(product) %> | |
8 | 8 | </strong> |
9 | 9 | <ul> |
10 | - <li> <%= _('Price: %d') % hit.price %> </li> | |
11 | - <% if hit.enterprise %> | |
12 | - <li> <%= _('Suplier: %s') % link_to_homepage(hit.enterprise.name, hit.enterprise.identifier) %> </li> | |
10 | + <li> <%= _('Price: %d') % product.price %> </li> | |
11 | + <% if product.enterprise %> | |
12 | + <li> <%= _('Suplier: %s') % link_to_homepage(product.enterprise.name, product.enterprise.identifier) %> </li> | |
13 | 13 | <% end %> |
14 | - <li> <%= _('Category: %s') % link_to_category(hit.product_category) %> </li> | |
14 | + <li> <%= _('Category: %s') % link_to_category(product.product_category) %> </li> | |
15 | 15 | </ul> |
16 | 16 | </div> |
17 | 17 | </li> | ... | ... |
app/views/search/_profile.rhtml
1 | 1 | <%# FIXME add more information %> |
2 | 2 | <li> |
3 | 3 | <div class='search-result-text'> |
4 | - <%= image_tag(hit.image.public_filename(:minor)) if hit.image %> | |
4 | + <%= image_tag(profile.image.public_filename(:minor)) if profile.image %> | |
5 | 5 | <strong> |
6 | - <%= link_to_homepage(hit.name, hit.identifier) %> | |
6 | + <%= link_to_homepage(profile.name, profile.identifier) %> | |
7 | 7 | </strong> |
8 | 8 | </div> |
9 | 9 | </li> | ... | ... |