Versions

<%= form_for @generic_file, url: sufia.generic_file_path(@generic_file), html: {multipart: true, class: 'form-horizontal'} do |f| %> <%= hidden_field_tag('redirect_tab', 'versions') %>

Upload New Version

Upload a new version of this file from your computer.

<%= file_field_tag "filedata" %>

<%= f.button ' Upload New Version'.html_safe, name: "update_versioning", id: "upload_submit", onclick: "confirmation_needed = false;", class: "btn-primary btn-mini" %>

Restore Previous Version

<% @generic_file.content.versions.each_with_index do |version, index| %>
<% end %>
You must click "Save Revision" to revert a previous version of this file
<%= f.button ' Save Revision'.html_safe, type: 'submit', class: 'btn-primary btn-mini', onclick: "confirmation_needed = false;", name: "revert_submit", id: "revert_submit" %> <% end %>