%= javascript_include_tag "new_admin" %>
<%= stylesheet_link_tag "new_admin" %>
<%= flash_messages %>
<%= form_for :asset, :url => admin_assets_path(:uploader => true), :html => {:id => 'ajaxForm', :multipart => true } do |f| %>
<%= f.fields_for :i18n_variable, (@asset.new_record? ? @asset.build_i18n_variable : @asset.i18n_variable) do |f| %>
<% @site_valid_locales.each do |locale| %>
<%= content_tag :label do -%>
<%= I18nVariable.from_locale(locale) %>
<%= f.text_field locale, :class => "input-large" %>
<% end %>
<% end %>
<% end %>
<%= f.label :category, t('admin.category'), :class => "control-label" %>
<%= f.select :asset_category_id, @asset_categories.collect{|t| [ t.i18n_variable[I18n.locale], t.id ]}, {}, :class => "input-large" %>
<% @tags.each do |tag| %>
<%= content_tag :label, :class => "checkbox inline" do -%>
<%= check_box_tag 'asset[tag_ids][]', tag.id, @asset.tag_ids.include?(tag.id) %>
<%= tag[I18n.locale] %>
<% end %>
<% end %>
<%= f.label :data, t('admin.data'), :class => "control-label" %>
<%= f.file_field :data, :class => 'upload' %>