Commit 6eb1409f12710123f039720d4f539afd8e866b72

Authored by AntonioTerceiro
1 parent 37c976ef

ActionItem152: listing content tagged with a particular tag


git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1265 3f533792-8f58-4932-b0fe-aaf55b0a4547
app/controllers/public/profile_controller.rb
... ... @@ -8,7 +8,8 @@ class ProfileController < ApplicationController
8 8 end
9 9  
10 10 def tag
11   - @tag = profile.content_tagged_with(params[:id])
  11 + @tag = params[:id]
  12 + @tagged = profile.find_tagged_with(@tag)
12 13 end
13 14  
14 15 end
... ...
app/views/profile/tag.rhtml 0 → 100644
... ... @@ -0,0 +1,9 @@
  1 +<h1><%= _('Content tagged with "%s"') % @tag %></h1>
  2 +
  3 +<div class='search-tagged-items'>
  4 + <ul>
  5 + <% for doc in @tagged %>
  6 + <li><%= link_to doc.title, doc.url %></li>
  7 + <% end %>
  8 + </ul>
  9 +</div>
... ...