Sha256: c15bef8bcdce5cde43136ad12450c69eae242e509eb8b76d85e8c33a762e5fce

Contents?: true

Size: 1.09 KB

Versions: 5

Compression:

Stored size: 1.09 KB

Contents

%h2 Editing Attachment #{@attachment.io_stream_file_name}

= semantic_form_for @attachment, url: attachment_path(@attachment), html: {multipart: true} do |f|
  = f.inputs do
    = render 'form', f: f, attachment: @attachment

    = f.action :submit, input_html: { value: 'Upload File', onclick: "this.disabled=true;this.value='Please wait...';this.form.submit();" }

- if @attachment.attachable_type
  %p
    %b Represents:
    = "#{@attachment.attachable_type} id: #{@attachment.attachable_id}"

%p
  %b File Name:
  =link_to @attachment.io_stream_file_name, @attachment.io_stream.url, title: @attachment.io_stream_file_name, alt: @attachment.io_stream_file_name

- if %w(development test).include?(Rails.env)
  %p
    %b File Path:
    =link_to @attachment.io_stream.path.sub(Rails.root.to_s + '/', ""), File.dirname(@attachment.io_stream.path)

%p
  %b File Size:
  = "#{@attachment.io_stream_file_size} bytes"

%p
  %b Content Type:
  = @attachment.io_stream.content_type

%p
  %b Version:
  = @attachment.revision_number

%br/
= link_to 'Show', @attachment
|
= link_to 'View All Attachments', attachments_path

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
importable_attachments-0.0.18 app/views/importable_attachments/attachments/edit.html.haml
importable_attachments-0.0.17 app/views/importable_attachments/attachments/edit.html.haml
importable_attachments-0.0.15 app/views/importable_attachments/attachments/edit.html.haml
importable_attachments-0.0.14 app/views/importable_attachments/attachments/edit.html.haml
importable_attachments-0.0.13 app/views/importable_attachments/attachments/edit.html.haml