diff --git a/app/controllers/manage_tags_controller.rb b/app/controllers/manage_tags_controller.rb
index 7c69cae..6677801 100644
--- a/app/controllers/manage_tags_controller.rb
+++ b/app/controllers/manage_tags_controller.rb
@@ -26,8 +26,9 @@ class ManageTagsController < ApplicationController
end
def edit
- @parent_tags = Tag.find_all
@tag = Tag.find(params[:id])
+ @parent_tags = Tag.find_all.select{|pt| !pt.ancestors.include?(@tag) and pt != @tag}
+
end
def update
diff --git a/app/views/manage_tags/_a_tag.rhtml b/app/views/manage_tags/_a_tag.rhtml
new file mode 100644
index 0000000..c59d7e2
--- /dev/null
+++ b/app/views/manage_tags/_a_tag.rhtml
@@ -0,0 +1,8 @@
+
+<%= a_tag.name %>
+<%= link_to _('Edit'), {:action => 'edit', :id => a_tag } %>
+<%= link_to _('Destroy'), {:action => 'destroy', :id => a_tag} %>
+
+ <%= render :partial => 'a_tag', :collection => a_tag.children %>
+
+
diff --git a/app/views/manage_tags/_form.rhtml b/app/views/manage_tags/_form.rhtml
index 3645947..f3d8b04 100644
--- a/app/views/manage_tags/_form.rhtml
+++ b/app/views/manage_tags/_form.rhtml
@@ -1,2 +1,2 @@
Name: <%= text_field 'tag', 'name' %>
-Parent tag: <%= select_tag 'parent_id', [''] + @parent_tags.select{|pt| !pt.ancestors.include?(@tag) and pt != @tag}.map {|n|"'} %>
+Parent tag: <%= select_tag 'parent_id', [''] + @parent_tags.map {|pt|"'} %>
diff --git a/app/views/manage_tags/_list.rhtml b/app/views/manage_tags/_list.rhtml
deleted file mode 100644
index b4e7622..0000000
--- a/app/views/manage_tags/_list.rhtml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-<%= a_tag.name %>
-
-<% a_tag.children.each do |child|%>
-<%= render :partial =>'list', :locals => {:a_tag => child} %>
-<% end %>
-
-
--
libgit2 0.21.2