<%= stylesheet_link_tag 'application', 'media_listing', :cache => 'cache-media-listing' %> <%= stylesheet_import 'button', :themed_source => true %> <%= javascript_include_tag :defaults %> <%= javascript_include_tag 'lowpro' %> <%= stylesheet_link_tag icon_theme_stylesheet_path %>

<%= _("Include files in some folder or select from the list below to add images and documents to the text editor beside (max size %s)") % UploadedFile.max_size.to_humanreadable %>

<% form_for('uploaded_file', :url => {:action => 'upload_files'}, :html => {:multipart => true}) do |f| %> <%= hidden_field_tag('back_to', @back_to) %> <%= render :partial => 'upload_file_form', :locals => { :size => '30' } %> <% end %>

<%= _('Folders') %>

<%= _('Drag images and documents to add them to the text. If needed, resize images by clicking the tree icon on editor.') %>

<%= _('Images') %>

<%= select_folder('', 'folder', 'image_folder_id', @image_folders, {}, :onchange => remote_function(:with => "'image_folder_id=' + value + '&ipage=1'", :url => { :action => :media_listing, :format => 'js' }) ) %> <%= render :partial => 'image_thumb', :locals => { :images => @images } %>

<%= _('Documents') %>

<%= select_folder('', 'folder', 'document_folder_id', @document_folders, {}, :onchange => remote_function(:with => "'document_folder_id=' + value + '&dpage=1'", :url => { :action => :media_listing }) ) %> <%= render :partial => 'document_link', :locals => { :documents => @documents } %>