orbit-basic/app/views/admin/assets/file_upload.html.erb

64 lines
2.6 KiB
Plaintext

<%= javascript_include_tag "new_admin" %>
<%= stylesheet_link_tag "new_admin" %>
<%= javascript_include_tag "tinymce/tiny_mce_popup" %>
<%= flash_messages %>
<body onload="tinyMCEPopup.executeOnLoad('init();')">
<%= form_for :asset, :url => admin_assets_path(:uploader => true), :html => {:id => 'ajaxForm', :multipart => true } do |f| %>
<div class="modal-header">
<h3><%= t 'file.upload' %></h3>
</div>
<label class="control-label error" id="dyn_error"></label>
<div class="modal-body form-horizontal">
<div class="control-group">
<label for="title" class="control-label error"><%= t :title %></label>
<div class="controls">
<%= f.fields_for :title_translations do |f| %>
<div>
<% @site_valid_locales.each do |locale| %>
<%= content_tag :label do -%>
<div>
<%= I18nVariable.from_locale(locale) %>
<%= f.text_field locale, :class => "input-large", :value => (@asset.title_translations[locale] rescue nil) %>
</div>
<% end %>
<% end %>
</div>
<% end %>
</div>
</div>
<div class="control-group">
<label for="description" class="control-label error"><%= t :description %></label>
<div class="controls">
<%= f.fields_for :description_translations do |f| %>
<div>
<% @site_valid_locales.each do |locale| %>
<%= content_tag :label do -%>
<div>
<%= I18nVariable.from_locale(locale) %>
<%= f.text_field locale, :class => "input-large", :value => (@asset.title_translations[locale] rescue nil) %>
</div>
<% end %>
<% end %>
</div>
<% end %>
</div>
</div>
<div class="control-group">
<%#= f.label :data, t(:data), :class => "control-label" %>
<div class="controls">
<%= f.file_field :data, :class => 'upload' %>
</div>
</div>
</div>
<div style="position: absolute; width: 100%; bottom: 0;">
<div class="modal-footer">
<!-- <a id='ajax_form_submit' class="btn btn-primary"><#%= t(:create) %></a> -->
<input type="submit" value="<%= t(:create) %>" class="btn btn-primary" />
</div>
</div>
<% end %>
</body>