Commit 8eeb74c2b925e0791f11a6ca8580541098bc9eeb
1 parent
17985317
Exists in
master
and in
28 other branches
ActionItem31: moving tag stuff to SearchController and making minor enhancements to the interface
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1024 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
8 changed files
with
33 additions
and
3 deletions
Show diff stats
app/controllers/public/search_controller.rb
| ... | ... | @@ -46,4 +46,13 @@ class SearchController < ApplicationController |
| 46 | 46 | @results = search(@query) |
| 47 | 47 | end |
| 48 | 48 | |
| 49 | + def tags | |
| 50 | + @tags = Tag.find(:all) | |
| 51 | + end | |
| 52 | + | |
| 53 | + def tag | |
| 54 | + @tag = Tag.find_by_name(params[:tag]) | |
| 55 | + @tagged = @tag.taggings.map(&:taggable) | |
| 56 | + end | |
| 57 | + | |
| 49 | 58 | end | ... | ... |
app/controllers/public/tag_controller.rb
| ... | ... | @@ -0,0 +1,13 @@ |
| 1 | +<h2> | |
| 2 | + <%= _('Tagged with "%s"') % content_tag('code', @tag) %> | |
| 3 | +</h2> | |
| 4 | + | |
| 5 | +<% button_bar do %> | |
| 6 | + <%= button('back', _('Back to tag cloud'), :action => 'tags') %> | |
| 7 | +<% end %> | |
| 8 | + | |
| 9 | +<div class='search-tagged-items'> | |
| 10 | +<% @tagged.each do |hit| %> | |
| 11 | + <%= render :partial => partial_for_hit(hit.class), :locals => { :hit => hit } %> | |
| 12 | +<% end %> | |
| 13 | +</div> | ... | ... |
public/designs/icons/default/README
953 Bytes
public/designs/icons/default/style.css