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

44 lines
1.8 KiB
Plaintext

<%= 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| %>
<div class="modal-header">
<h3><%= t 'admin.file_upload' %></h3>
</div>
<div class="modal-body form-horizontal">
<div class="control-group">
<label for="title" class="control-label error"><%= t 'admin.title' %></label>
<div class="controls">
<%= f.fields_for :title, (@asset.new_record? ? @asset.build_title : @asset.title) do |f| %>
<div>
<%= f.text_field I18n.locale, :class => "input-large" %>
</div>
<% end %>
</div>
</div>
<div class="control-group">
<label for="description" class="control-label error"><%= t 'admin.description' %></label>
<div class="controls">
<%= f.fields_for :description, (@asset.new_record? ? @asset.build_description : @asset.description) do |f| %>
<div>
<%= f.text_field I18n.locale, :class => "input-large" %>
</div>
<% end %>
</div>
</div>
<div class="control-group">
<%= f.label :data, t('admin.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>
</div>
</div>
<% end %>