Sha256: ac58360029db406ecfdb341728f0037a3dd718d15e02db6a32128597c8b28566

Contents?: true

Size: 1.59 KB

Versions: 1

Compression:

Stored size: 1.59 KB

Contents

<%= simple_form_for [:curation_concern, curation_concern] do |f| %>
  <div class="row">
    <div class="span6">
      <fieldset class="required">
        <legend>Your File&#8217;s Title</legend>
        <%= f.input :title,
                    input_html: { class: 'input-xlarge' }
        %>
      </fieldset>
      <fieldset class="required">
        <legend>
          Attach Your File
          <small>A PDF copy is preferred.</small>
        </legend>
          <%= f.input :file,
                      as: :file,
                      label: 'Upload a file'
          %>
      </fieldset>
    </div>

    <div class="span6">
      <%= render "/curation_concern/permission", curation_concern: curation_concern, f: f %>
    </div>
  </div>

  <div class="row">
    <div class="span12 form-actions">
      <%= f.submit(
        (curation_concern.persisted? ? "Update Attached File" : %(Attach to #{parent.human_readable_type})),
        class: 'btn btn-primary'
      ) %>
      <%# TODO Cancel button behavior should be context aware.
        Going back to the dashboard isn't always the expected behavior. %>
      <%= link_to 'Cancel', dashboard_index_path, class: 'btn btn-link' %>
    <% unless curation_concern.new_record? -%>
      <%= link_to 'Go to File Record View', polymorphic_path([:curation_concern, curation_concern]), class: 'btn btn-info pull-right' %>
      <%= link_to 'Download', download_path(curation_concern.noid),{class: 'btn btn-info pull-right', title: "Download #{curation_concern.to_s.inspect}", :target => "_blank"} if can? :read, curation_concern%>
    <% end -%>
    </div>
  </div>
<% end %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
curate-0.2.0 app/views/curation_concern/generic_files/_form.html.erb