Sha256: 8307fc8df8237072905166153fa2a81b9437ee8d0fe4a74ba5697e26c1d09cb3

Contents?: true

Size: 1.27 KB

Versions: 4

Compression:

Stored size: 1.27 KB

Contents

-if resource.errors.any?
  #errorExplanation
    %h2= "#{pluralize(resource.errors.count, "error")} prohibited this image from being saved:"
    %ul
      - resource.errors.full_messages.each do |msg|
        %li= msg

= form_for [@page, @attachment], :html=>{:multipart=>true} do |f|
  = f.file_field :file, :id=>"file_input"
  = f.submit "Upload File", :id=>"upload_button"

= content_for :head do
  = javascript_include_tag *%w(swfobject jquery.uploadify)
:javascript
  $(function() {
    $('#upload_button').hide();
    $('#file_input').uploadify ({
      script          : '#{page_attachments_path(@page, :container=>'attachments_list')}',
      uploader        : '/uploadify.swf',
      fileDataName    : 'attachment[file]',
      multi           : true,
      auto            : true,
      buttonText      : 'New File',
      cancelImg       : '/images/uploadify/cancel.png',
      onComplete      : function(a, b, c, response){ eval(response); },
      scriptData      : {
        '_http_accept': 'application/javascript',
        '_method': 'post',
        '#{session_key_name}' : encodeURIComponent('#{u cookies[session_key_name]}'),
        'authenticity_token': encodeURIComponent('#{raw form_authenticity_token}'),
        'session_encoded': '#{make_session_string}',
      }
    });
  });

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
wheels-0.0.29 app/views/attachments/_form.html.haml
wheels-0.0.28 app/views/attachments/_form.html.haml
wheels-0.0.27 app/views/attachments/_form.html.haml
wheels-0.0.26 app/views/attachments/_form.html.haml