app/views/hyrax/file_sets/_versioning.html.erb in hyrax-3.0.0.pre.rc1 vs app/views/hyrax/file_sets/_versioning.html.erb in hyrax-3.0.0.pre.rc2
- old
+ new
@@ -1,14 +1,53 @@
<div id="versioning_display" class="tab-pane">
<h2><%= t('.header') %></h2>
<%= simple_form_for [main_app, curation_concern], html: { multipart: true, class: 'nav-safety' } do |f| %>
- <%= hidden_field_tag('redirect_tab', 'versions') %>
- <h3><%= t('.upload') %></h3>
- <%= f.input :files, as: :multifile, wrapper: :vertical_file_input, required: true %>
- <%= f.button :button, name: "update_versioning", id: "upload_submit", onclick: "confirmation_needed = false;", class: "btn btn-primary" do %>
- <%= t('.upload') %>
- <% end %>
+ <div id="fileuploadVersioning">
+ <!-- Redirect browsers with JavaScript disabled to the origin page -->
+ <noscript><input type="hidden" name="redirect" value="<%= main_app.root_path %>"/></noscript>
+
+ <%= hidden_field_tag('redirect_tab', 'versions') %>
+
+ <!-- The table listing the files available for upload/download -->
+ <div class="row fileupload-buttonbar">
+
+ <h3><%= t('.upload') %></h3>
+
+ <div class="col-xs-4">
+ <input id="file_set_files" style="display:none;" type="file" name="files[]" single/>
+ <label for="file_set_files" class="btn btn-success fileinput-button"><%= t('.choose_file') %></label>
+ </div>
+
+ <div class="col-xs-8 fileupload-progress versioning-files-progress fade">
+ <!-- The global progress bar -->
+ <div class="progress progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100">
+ <div class="progress-bar progress-bar-success" style="width:0%;"></div>
+ </div>
+ <!-- The extended global progress state -->
+ <div class="progress-extended"> </div>
+ </div> <!-- end col-xs-5 fileupload-progress fade -->
+ </div>
+
+ <div class="row versioning-files-list">
+ <div class="col-xs-12">
+ <div class="container">
+ <div role="presentation" class="table"><span class="files"></span></div>
+ <!-- The global file processing state -->
+ <span class="fileupload-process"></span>
+ </div> <!-- end container -->
+ </div> <!-- end row versioning-files-list -->
+ </div> <!-- end row versioning-files-list -->
+
+ <%= f.button :button,
+ name: "update_versioning",
+ id: "upload_submit",
+ onclick: "confirmation_needed = false;",
+ class: "btn btn-primary" do %>
+ <%= t('.upload') %>
+ <% end %>
+
+ </div> <!-- fileuploadVersioning -->
<% end %>
<%= form_for [main_app, curation_concern],
html: { class: 'edit_file_set_previous_version nav-safety' } do |f| %>
<h3><%= t('.restore') %></h3>
@@ -20,10 +59,17 @@
<%= version.created %> [by <%= version.committer %>]
</label>
</div>
<% end %>
<div id="save_version_note" class="alert hide"><%= t('.save_your_note') %></div>
- <%= f.button :button, name: "revert_submit", id: "revert_submit", onclick: "confirmation_needed = false;", class: "btn btn-primary", type: 'submit' do %>
+ <%= f.button :button, name: "revert_submit",
+ id: "revert_submit",
+ onclick: "confirmation_needed = false;",
+ class: "btn btn-primary",
+ type: 'submit' do %>
<%= t('.save') %>
<% end %>
<% end %>
+
+ <%= render 'hyrax/uploads/js_templates_versioning' %>
+
</div> <!-- /row -->