<% if local_assigns.has_key?(:media_dir) %>
<% remote_form_for media_dir, :url => url_for(:action=>:update, :controller=>:media_dirs, :id=>media_dir.id), :complete => "Application.Layouts.MediaLibrary.initTree();" do |f|%> <%= f.hidden_field :parent_id %>
<%=f.label :name, Skyline::MediaDir.human_attribute_name("name") + ":" %>
<%= f.text_field :name, :class => "full" %>
<%= submit_button :save, :class => "small green" %>
<%= link_to_remote button_text(:delete_media_dir),{ :url => skyline_media_dir_url(media_dir), :method=> :delete, :confirm => t(:message, :scope => [:media_dir,:destroy]), :href => url_for(:action => "destroy", :id => media_dir.id)}, { :class => "button small red"} %>
<% end %>
<% end %>