%= render :partial => 'admin/shared/configuration_menu' %>
<%= render :partial => 'js_head' %>
<%= t(:taxonomy_edit) %>
<%= form_for [:admin, @taxonomy] do |f| %>
<%= render :partial => 'form', :locals => {:f => f} %>
<%= label_tag nil, t(:tree) %>
<%= image_tag 'spinner.gif', :title => 'Spinner', :style => "vertical-align:bottom;" %> <%= t(:updating) %>..
<%= t(:taxonomy_tree_instruction) %>
<%= button t(:update) %> <%= t(:or) %> <%= link_to t(:cancel), admin_taxonomies_path %>
<% end %>
<% content_for :head do %>
<%= javascript_tag do -%>
var initial = [
{ "attr" :
{ "id" : "<%= @taxonomy.root.id %>", "rel" : "root" },
"data" : "<%= @taxonomy.root.name %>",
"state" : "open",
"children" : [
<% @taxonomy.root.children.each_with_index do |taxon,i| %>
{
"attr" :
{ "id" : "<%= taxon.id %>"},
"data" : "<%= taxon.name %>"
<% unless taxon.children.empty? %>
,"state" : "closed"
<% end %>
}<%= ',' if i < (@taxonomy.root.children.size - 1) %>
<% end %>
]
}
];
<% end -%>
<% end %>