Initial commit
This commit is contained in:
33
app/views/videos/_adobe_premiere_fields.html.erb
Normal file
33
app/views/videos/_adobe_premiere_fields.html.erb
Normal file
@@ -0,0 +1,33 @@
|
||||
<% if video.edl_file.attached? %>
|
||||
<div id="current-edl-file" class="offset-md-2 col-md-6 mb-2">
|
||||
<div class="text-muted"><em>Current EDL file</em></div>
|
||||
<%= link_to video.edl_file do %>
|
||||
<%= fa_icon "file-text-o" %> <%= video.edl_file.filename %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<%= form.file_field :edl_file, required: video.new_record?, accept: '.edl', label_class: "required", label: "Video Only EDL", help: "Make sure the EDL features the video track containing all video elements needed for the Production Elements Log. Failure to do so may result in inaccurate and incomplete reporting." %>
|
||||
|
||||
<% if video.graphics_only_edl_file.attached? %>
|
||||
<div id="current-graphics-only-edl-file" class="offset-md-2 col-md-6 mb-2">
|
||||
<div class="text-muted"><em>Current Graphics Only EDL file</em></div>
|
||||
<%= link_to video.graphics_only_edl_file do %>
|
||||
<%= fa_icon "file-text-o" %> <%= video.graphics_only_edl_file.filename %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<%= form.file_field :graphics_only_edl_file, accept: '.edl', label: "Graphics Only EDL", help: "Make sure the EDL features the video track containing all text and graphic elements needed for the Graphics Cue List. Failure to do so may result in inaccurate or incomplete reporting." %>
|
||||
|
||||
<% if video.audio_only_edl_file.attached? %>
|
||||
<div id="current-audio-only-edl-file" class="offset-md-2 col-md-6 mb-2">
|
||||
<div class="text-muted"><em>Current Audio Only EDL file</em></div>
|
||||
<%= link_to video.audio_only_edl_file do %>
|
||||
<%= fa_icon "file-text-o" %> <%= video.audio_only_edl_file.filename %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<%= form.file_field :audio_only_edl_file, required: video.new_record?, accept: '.edl', label_class: "required", label: "Audio Only EDL", help: "Make sure the EDL features the 4 audio tracks containing all the music elements needed for the Music Cue Sheet. Failure to do so may result in inaccurate or incomplete reporting." %>
|
||||
<p class="alert alert-info text-center">
|
||||
If your video project requires additional EDLs,
|
||||
<%= mail_to_for_multiple_edls "click here", video.project %> to email them to the BiG support team.
|
||||
</p>
|
||||
19
app/views/videos/_avid_fields.html.erb
Normal file
19
app/views/videos/_avid_fields.html.erb
Normal file
@@ -0,0 +1,19 @@
|
||||
<% if video.edl_file.attached? %>
|
||||
<div id="current-edl-file" class="mb-2">
|
||||
<div class="text-muted"><em>Current EDL file</em></div>
|
||||
<%= link_to video.edl_file do %>
|
||||
<%= fa_icon "file-text-o" %> <%= video.edl_file.filename %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<%= form.file_field :edl_file, label: "All Tracks EDL file", accept: '.edl', required: video.new_record?, label_class: "required" %>
|
||||
|
||||
<% if video.graphics_only_edl_file.attached? %>
|
||||
<div id="current-graphics-only-edl-file" class="mb-2">
|
||||
<div class="text-muted"><em>Current Graphics Only EDL file</em></div>
|
||||
<%= link_to video.graphics_only_edl_file do %>
|
||||
<%= fa_icon "file-text-o" %> <%= video.graphics_only_edl_file.filename %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<%= form.file_field :graphics_only_edl_file, accept: '.edl', label: "Graphics Only EDL file" %>
|
||||
33
app/views/videos/_form.html.erb
Normal file
33
app/views/videos/_form.html.erb
Normal file
@@ -0,0 +1,33 @@
|
||||
<%= bootstrap_form_with local: true, model: model, id: "video_form" do |form| %>
|
||||
<% if video.new_record? %>
|
||||
<%= form.hidden_field :video_editing_system %>
|
||||
<% end %>
|
||||
<div class="form-row">
|
||||
<%= form.text_field :name, wrapper_class: "col-sm-6" %>
|
||||
<%= form.text_field :number, wrapper_class: "col-sm-6" %>
|
||||
</div>
|
||||
|
||||
<% if video.new_record? %>
|
||||
<%= form.file_field :file, required: true, label_class: "required", data: { direct_upload_url: rails_direct_uploads_url, aws_bucket: ENV['AWS_BUCKET'], aws_access_key_id: ENV['AWS_ACCESS_KEY_ID'], signer_url: multipart_signatures_url } %>
|
||||
<% end %>
|
||||
|
||||
<% if video.adobe_premiere? %>
|
||||
<%= render "videos/adobe_premiere_fields", form: form, video: video %>
|
||||
<% else %>
|
||||
<%= render "videos/avid_fields", form: form, video: video %>
|
||||
<% end %>
|
||||
|
||||
<div class="row align-items-center text-center mt-4">
|
||||
<% if video.new_record? %>
|
||||
<%= link_to t("shared.back"), [:landing, video.project, :videos], class: "col-3 text-reset" %>
|
||||
<div class="col-9">
|
||||
<%= form.button class: "btn btn-success btn-block", id: "video_submit_button", data: { disable_with: fa_icon("spinner spin", text: t("shared.disable_with")) } %>
|
||||
</div>
|
||||
<% else %>
|
||||
<%= link_to t("shared.cancel"), [video.project, :videos], class: "col-3 text-reset" %>
|
||||
<div class="col-9">
|
||||
<%= form.button class: "btn btn-primary btn-block", id: "video_submit_button", data: { disable_with: fa_icon("spinner spin", text: t("shared.disable_with")), confirm: "Warning: Re-uploading the EDLs will restart the reporting process. Expect delays in receiving your reports." } %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
14
app/views/videos/_video.html.erb
Normal file
14
app/views/videos/_video.html.erb
Normal file
@@ -0,0 +1,14 @@
|
||||
<tr>
|
||||
<td><%= time_ago_in_words(video.created_at) %> <%= t "shared.ago" %></td>
|
||||
<td><%= video.name %></td>
|
||||
<td><%= video.number %></td>
|
||||
<td><%= video.file.filename %></td>
|
||||
<td>
|
||||
<%= button_to_release_report video, content: t(".actions.report"), disabled: video.report_unpublished? %>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<% if policy(video).edit? %>
|
||||
<%= link_to t(".actions.edit"), [:edit, video], class: "btn btn-light btn-sm border" %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
7
app/views/videos/edit.html.erb
Normal file
7
app/views/videos/edit.html.erb
Normal file
@@ -0,0 +1,7 @@
|
||||
<div class="card shadow-sm">
|
||||
<%= card_header text: t(".heading"), subtext: t(".subheading"), close_action_path: [@project, :talent_releases] %>
|
||||
<div class="card-body">
|
||||
<%= render "form", video: @video, model: @video %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
40
app/views/videos/index.html.erb
Normal file
40
app/views/videos/index.html.erb
Normal file
@@ -0,0 +1,40 @@
|
||||
<%= product_wordmark :deliver_me, class: "small mb-3" %>
|
||||
|
||||
<div class="d-flex flex-row-reverse justify-content-between align-items-center mb-3">
|
||||
<%= bootstrap_form_with url: [@project, :videos], method: :get, remote: true, layout: :inline, id: "search" do |form| %>
|
||||
<%= form.search_field :query, hide_label: true, placeholder: t("shared.search"), class: "rounded-pill-right", value: params[:query], prepend: form.button(fa_icon("search"), id: "search-button", class: "btn btn-light border rounded-pill-left") %>
|
||||
<% end %>
|
||||
<% if policy(Video).new? %>
|
||||
<%= link_to fa_icon("plus", text: t(".actions.new")), [:landing, @project, :videos], class: "btn btn-primary" %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="border bg-white rounded shadow-sm pb-3 table-responsive">
|
||||
<table class="table table-striped tr-px-4 align-all-middle">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th><%= t(".table_headers.upload_date") %></th>
|
||||
<th><%= Video.human_attribute_name(:name) %></th>
|
||||
<th><%= Video.human_attribute_name(:number) %></th>
|
||||
<th><%= t(".table_headers.file") %></th>
|
||||
<th><%= t(".table_headers.reports") %></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="videos">
|
||||
<% if @videos.any? %>
|
||||
<%= render @videos %>
|
||||
<% else %>
|
||||
<tr>
|
||||
<td colspan="6" class="py-4 text-center text-muted"><%= t(".empty") %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="videos_pagination" class="my-3">
|
||||
<%= will_paginate @videos %>
|
||||
</div>
|
||||
|
||||
<p class="text-center"><%= t(".turnaround_time_message") %></p>
|
||||
2
app/views/videos/index.js.erb
Normal file
2
app/views/videos/index.js.erb
Normal file
@@ -0,0 +1,2 @@
|
||||
$("#videos").html("<%= j render @videos %>");
|
||||
$("#videos_pagination").html("<%= j will_paginate @videos %>");
|
||||
14
app/views/videos/landing.html.erb
Normal file
14
app/views/videos/landing.html.erb
Normal file
@@ -0,0 +1,14 @@
|
||||
<div class="card shadow-sm">
|
||||
<%= card_header text: t(".heading"), subtext: t(".subheading"), close_action_path: [@project, :videos] %>
|
||||
<div class="card-body">
|
||||
<p><%= t(".instructions") %></p>
|
||||
<div class="form-row">
|
||||
<div class="col-sm-6">
|
||||
<%= link_to t(".avid"), new_project_video_path(@project, video_editing_system: "avid"), class: "btn btn-light btn-block border p-4" %>
|
||||
</div>
|
||||
<div class="col-sm-6 mt-2 mt-sm-0">
|
||||
<%= link_to t(".adobe"), new_project_video_path(@project, video_editing_system: "adobe_premiere"), class: "btn btn-light btn-block border p-4" %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
20
app/views/videos/new.html.erb
Normal file
20
app/views/videos/new.html.erb
Normal file
@@ -0,0 +1,20 @@
|
||||
<div class="card shadow-sm">
|
||||
<%= card_header text: t(".heading"), subtext: t(".subheading"), close_action_path: [@project, @video] %>
|
||||
<div class="card-body">
|
||||
<%= errors_summary_for @video %>
|
||||
<%= render "form", video: @video, model: [@project, @video] %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= javascript_tag nonce: true do %>
|
||||
$(document).off("turbolinks:before-visit");
|
||||
$(document).on("turbolinks:before-visit", function() {
|
||||
if ($(".progress-bar").length > 0) {
|
||||
let result = confirm("Leaving this page while uploading will terminate any file uploads. Are you sure you want to leave?");
|
||||
if (result === true) {
|
||||
$(document).off("turbolinks:before-visit");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
});
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user