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,4 +46,13 @@ class SearchController < ApplicationController | ||
46 | @results = search(@query) | 46 | @results = search(@query) |
47 | end | 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 | end | 58 | end |
app/controllers/public/tag_controller.rb
@@ -0,0 +1,13 @@ | @@ -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
@@ -31,6 +31,7 @@ user_icon.png Nuovo apps/ | @@ -31,6 +31,7 @@ user_icon.png Nuovo apps/ | ||
31 | gnome-other.png Nuovo apps/ | 31 | gnome-other.png Nuovo apps/ |
32 | gtk-delete.png Nuovo stock/ | 32 | gtk-delete.png Nuovo stock/ |
33 | gtk-find.png Nuovo stock/ | 33 | gtk-find.png Nuovo stock/ |
34 | +gtk-go-back-ltr.png Nuovo stock/ | ||
34 | ### END OF ICONS LISTING ### | 35 | ### END OF ICONS LISTING ### |
35 | 36 | ||
36 | Licensing of GNOME themes | 37 | Licensing of GNOME themes |
953 Bytes
public/designs/icons/default/style.css
@@ -11,3 +11,4 @@ | @@ -11,3 +11,4 @@ | ||
11 | .button.product { background-image: url(gnome-other.png); } | 11 | .button.product { background-image: url(gnome-other.png); } |
12 | .button.delete { background-image: url(gtk-delete.png); } | 12 | .button.delete { background-image: url(gtk-delete.png); } |
13 | .button.find { background-image: url(gtk-find.png); } | 13 | .button.find { background-image: url(gtk-find.png); } |
14 | +.button.back { background-image: url(gtk-go-back-ltr.png); } |