<%# Copyright © 2012 The Pennsylvania State University Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. %>

Versions

<%= form_for @generic_file, :url => sufia.generic_file_path, :html => {:multipart => true, :class => 'form-horizontal', :id => 'fileupload'} do |f| %> <%= hidden_field_tag('generic_file[terms_of_service]', '1') %> <%= 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 %>