Sha256: b38722a656f90732e1b8269f1e598c4dab5cbb47d4e16707fc22b94888d3b55f

Contents?: true

Size: 1.77 KB

Versions: 5

Compression:

Stored size: 1.77 KB

Contents

<div id="versioning_display" class="tab-pane">
  <h2 class="non lower">Versions</h2>
  <div class="well">
    <%= 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') %>
    <h3>Upload New Version</h3>
    <p>Upload a new version of this file from your computer.</p>
    <p id="upload_field">
      <%= file_field_tag "filedata"  %>
    </p>
    <%= f.button '<i class="icon-upload-alt"></i> Upload New Version'.html_safe, :name => "update_versioning", :id => "upload_submit", :onclick => "confirmation_needed = false;", :class => "btn-primary btn-mini" %>
    <hr />
    <h3>Restore Previous Version</h3>
    <% @generic_file.content.versions.each_with_index do |version, index| %>
      <div class="control-group">
        <div>
          <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) %>]
          </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>
    <%= f.button '<i class="icon-save"></i> Save Revision'.html_safe, :type => 'submit', :class => 'btn-primary btn-mini', :onclick => "confirmation_needed = false;", :name => "revert_submit", :id => "revert_submit" %>
  <% end %>
  </div> <!-- /well -->
</div> <!-- /row -->

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
sufia-3.7.2 app/views/generic_files/_versioning.html.erb
sufia-3.7.1 app/views/generic_files/_versioning.html.erb
sufia-3.7.0 app/views/generic_files/_versioning.html.erb
sufia-3.6.1 app/views/generic_files/_versioning.html.erb
sufia-3.6.0 app/views/generic_files/_versioning.html.erb