app/views/generic_files/_versioning.html.erb in sufia-5.0.0 vs app/views/generic_files/_versioning.html.erb in sufia-6.0.0.beta1

- old
+ new

@@ -1,9 +1,9 @@ <div id="versioning_display" class="tab-pane"> <h2>Versions</h2> <div class="well"> - <%= form_for @generic_file, url: sufia.generic_file_path(@generic_file), html: {multipart: true, class: 'form-horizontal'} do |f| %> + <%= form_for [sufia, @generic_file], html: { multipart: true } do |f| %> <%= hidden_field_tag('redirect_tab', 'versions') %> <h3>Upload New Version</h3> <div class="form-group"> <div class="col-xs-12"> <p>Upload a new version of this file from your computer.</p> @@ -12,17 +12,17 @@ </p> <%= f.button '<i class="glyphicon glyphicon-upload"></i> Upload New Version'.html_safe, name: "update_versioning", id: "upload_submit", onclick: "confirmation_needed = false;", class: "btn btn-primary" %> </div> </div> <hr /> + <h3>Restore Previous Version</h3> - <% @generic_file.content.versions.each_with_index do |version, index| %> + <% @version_list.each do |version| %> <div class="form-group"> <div class="col-xs-12"> <label class="radio"> - <%= radio_button_tag(:revision, version.versionID, index == 0) %> - <%# label_tag("revision_#{version.versionID}".to_sym, "Restore from #{version.dsCreated.localtime.to_formatted_s(:long_ordinal)} [by #{@generic_file.content.version_committer(version)}]") %> - Restore from <%= version.dsCreateDate.localtime.to_formatted_s(:long_ordinal) %> [by <%= @generic_file.content.version_committer(version) %>] + <%= radio_button_tag(:revision, version.label, version.current?) %> + Restore from <%= version.created %> [by <%= version.committer %>] </label> </div> </div> <% end %> <div id="save_version_note" class="alert hide">You must click &quot;Save Revision&quot; to revert a previous version of this file</div>