Commit 7be8e232c154e8dc93f85e4a249e7a4406ff313b
1 parent
03f7cd2a
Exists in
master
and in
28 other branches
ActionItem4: added a filter by parent and navigaton
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@58 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
4 changed files
with
7 additions
and
3 deletions
Show diff stats
app/controllers/manage_tags_controller.rb
app/views/manage_tags/_a_tag.rhtml
1 | 1 | <li> |
2 | +<%= a_tag.id %> | |
2 | 3 | <%= a_tag.name %> |
3 | 4 | <%= link_to _('Edit'), {:action => 'edit', :id => a_tag } %> |
4 | 5 | <%= link_to _('Destroy'), {:action => 'destroy', :id => a_tag} %> |
5 | -<ul> | |
6 | +<%= link_to _('Filter by this tag'), {:action => 'list', :parent => a_tag} %><ul> | |
6 | 7 | <%= render :partial => 'a_tag', :collection => a_tag.children %> |
7 | 8 | </ul> |
8 | 9 | </li> | ... | ... |
app/views/manage_tags/list.rhtml
1 | 1 | <h2> <%= _("Listing tags") %> </h2> |
2 | 2 | |
3 | 3 | <ul> |
4 | - <%= render :partial => 'a_tag', :collection => @tags.select{|t|!t.parent} %> | |
4 | + <%= render :partial => 'a_tag', :collection => @tags %> | |
5 | 5 | </ul> |
6 | 6 | |
7 | +<%= link_to _('Up'), {:action => 'list', :parent => @parent.parent} if @parent %> | |
7 | 8 | <%= link_to _('New tag'), {:action => 'new'} %> | ... | ... |
db/migrate/007_acts_as_taggable_migration.rb