-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add embargo upload to admin thesis show, remove embargo from student …
…flow, add embargo to submit process step
- Loading branch information
Showing
11 changed files
with
172 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<% primary = false if local_assigns[:primary].nil? %> | ||
<div class="modal fade" id="<%= primary ? 'primary-file' : 'supplemental-embargo-files' %>" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-hidden="true"> | ||
<div class="modal-dialog"> | ||
<div class="modal-content"> | ||
<div class="modal-header"> | ||
<% if primary %> | ||
<h1 class="modal-title fs-5" id="primary-file">Upload Primary File</h1> | ||
<% else %> | ||
<h1 class="modal-title fs-5" id="supplemental-files">Upload Supplementary File</h1> | ||
<% end %> | ||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> | ||
</div> | ||
<%= simple_form_for [@student, @thesis, Document.new], html: { class: "document", multipart: true, id: "new_document_#{primary}" }, authenticity_token: true, remote: true do |f| %> | ||
<div class="modal-body"> | ||
<div class="alert alert-secondary" role="alert"> | ||
<% if primary %> | ||
<p>Your primary file should be in <strong>PDF format.</strong></p> | ||
<% else %> | ||
<% if "#{AppSettings.student_supplementary_embargo_upload_files}" != '' %> | ||
<%= raw(AppSettings.student_supplementary_embargo_upload_files) %> | ||
<% else %> | ||
<p>File size must be limited to acceptable formats include:</p> | ||
<ul> | ||
<li><strong>Documents:</strong> Portable Document Format (.pdf), Text (.txt), Hypertext Markup Language (.html, .htm), Open Document Format (.odt, .odp, .ods).</li> | ||
<li><strong>Images:</strong> Portable Network Graphics format (.png), Tagged Image File format (.tif), JPEG (.jpg)</li> | ||
<li><strong>Data:</strong> Comma-separated values (.csv) or other delimited text, Extensible Markup Language (.xml)</li> | ||
<li><strong>Video:</strong> 8-10 bit uncompressed AVI (.avi)</li> | ||
<li><strong>Audio:</strong> Free Lossless Audio Codec or WAVE (.flac or .wav)</li> | ||
</ul> | ||
<% end %> | ||
<% end %> | ||
</div> | ||
<% f.input :name, required: false, input_html: { class: "span4", autocomplete: "off"} %> | ||
<%= f.input :file, required: true, as: :file %> | ||
<% if primary %> | ||
<%= f.hidden_field :usage, value: :thesis %> | ||
<%= f.hidden_field :supplemental, value: false %> | ||
<% else %> | ||
<%= f.input :usage, label: "Document type", collection: Document.usages.keys.map(&:to_sym).reject { |usage| usage == :licence or usage == :thesis }, required: true, label_html: { class: 'pt-2' } %> | ||
<%= f.hidden_field :supplemental, value: true %> | ||
<% end %> | ||
|
||
</div> | ||
<div class="modal-footer"> | ||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> | ||
<%= f.button :submit, "Upload", class: "btn btn-primary" %> | ||
</div> | ||
<% end %> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.