Initial commit

This commit is contained in:
Senad Uka
2020-05-31 22:38:19 +02:00
commit 858fafc3c5
1280 changed files with 65918 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
<% if acquired_media_file_infos.any? %>
<% acquired_media_file_infos.each do |file_info| %>
<li class="acquired-media-releasable list-inline-item" data-ujs-target="<%= dom_id(file_info.releasable, dom_id(file_info)) %>" data-hidden="false">
<%= render "video_analyses/file_info_releasable", releasable: file_info.releasable, video: video, file_info: file_info %>
</li>
<% end %>
<% else %>
<li class="acquired-media-releasable list-inline-item" data-confirmed="false" data-hidden="false">
<figure class="figure mb-0">
<div class="figure-img border text-muted d-flex justify-content-center align-items-center" style="width:200px;height:200px;">
<small>No File Uploaded</small>
</div>
<figcaption class="figure-caption text-center">No releases found</figcaption>
</figure>
</li>
<% end %>

View File

@@ -0,0 +1,18 @@
<% if acquired_media_release.file_infos.any? %>
<% acquired_media_release.file_infos.each do |file_info| %>
<li class="acquired-media-releasable list-inline-item" data-ujs-target="<%= dom_id(acquired_media_release, "file_info_#{file_info.id}") %>" data-confirmed="<%= video.has_confirmed_release?(acquired_media_release) && video.video_release_confirmations.any? { |video_release_confirmation| video_release_confirmation.file_info_id == file_info.id } %>" data-hidden="false">
<%= render "video_analyses/file_info_releasable", releasable: acquired_media_release, video: video, file_info: file_info %>
</li>
<% end %>
<% else %>
<li class="acquired-media-releasable list-inline-item" data-confirmed="false" data-hidden="false">
<figure class="figure mb-0">
<div class="figure-img border text-muted d-flex justify-content-center align-items-center" style="width:200px;height:200px;">
<small>No File Uploaded</small>
</div>
<figcaption class="figure-caption text-center"><%= truncate acquired_media_release.name, length: 25 %></figcaption>
</figure>
</li>
<% end %>

View File

@@ -0,0 +1,33 @@
<div class="d-md-flex flex-row justify-content-between">
<div>
<div class="d-inline-block">
<%= button_to [:new, video, :bookmark], class: "btn btn-sm btn-primary", data: { toggle: "tooltip", disable_with: fa_icon("spinner spin") }, form: { data: { ujs_target: "bookmark-form" } }, params: { bookmark: { time_elapsed: "" } }, method: :get, remote: true, title: t(".create_bookmark") do %>
<%= fa_icon "bookmark" %>
<% end %>
</div>
<div class="d-inline-block">
<%= button_to new_video_video_analyses_unreleased_appearance_path(video), class: "btn btn-sm btn-danger", data: { toggle: "tooltip", disable_with: fa_icon("spinner spin") }, form: { data: { ujs_target: "unreleased-appearance-form" } }, params: { unreleased_appearance: { time_elapsed: "" } }, method: :get, remote: true, title: t(".create_unreleased_appearance") do %>
<%= fa_icon "warning" %>
<% end %>
</div>
<div class="d-inline-block">
<%= button_to new_video_video_analyses_graphics_element_path(video), class: "btn btn-sm btn-primary", data: { toggle: "tooltip", disable_with: fa_icon("spinner spin") }, form: { data: { ujs_target: "graphics-element-form" } }, params: { graphics_element: { text: "", time_elapsed: "", edl_type: "all_tracks" } }, method: :get, remote: true, title: t(".create_graphics_element") do %>
<%= fa_icon "picture-o" %>
<% end %>
</div>
<div class="d-inline-block">
<%= button_to new_video_video_analyses_audio_confirmation_path(video), class: "btn btn-sm btn-primary", data: { toggle: "tooltip", disable_with: fa_icon("spinner spin") }, form: { data: { ujs_target: "audio-confirmation-form" } }, params: { audio_confirmation: { confirmation_type: "library_music", time_elapsed: "", edl_type: "all_tracks" } }, method: :get, remote: true, title: "Add to Music Cue Sheet" do %>
<%= fa_icon "music" %>
<% end %>
</div>
<div class="d-inline-block">
<%= button_to video_video_analyses_edl_events_path(video), class: "btn btn-sm btn-primary", data: { toggle: "tooltip", disable_with: fa_icon("spinner spin") }, form: { data: { ujs_target: "edl-event-form" } }, params: { edl_event: { time_elapsed: "" } }, remote: true, title: t(".create_edl_event") do %>
<%= fa_icon "info-circle" %>
<% end %>
</div>
</div>
<div class="text-md-right mt-2 mt-md-0">
<%= text_field_tag "seek", "", id: "seek_input", class: "col-6 d-inline-block form-control form-control-sm", placeholder: "00:00:00:00" %>
<%= button_tag "Seek", id: "seek_button", class: "d-inline-block btn btn-sm btn-primary" %>
</div>
</div>

View File

@@ -0,0 +1,3 @@
<li class="releasable list-inline-item hidden-when-confirmed" id="<%= dom_id(appearance_release) %>" data-confirmed="<%= video.confirmed_appearance_releases.include?(appearance_release) %>" data-hidden="<%= video.confirmed_appearance_releases.include?(appearance_release) %>">
<%= render "video_analyses/releasable", releasable: appearance_release, video: video %>
</li>

View File

@@ -0,0 +1,36 @@
<% if audio_confirmations.any? %>
<div class="table-responsive">
<table class="table-striped table-sm w-100" style="table-layout: fixed;">
<thead>
<tr>
<th style="width: 5%;"></th>
<th style="">EDL #</th>
<th style="">EDL TC</th>
<th style="">VID TC</th>
<th style="">Filename</th>
<th style="width: 10%;"></th>
</tr>
</thead>
<tbody>
<% audio_confirmations.each do |audio_confirmation| %>
<tr data-audio-id="<%= audio_confirmation.id %>">
<td></td>
<td></td>
<td><%= audio_confirmation.timecode_in %></td>
<td><a data-behavior="seekable-timecode"><%= audio_confirmation.appears_at %></a></td>
<td><%= audio_confirmation.source_file_name %></td>
<td>
<%= link_to fa_icon("trash fw"), audio_confirmation_path(audio_confirmation), method: :delete, class: "btn btn-danger btn-sm", remote: true %>
</td>
</tr>
<% end %>
</tbody>
</table>
</div>
<% else %>
<div class="card-body">
<div class="text-center text-muted py-2">
Music Releases that have been added to the report will appear here
</div>
</div>
<% end %>

View File

@@ -0,0 +1,8 @@
<%= button_to_video_release_confirmation video, releasable, additional_video_release_params: { file_info_id: file_info.id } do %>
<figure class="figure mb-0">
<div class="figure-img border text-muted d-flex justify-content-center align-items-center text-wrap text-break" style="width:200px;height:200px;">
<%= file_info.filename %>
</div>
<figcaption class="figure-caption text-center"><%= truncate releasable.name, length: 25 %></figcaption>
</figure>
<% end %>

View File

@@ -0,0 +1,37 @@
<% if graphics_elements.any? %>
<div class="table-responsive">
<table class="table-striped table-sm w-100" style="table-layout: fixed;">
<thead>
<tr>
<th style="width: 5%;"></th>
<th style="">EDL #</th>
<th style="">EDL TC</th>
<th style="">VID TC</th>
<th style="">Filename</th>
<th style="width: 15%;"></th>
</tr>
</thead>
<tbody class="graphics-elements ">
<% graphics_elements.each do |graphics_element| %>
<tr class="graphics-element">
<td></td>
<td></td>
<td><%= graphics_element.timecode_in %></td>
<td><a data-behavior="seekable-timecode"><%= graphics_element.appears_at %></a></td>
<td><%= graphics_element.source_file_name %></td>
<td>
<%= link_to fa_icon("pencil fw"), [:edit, graphics_element], method: :get, class: "btn btn-primary btn-sm", remote: true, data: { disable_with: fa_icon("spinner spin", text: "Edit") } %>
<%= link_to fa_icon("trash fw"), graphics_element, method: :delete, class: "btn btn-danger btn-sm", remote: true %>
</td>
</tr>
<% end %>
</tbody>
</table>
</div>
<% else %>
<div class="card-body">
<div class="text-center text-muted py-2">
GFX Cue Elements that have been added to the report will appear here
</div>
</div>
<% end %>

View File

@@ -0,0 +1,49 @@
<div class="mt-1">
<%= link_to "#keyboard_shortcuts", data: { toggle: "collapse" } do %>
<%= fa_icon "info-circle" %> View Keyboard Shortcuts
<% end %>
</div>
<div class="collapse" id="keyboard_shortcuts">
<ul class="list-group">
<li class="list-group-item">
<div class="d-flex flex-row justify-content-between">
<div>
<%= fa_icon "play" %> <%= fa_icon "stop" %>
</div>
<div class="ml-5">
<span class="keyboard-key">space</span>
</div>
</div>
</li>
<li class="list-group-item">
<div class="d-flex flex-row justify-content-between">
<div>
<%= fa_icon "step-backward" %> <small>Back 5s</small>
</div>
<div class="ml-5">
<span class="keyboard-key">&#8592;</span>
</div>
</div>
</li>
<li class="list-group-item">
<div class="d-flex flex-row justify-content-between">
<div>
<%= fa_icon "step-forward" %> <small>Forward 5s</small>
</div>
<div class="ml-5">
<span class="keyboard-key">&#8594;</span>
</div>
</div>
</li>
<li class="list-group-item">
<div class="d-flex flex-row justify-content-between">
<div>
<%= fa_icon "trash" %> <small>Delete Marker</small>
</div>
<div class="ml-5">
<span class="keyboard-key">d</span>
</div>
</div>
</li>
</ul>
</div>

View File

@@ -0,0 +1,3 @@
<li class="releasable list-inline-item hidden-when-confirmed" id="<%= dom_id(location_release) %>" data-confirmed="<%= video.confirmed_location_releases.include?(location_release) %>" data-hidden="<%= video.confirmed_location_releases.include?(location_release) %>">
<%= render "video_analyses/releasable", releasable: location_release, video: video %>
</li>

View File

@@ -0,0 +1,3 @@
<li class="releasable list-inline-item hidden-when-confirmed" id="<%= dom_id(material_release) %>" data-confirmed="<%= video.confirmed_material_releases.include?(material_release) %>" data-hidden="<%= video.confirmed_material_releases.include?(material_release) %>">
<%= render "video_analyses/releasable", releasable: material_release, video: video %>
</li>

View File

@@ -0,0 +1,30 @@
<% if music_release.file_infos.any? %>
<% music_release.file_infos.each do |file_info| %>
<li class="music-releasable list-inline-item" id="<%= dom_id(music_release, dom_id(file_info)) %>" data-confirmed="<%= video.audio_confirmations.any? { |audio_confirmation| audio_confirmation.source_file_name == file_info.filename } %>" data-hidden="false">
<%= button_to new_video_video_analyses_audio_confirmation_path(video),
class: "btn-no-style border cursor-copy p-2",
form: { data: { ujs_target: "audio-confirmation-form" } },
params: { audio_confirmation: { confirmation_type: "original_music", time_elapsed: "", composer_info: music_release.composer_info, publisher_info: music_release.publisher_info, catalog: "", title: "", edl_type: video.audio_only_edl_file.attached? ? "audio" : "all_tracks" }, matched_file_name: file_info.filename },
method: :get,
remote: true do %>
<figure class="figure mb-0">
<div class="figure-img border text-muted d-flex justify-content-center align-items-center text-wrap text-break" style="width:200px;height:200px;">
<%= file_info.filename %>
</div>
<figcaption class="figure-caption text-center"><%= truncate music_release.name, length: 25 %></figcaption>
</figure>
<% end %>
</li>
<% end %>
<% else %>
<li class="music-releasable list-inline-item" data-confirmed="false" data-hidden="false">
<figure class="figure mb-0">
<div class="figure-img border text-muted d-flex justify-content-center align-items-center" style="width:200px;height:200px;">
<small>No File Uploaded</small>
</div>
<figcaption class="figure-caption text-center"><%= truncate music_release.name, length: 25 %></figcaption>
</figure>
</li>
<% end %>

View File

@@ -0,0 +1,30 @@
<% if music_release_file_infos.any? %>
<% music_release_file_infos.each do |file_info| %>
<li class="music-releasable list-inline-item" id="<%= dom_id(file_info.releasable, dom_id(file_info)) %>" data-confirmed="<%= video.audio_confirmations.any? { |audio_confirmation| audio_confirmation.source_file_name == file_info.filename } %>" data-hidden="false">
<%= button_to new_video_video_analyses_audio_confirmation_path(video),
class: "btn-no-style border cursor-copy p-2",
form: { data: { ujs_target: "audio-confirmation-form" } },
params: { audio_confirmation: { confirmation_type: "original_music", time_elapsed: "", composer_info: file_info.releasable.composer_info, publisher_info: file_info.releasable.publisher_info, catalog: "", title: "", edl_type: video.audio_only_edl_file.attached? ? "audio" : "all_tracks" }, matched_file_name: file_info.filename },
method: :get,
remote: true do %>
<figure class="figure mb-0">
<div class="figure-img border text-muted d-flex justify-content-center align-items-center text-wrap text-break" style="width:200px;height:200px;">
<%= file_info.filename %>
</div>
<figcaption class="figure-caption text-center"><%= truncate file_info.releasable.name, length: 25 %></figcaption>
</figure>
<% end %>
</li>
<% end %>
<% else %>
<li class="music-releasable list-inline-item" data-confirmed="false" data-hidden="false">
<figure class="figure mb-0">
<div class="figure-img border text-muted d-flex justify-content-center align-items-center" style="width:200px;height:200px;">
<small>No File Uploaded</small>
</div>
<figcaption class="figure-caption text-center">No releases found</figcaption>
</figure>
</li>
<% end %>

View File

@@ -0,0 +1,20 @@
<%= button_to_video_release_confirmation video, releasable do %>
<figure class="figure mb-0">
<% if releasable.photos.size > 1 %>
<%= carousel_for releasable.photos, indicators: false, class: "carousel-bg-black" do |photo| %>
<%= image_tag large_variant(photo), class: "figure-img img-fluid d-block w-100" %>
<% end %>
<% elsif releasable.photos.size == 1 %>
<%= image_tag large_variant(releasable.photo), class: "img-fluid figure-img" %>
<% else %>
<div class="figure-img border text-muted d-flex justify-content-center align-items-center" style="width:200px;height:200px;">
<small>No Photo</small>
</div>
<% end %>
<figcaption class="figure-caption text-center"><%= truncate releasable.name, length: 25 %></figcaption>
</figure>
<% end %>

View File

@@ -0,0 +1,7 @@
<% if releasables.any? %>
<% releasables.each do |releasable| %>
<%= render "video_analyses/#{releasable.class.to_s.underscore}", releasable.class.to_s.underscore.to_sym => releasable, video: video %>
<% end %>
<% else %>
<li class="border p-5 text-center text-muted">There are no releases.</li>
<% end %>

View File

@@ -0,0 +1,18 @@
<p class="alert alert-info"><%= edl_events_data[:info_message] %></p>
<% if edl_events_data[:edl_events].any? %>
<div class="text-right">
<%= link_to "Show/Hide EDL Events", "javascript:void(0)", class: "btn btn-sm btn-primary mb-1", data: { toggle: "collapse", target: "#edl_events" } %>
</div>
<ul id="edl_events" class="list-group my-2 small collapse">
<% edl_events_data[:edl_events].each do |edl_event| %>
<li class="list-group-item" data-behavior="fillable-fields" data-target="#<%= model_name %>_fields">
<dl class="row mb-0">
<% edl_event.public_attributes.each do |name, value| %>
<dt class="col-sm-5"><%= name.to_s.titleize %></dt>
<dd class="col-sm-7 text-wrap text-break" data-fillable-field="<%= model_name %>[<%= name %>]"><%= value %></dd>
<% end %>
</dl>
</li>
<% end %>
</ul>
<% end %>

View File

@@ -0,0 +1,3 @@
<li class="releasable list-inline-item hidden-when-confirmed" id="<%= dom_id(talent_release) %>" data-confirmed="<%= video.confirmed_talent_releases.include?(talent_release) %>" data-hidden="<%= video.confirmed_talent_releases.include?(talent_release) %>">
<%= render "video_analyses/releasable", releasable: talent_release, video: video %>
</li>

View File

@@ -0,0 +1,35 @@
<% if unreleased_appearances.any? %>
<div class="table-responsive">
<table class="table-striped table-sm w-100">
<thead>
<tr>
<th>Notes</th>
<th>Channel</th>
<th>EDL TC</th>
<th>Video TC</th>
<th></th>
</tr>
</thead>
<tbody>
<% unreleased_appearances.each do |unreleased_appearance| %>
<tr>
<td style="width: 40%;"><%= unreleased_appearance.note_text %></td>
<td><%= unreleased_appearance.channel %></td>
<td><%= unreleased_appearance.timecode_in %></td>
<td><a data-behavior="seekable-timecode"><%= unreleased_appearance.appears_at %></a></td>
<td style="width: 30%;">
<%= link_to fa_icon("pencil fw", text: "Edit"), [:edit, unreleased_appearance], method: :get, class: "btn btn-primary btn-sm", remote: true, data: { disable_with: fa_icon("spinner spin", text: "Edit") } %>
<%= link_to fa_icon("trash fw"), unreleased_appearance, method: :delete, class: "btn btn-danger btn-sm", remote: true %>
</td>
</tr>
<% end %>
</tbody>
</table>
</div>
<% else %>
<div class="card-body">
<div class="text-center text-muted py-2">
Issues and Concerns that have been added to the report will appear here
</div>
</div>
<% end %>

View File

@@ -0,0 +1,50 @@
<% if video_release_confirmations.any? %>
<div class="table-responsive">
<table class="table-striped table-sm w-100" style="table-layout: fixed;">
<thead>
<tr>
<th style="width: 5%;"></th>
<th style="">EDL #</th>
<th style="">EDL TC</th>
<th style="">VID TC</th>
<th style="">Name</th>
<th style="">Photo</th>
<th style="width: 10%;"></th>
</tr>
</thead>
<tbody>
<% video_release_confirmations.group_by(&:releasable_type).each do |group, confirmations| %>
<% confirmations.sort_by(&:appears_at).each do |confirmation| %>
<tr id="<%= dom_id(confirmation) %>" data-releasable-id="<%= confirmation.releasable_id %>">
<td></td>
<td></td>
<td><%= confirmation.timecode_in %></td>
<td><a data-behavior="seekable-timecode"><%= confirmation.appears_at %></a></td>
<td><%= confirmation.releasable.name %></td>
<td>
<% if confirmation.file_info.present? %>
<%= confirmation.file_info.filename %></div>
<% elsif confirmation.releasable.respond_to?(:photo) && confirmation.releasable.photo.attached? %>
<%= image_tag thumbnail_variant(confirmation.releasable.photo), class: "img-fluid figure-img" %>
<% else %>
No Photo
<% end %>
</td>
<td>
<%= link_to polymorphic_path([confirmation.video, confirmation.releasable, confirmation]), class: "btn btn-danger btn-sm", data: { toggle: "tooltip", template: tooltip_template(css_class: "tooltip-danger") }, method: :delete, remote: true do %>
<%= fa_icon("trash fw") %>
<% end %>
</td>
</tr>
<% end %>
<% end %>
</tbody>
</table>
</div>
<% else %>
<div class="card-body">
<div class="text-center text-muted py-2">
Releases that have been added to the report will appear here
</div>
</div>
<% end %>

View File

@@ -0,0 +1,13 @@
<% # TODO: Is there a way to consolidate this with the main template? %>
<% if video.analysis_pending? %>
<div class="p-3 text-center text-muted">
<%= fa_icon "cog spin" %> Video is still being analyzed
</div>
<% else %>
<div class="border p-3 text-center text-muted">
<p>Video analysis has completed!</p>
<%= link_to "", class: "btn btn-sm btn-success" do %>
<%= fa_icon "refresh" %> Refresh
<% end %>
</div>
<% end %>

View File

@@ -0,0 +1,8 @@
// Hide any open toolitps before removing elements from the DOM
$("#acquired_media_releases [data-toggle=tooltip]").tooltip("dispose");
// Update the release list
$("#acquired_media_releases").html("<%= j render("video_analyses/acquired_media_file_infos", acquired_media_file_infos: @acquired_media_file_infos, video: @video) %>");
// # Reset the search form
$("#acquired_media_releases_section form input[name='query']").val("<%= params[:query] %>");

View File

@@ -0,0 +1,8 @@
// Hide any open toolitps before removing elements from the DOM
$("#appearance_releases [data-toggle=tooltip]").tooltip("dispose");
// Update the release list
$("#appearance_releases").html("<%= j render("video_analyses/releasables", releasables: @appearance_releases, video: @video) %>");
// # Reset the search form
$("#appearance_releases_section form input[name='query']").val("<%= params[:query] %>");

View File

@@ -0,0 +1,47 @@
<%= content_tag :div, class: "modal modal-right", id: "new_audio_confirmation_modal", aria: { labelledby: "modalLabel", hidden: true }, role: "dialog", tabindex: -1 do %>
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="modalLabel">Confirm Audio</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<%= bootstrap_form_with model: [audio_confirmation.video, "video_analyses", audio_confirmation], layout: :horizontal, label_col: "col-3", control_col: "col-9" do |form| %>
<div class="modal-body">
<%= render "video_analyses/show_hide_edl_events", edl_events_data: @edl_events_data, model_name: "audio_confirmation" %>
<div id="audio_confirmation_fields">
<%= form.hidden_field :time_elapsed, value: audio_confirmation.time_elapsed %>
<%= form.hidden_field :confirmation_type, value: audio_confirmation.confirmation_type %>
<%= form.hidden_field :composer_info, value: audio_confirmation.composer_info %>
<%= form.hidden_field :publisher_info, value: audio_confirmation.publisher_info %>
<%= form.hidden_field :catalog, value: audio_confirmation.catalog %>
<%= form.static_control nil, name: nil, label: "Source EDL", value: audio_confirmation.edl_type.to_s.titleize %>
<%= form.static_control nil, name: nil, label: "Origin", value: audio_confirmation.confirmation_type.to_s.titleize %>
<%= form.static_control nil, name: nil, label: "Video Timecode", value: audio_confirmation.appears_at %>
<%= form.static_control nil, name: nil, label: "Composer", value: audio_confirmation.composer_info %>
<%= form.static_control nil, name: nil, label: "Publisher", value: audio_confirmation.publisher_info %>
<%= form.static_control nil, name: nil, label: "Catalog", value: audio_confirmation.catalog %>
<%= form.text_area nil, name: nil, label: "Matched Filename", value: matched_file_name, id: "matched_file_name", readonly: true if matched_file_name.present? %>
<%= form.select :music_type, ["Instrumental", "Vocal"] %>
<%= form.select :music_category, ["Background", "Feature", "Theme"] %>
<%= form.text_field :title %>
<%= form.text_field :channel %>
<%= form.text_field :timecode_in %>
<%= form.text_field :timecode_out %>
<%= form.text_field :duration %>
<%= form.text_field :source_file_name %>
<%= form.text_field :clip_name %>
<%= form.text_field :description %>
</div>
</div>
<div class="modal-footer">
<%= form.button "Close", class: "btn btn-secondary", data: { dismiss: "modal" } %>
<%= form.submit "Confirm Audio", class: "btn btn-primary", data: { disable_with: t("shared.disable_with") } %>
</div>
<% end %>
</div>
</div>
<% end %>

View File

@@ -0,0 +1,12 @@
<% if @audio_confirmation_data.is_valid %>
$("#audio_confirmations").html("<%= j render("video_analyses/audio_confirmations", audio_confirmations: @audio_confirmations_data.audio_confirmations) %>");
<% if @audio_confirmation_data.should_toggle_checkmark %>
$('#audio_matches .releasable-match').has('td:contains("<%= @audio_confirmation_data.presented_source_file_name %>")').has('td:contains("<%= @audio_confirmation_data.timecode_in %>")').attr("data-confirmed", true).data("confirmed", true)
$('#music_releases .music-releasable').has('figure:contains("<%= @audio_confirmation_data.source_file_name %>")').attr("data-confirmed", true).data("confirmed", true)
<% end %>
$("#new_audio_confirmation_modal").modal("toggle");
$('.modal-backdrop').remove();
<% else %>
<% end %>

View File

@@ -0,0 +1,3 @@
$("#audio_confirmations").html("<%= j render("video_analyses/audio_confirmations", audio_confirmations: @audio_confirmations_data.audio_confirmations) %>");
$('#audio_matches .releasable-match').has('td:contains("<%= @audio_confirmation_data.presented_source_file_name %>")').has('td:contains("<%= @audio_confirmation_data.timecode_in %>")').attr("data-confirmed", false).data("confirmed", false)
$('#music_releases .music-releasable').has('figure:contains("<%= @audio_confirmation_data.source_file_name %>")').attr("data-confirmed", false).data("confirmed", false)

View File

@@ -0,0 +1,5 @@
$("[data-toggle=tooltip]").tooltip("dispose");
$("#new_audio_confirmation_modal").remove();
$("body").append("<%= j render('new_audio_confirmation_modal', audio_confirmation: @audio_confirmation, matched_file_name: @matched_file_name) %>");
$("#new_audio_confirmation_modal").modal("toggle");

View File

@@ -0,0 +1,32 @@
<%= content_tag :div, class: "modal modal-right", id: "edl_event_modal", aria: { labelledby: "modalLabel", hidden: true }, role: "dialog", tabindex: -1 do %>
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="modalLabel">EDL Event(s) for <%= @timecode %></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p class="alert alert-info"><%= @info_message %></p>
<ul id="edl_events" class="list-group my-2 small">
<% @edl_events.each do |edl_event| %>
<li class="list-group-item">
<dl class="row mb-0">
<% edl_event.attributes.each do |name, value| %>
<dt class="col-sm-5"><%= name.to_s.titleize %></dt>
<dd class="col-sm-7 text-break"><%= value %></dd>
<% end %>
</dl>
</li>
<% end %>
</ul>
</div>
<div class="modal-footer">
<%= button_tag "Close", class: "btn btn-secondary", data: { dismiss: "modal" } %>
</div>
</div>
</div>
<% end %>

View File

@@ -0,0 +1,7 @@
$("[data-toggle=tooltip]").tooltip("dispose");
<% # Remove the modal if it already exists %>
$("#edl_event_modal").remove();
<% # Create and show the modal %>
$("body").append("<%= j render('edl_event_modal', edl_events: @edl_events) %>");
$("#edl_event_modal").modal("toggle");

View File

@@ -0,0 +1,38 @@
<%= content_tag :div, class: "modal modal-right", id: "edit_graphics_element_modal", aria: { labelledby: "modalLabel", hidden: true }, role: "dialog", tabindex: -1 do %>
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="modalLabel">Update GFX Cue Element</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<%= bootstrap_form_with model: graphics_element, url: [graphics_element, {video_id: graphics_element.video}], layout: :horizontal, label_col: "col-3", control_col: "col-9" do |form| %>
<div class="modal-body">
<%= render "video_analyses/show_hide_edl_events", edl_events_data: @edl_events_data, model_name: "graphics_element" %>
<div id="graphics_element_fields">
<%= form.hidden_field :edl_type, value: graphics_element.edl_type %>
<%= form.hidden_field :time_elapsed, value: graphics_element.time_elapsed %>
<%= form.static_control nil, name: nil, label: "Source EDL ", value: graphics_element.edl_type.to_s.titleize %>
<%= form.static_control nil, name: nil, label: "Video Timecode", value: graphics_element.appears_at %>
<%= form.select :graphic_type, options_for_graphic_types_select, { include_blank: true }, class: "custom-select" %>
<%= form.text_field :text %>
<%= form.text_field :channel %>
<%= form.text_field :timecode_in %>
<%= form.text_field :timecode_out %>
<%= form.text_field :duration %>
<%= form.text_field :source_file_name %>
<%= form.text_field :clip_name %>
<%= form.text_field :description %>
</div>
</div>
<div class="modal-footer">
<%= form.button "Close", class: "btn btn-secondary", data: { dismiss: "modal" } %>
<%= form.submit "Update GFX Element", class: "btn btn-primary", data: { disable_with: t("shared.disable_with") } %>
</div>
<% end %>
</div>
</div>
<% end %>

View File

@@ -0,0 +1,39 @@
<%= content_tag :div, class: "modal modal-right", id: "new_graphics_element_modal", aria: { labelledby: "modalLabel", hidden: true }, role: "dialog", tabindex: -1 do %>
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="modalLabel">New GFX Cue Element</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<%= bootstrap_form_with model: [graphics_element.video, "video_analyses", graphics_element], layout: :horizontal, label_col: "col-3", control_col: "col-9" do |form| %>
<div class="modal-body">
<%= render "video_analyses/show_hide_edl_events", edl_events_data: @edl_events_data, model_name: "graphics_element" %>
<div id="graphics_element_fields">
<%= form.hidden_field :edl_type, value: graphics_element.edl_type %>
<%= form.hidden_field :time_elapsed, value: graphics_element.time_elapsed %>
<%= form.static_control nil, name: nil, label: "Source EDL ", value: graphics_element.edl_type.to_s.titleize %>
<%= form.static_control nil, name: nil, label: "Video Timecode", value: graphics_element.appears_at %>
<%= form.text_area nil, name: nil, label: "Matched Filename", value: matched_file_name, id: "matched_file_name", readonly: true if matched_file_name.present? %>
<%= form.select :graphic_type, options_for_graphic_types_select, { include_blank: true }, class: "custom-select" %>
<%= form.text_field :text %>
<%= form.text_field :channel %>
<%= form.text_field :timecode_in %>
<%= form.text_field :timecode_out %>
<%= form.text_field :duration %>
<%= form.text_field :source_file_name %>
<%= form.text_field :clip_name %>
<%= form.text_field :description %>
</div>
</div>
<div class="modal-footer">
<%= form.button "Close", class: "btn btn-secondary", data: { dismiss: "modal" } %>
<%= form.submit "Create GFX Element", class: "btn btn-primary", data: { disable_with: t("shared.disable_with") } %>
</div>
<% end %>
</div>
</div>
<% end %>

View File

@@ -0,0 +1,10 @@
<% if @graphics_element_data.is_valid %>
$("#graphics_elements_list").html("<%= j render("video_analyses/graphics_elements", graphics_elements: @graphics_elements_data.graphics_elements) %>");
<% if @graphics_element_data.should_toggle_checkmark %>
$('.graphics-match').has('td:contains("<%= @graphics_element_data.source_file_name %>")').has('td:contains("<%= @graphics_element_data.timecode_in %>")').attr("data-confirmed", true).data("confirmed", true)
<% end %>
$("#new_graphics_element_modal").modal("toggle");
<% else %>
<% end %>

View File

@@ -0,0 +1,2 @@
$("#graphics_elements_list").html("<%= j render("video_analyses/graphics_elements", graphics_elements: @graphics_elements_data.graphics_elements) %>");
$('.graphics-match').has('td:contains("<%= @graphics_element_data.source_file_name %>")').has('td:contains("<%= @graphics_element_data.timecode_in %>")').attr("data-confirmed", false).data("confirmed", false)

View File

@@ -0,0 +1,4 @@
$("#edit_graphics_element_modal").remove();
$("body").append("<%= j render('edit_graphics_element_modal', graphics_element: @graphics_element) %>");
$("#edit_graphics_element_modal").modal("toggle");

View File

@@ -0,0 +1,5 @@
$("[data-toggle=tooltip]").tooltip("dispose");
$("#new_graphics_element_modal").remove();
$("body").append("<%= j render('new_graphics_element_modal', graphics_element: @graphics_element, matched_file_name: @matched_file_name) %>");
$("#new_graphics_element_modal").modal("toggle");

View File

@@ -0,0 +1,10 @@
<% if @graphics_element_data.is_valid %>
$("#graphics_elements_list").html("<%= j render("video_analyses/graphics_elements", graphics_elements: @graphics_elements_data.graphics_elements) %>");
<% if @graphics_element_data.should_toggle_checkmark %>
$('.graphics-match').has('span:contains("<%= @graphics_element_data.source_file_name %>")').has('span:contains("<%= @graphics_element_data.timecode_in %>")').attr("data-confirmed", true).data("confirmed", true)
<% end %>
$("#edit_graphics_element_modal").modal("toggle");
<% else %>
<% end %>

View File

@@ -0,0 +1,8 @@
// Hide any open toolitps before removing elements from the DOM
$("#location_releases [data-toggle=tooltip]").tooltip("dispose");
// Update the release list
$("#location_releases").html("<%= j render("video_analyses/releasables", releasables: @location_releases, video: @video) %>");
// # Reset the search form
$("#location_releases_section form input[name='query']").val("<%= params[:query] %>");

View File

@@ -0,0 +1,8 @@
// Hide any open toolitps before removing elements from the DOM
$("#material_releases [data-toggle=tooltip]").tooltip("dispose");
// Update the release list
$("#material_releases").html("<%= j render("video_analyses/releasables", releasables: @material_releases, video: @video) %>");
// # Reset the search form
$("#material_releases_section form input[name='query']").val("<%= params[:query] %>");

View File

@@ -0,0 +1,8 @@
// Hide any open toolitps before removing elements from the DOM
$("#music_releases [data-toggle=tooltip]").tooltip("dispose");
// Update the release list
$("#music_releases").html("<%= j render("video_analyses/music_release_file_infos", music_release_file_infos: @music_release_file_infos, video: @video) %>");
// # Reset the search form
$("#music_releases_section form input[name='query']").val("<%= params[:query] %>");

View File

@@ -0,0 +1,555 @@
<%= content_for :meta do %>
<meta name="project-id" content="<%= @video.project_id %>">
<% end %>
<main class="p-3" style="flex:2">
<div class="text-right">
<div>
<% if @video.report_published? %>
<%= link_to fa_icon("file-text", text: "Unpublish"), [@video, :report_publications], method: :delete, class: "btn btn-danger btn-sm" %>
<% else %>
<%= link_to fa_icon("file-text", text: "Publish"), [@video, :report_publications], method: :post, class: "btn btn-primary btn-sm" %>
<% end %>
<%= button_to_release_report @video, content: fa_icon("print", text: t(".actions.create_release_report")) %>
</div>
</div>
<% if @video_analysis_presenter.stale? %>
<div class="alert alert-warning">
<%= fa_icon "warning" %> Contracts have been added or imported since this video file has been uploaded. You
must <%= link_to "re-analyze this video", [@video, :video_analyses], method: :post %> otherwise the new contracts
will not be included in the analysis.
</div>
<% end %>
<div class="row no-gutters">
<div class="col-lg-6 mb-2">
<div class="card col-lg-12 p-0">
<div class="card-header d-flex flex-row justify-content-between align-items-center">
<h5 class="d-inline-block"> <%= @video.name ? @video.name : @video.filename %> (<%= @video.project.name %>)</h5>
<div class="btn-group">
<%= button_tag fa_icon("download", text: "EDLs"), class: "btn btn-primary btn-sm dropdown-toggle border", data: { toggle: "dropdown", boundary: "window" }, aria: { haspopup: true, expanded: false } %>
<div class="dropdown-menu dropdown-menu-right">
<%= link_to_edl_file_download @video %>
<%= link_to_graphics_only_edl_file_download @video %>
<%= link_to_audio_only_edl_file_download @video %>
</div>
</div>
</div>
<div class="card-body">
<%= video_tag @video_analysis_presenter.video_url, data: { behavior: "video-player-with-analysis", video_id: @video.id } %>
<div class="mt-2">
<%= render "video_analyses/actions", video: @video %>
<%= render "video_analyses/keyboard_shortcuts" %>
</div>
</div>
</div>
<div class="card col-lg-12 p-0">
<div class="card-header">
<div>
<h5>EDL Events</h5>
</div>
</div>
<div class="d-flex justify-content-end p-3">
<div class="input-group w-25">
<%= text_field_tag "go_to", "", id: "go_to", class: "form-control form-control-sm", placeholder: "00:00:00:00" %>
<div class="input-group-append">
<%= button_tag "Go", id: "go_button", class: "btn btn-primary btn-sm" %>
</div>
</div>
</div>
<div class="table-responsive" style="height: 250px;">
<table id="edl_events_list" class="table-striped table-sm w-100" style="table-layout: fixed;">
<thead>
<tr>
<th>Channel</th>
<th>Source</th>
<th>Clip</th>
<th>TC In</th>
<th>TC Out</th>
</tr>
</thead>
<tbody>
<% @video_analysis_presenter.all_tracks_edl_events.each do |edl_event| %>
<tr>
<td><%= edl_event.channel %></td>
<td><%= edl_event.source_file_name %></td>
<td><%= edl_event.clip_name %></td>
<td data-timecode-in="<%= edl_event.timecode_in %>"><%= edl_event.timecode_in %></td>
<td><%= edl_event.timecode_out %></td>
</tr>
<% end %>
</tbody>
</table>
</div>
</div>
</div>
<div class="col-lg-6 mb-2">
<ul class="nav nav-pills nav-fill">
<li class="nav-item">
<%= link_to "Video", "#video_tab", class: "nav-link active", data: { toggle: "tab" } %>
</li>
<li class="nav-item">
<%= link_to "Graphics", "#graphics_tab", class: "nav-link", data: { toggle: "tab" } %>
</li>
<li class="nav-item">
<%= link_to "Audio", "#audio_tab", class: "nav-link", data: { toggle: "tab" } %>
</li>
<li class="nav-item">
<%= link_to "Issues & Concerns", "#issues_and_concerns_tab", class: "nav-link", data: { toggle: "tab" } %>
</li>
<li class="nav-item">
<%= link_to "Notes", "#notes", class: "nav-link", data: { toggle: "tab" } %>
</li>
</ul>
<div class="tab-content">
<div class="tab-pane show active" id="video_tab" role="tabpanel" aria-labelledby="video-tab">
<div class="row no-gutters">
<div class="col-lg-12">
<div class="card">
<div class="card-header">
<h5>AI Matches</h5>
</div>
<div class="card-body overflow-auto p-0" style="height: 340px;">
<div class="table-responsive">
<table class="table-striped table-sm w-100" style="table-layout: fixed;">
<thead>
<tr>
<th style="width: 5%;"></th>
<th style="">EDL #</th>
<th style="">EDL TC</th>
<th style="">VID TC</th>
<th style="">Name</th>
<th style="">Photo</th>
<th style="width: 15%;"></th>
</tr>
</thead>
<tbody id="suggested_matches">
<% @video_analysis_presenter.chronological_appearances.each do |match| %>
<% if match.respond_to?(:file_info) && match.file_info.present? %>
<tr class="releasable-match" data-confirmed="<%=@video.has_confirmed_release?(match) && @video.video_release_confirmations.any? { |video_release_confirmation| video_release_confirmation.file_info_id == match.file_info.id } %>" data-time="<%= match.elapsed_time_until_appearance %>">
<td><%= fa_icon("check-circle", style: "font-size:24px;color:green", "data-ujs-target" => "match-confirmed-check") %></td>
<td></td>
<td><%= match.timecode_in %></td>
<td><a data-behavior="seekable-timecode"><%= match.appears_at_timecode %></a></td>
<td></td>
<td></td>
<td>
<%= button_to_video_release_confirmation @video, match, additional_video_release_params: { file_info_id: match.file_info.id }, classes: "btn btn-success btn-sm" do %>
<%= fa_icon "plus" %>
<% end %>
</td>
</tr>
<% elsif match.photo.attached? %>
<tr class="releasable-match" id="<%= dom_id(match) %>" data-confirmed="<%= @video.has_confirmed_release?(match) %>" data-time="<%= match.elapsed_time_until_appearance %>">
<td><%= fa_icon("check-circle", style: "font-size:24px;color:green", "data-ujs-target" => "match-confirmed-check") %></td>
<td> </td>
<td>N/A</td>
<td><a data-behavior="seekable-timecode"><%= match.appears_at_timecode %></a></td>
<td><%= match.name %></td>
<td><%= image_tag thumbnail_variant(match.photo), class: "img-fluid figure-img" %></td>
<td>
<%= button_to_video_release_confirmation @video, match, classes: "btn btn-success btn-sm" do %>
<%= fa_icon "plus" %>
<% end %>
</td>
</tr>
<% end %>
<% end %>
</tbody>
</table>
</div>
<div data-ujs-target="video-analysis-msg">
<% # Init the video player and the recommendations %>
<%= javascript_tag nonce: true do %>
$(document).ready(function() {
var bookmarks = <%= raw @video_analysis_presenter.bookmarks.to_json %>;
var player = $("[data-behavior=video-player-with-analysis]");
App.VideoAnalysis.initPlayerWithAnalysis(player, bookmarks);
});
<% end %>
<% if @video.analysis_pending? %>
<div class="p-3 text-center text-muted">
<%= fa_icon "cog spin" %> Video is still being analyzed
</div>
<% elsif @video.analysis_not_started? %>
<div class="text-center">
<%= link_to "Analyze Video", "#", class: "btn btn-primary btn-sm", method: :post %>
</div>
<% end %>
</div>
</div>
</div>
</div>
<div class="col-lg-12">
<div class="card">
<div class="card-header">
<h5>Added to Report</h5>
</div>
<div class="overflow-auto" id="video_release_confirmations" style="height: 400px;">
<%= render "video_analyses/video_release_confirmations", video_release_confirmations: @video_release_confirmations %>
</div>
</div>
</div>
</div>
</div>
<div class="tab-pane" id="graphics_tab" role="tabpanel" aria-labelledby="graphics-tab">
<div class="row no-gutters">
<div class="col-lg-12">
<div class="card">
<div class="card-header">
<h5>AI Matches</h5>
</div>
<div class="card-body overflow-auto p-0" style="height: 340px;">
<div class="table-responsive">
<table class="table-striped table-sm w-100" style="table-layout: fixed;">
<thead>
<tr>
<th style="width: 5%;"></th>
<th style="">EDL #</th>
<th style="">EDL TC</th>
<th style="">VID TC</th>
<th style="">Filename</th>
<th style="width: 15%;"></th>
</tr>
</thead>
<tbody id="graphics_elements_matches">
<% @video_analysis_presenter.chronological_graphics_matches.each do |match| %>
<tr class="graphics-match" data-confirmed="<%= match.confirmed %>" data-time="<%= match.elapsed_time_until_appearance %>">
<td><%= fa_icon("check-circle", style: "font-size:24px;color:green", "data-ujs-target" => "graphics-confirmed-check") %></td>
<td></td>
<td><%= match.timecode_in %></td>
<td><a data-behavior="seekable-timecode"><%= match.appears_at_timecode %></a></td>
<td><%= match.filename %></td>
<td>
<%= button_to new_video_video_analyses_graphics_element_path(@video),
class: "btn btn-success btn-sm",
form: { data: { ujs_target: "graphics-element-form" } },
params: { graphics_element: { text: "", time_elapsed: match.start_time, edl_type: "graphics" }, matched_file_name: match.filename },
method: :get,
form_class: "text-center",
remote: true do %>
<%= fa_icon "plus" %>
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>
</div>
<div data-ujs-target="video-analysis-msg">
<% if @video.analysis_pending? %>
<div class="p-3 text-center text-muted">
<%= fa_icon "cog spin" %> Video is still being analyzed
</div>
<% end %>
</div>
</div>
</div>
</div>
<div class="col-lg-12">
<div class="card">
<div class="card-header">
<h5>Added to Report</h5>
</div>
<div class="overflow-auto" id="graphics_elements_list" style="height: 400px;">
<%= render "video_analyses/graphics_elements", graphics_elements: @graphics_elements_data.graphics_elements %>
</div>
</div>
</div>
</div>
</div>
<div class="tab-pane" id="audio_tab" role="tabpanel" aria-labelledby="audio-tab">
<div class="row no-gutters">
<div class="col-lg-12">
<div class="card">
<div class="card-header">
<h5>AI Matches</h5>
</div>
<div class="overflow-auto" style="height: 340px;">
<div class="table-responsive">
<table class="table-striped table-sm w-100" style="table-layout: fixed;">
<thead>
<tr>
<th style="width: 5%;"></th>
<th style="">EDL #</th>
<th style="">EDL TC</th>
<th style="">VID TC</th>
<th style="">Filename</th>
<th style="width: 10%;"></th>
</tr>
</thead>
<tbody id="audio_matches">
<% @video_analysis_presenter.chronological_audio_matches.each do |match| %>
<tr class="releasable-match" data-confirmed="<%= match.confirmed %>" data-time="<%= match.elapsed_time_until_appearance %>">
<td><%= fa_icon("check-circle", style: "font-size:24px;color:green", "data-ujs-target" => "match-confirmed-check") %></td>
<td></td>
<td><%= match.timecode_in %></td>
<td><a data-behavior="seekable-timecode"><%= match.appears_at_timecode %></a></td>
<td><%= match.presented_filename %></td>
<td>
<%= button_to new_video_video_analyses_audio_confirmation_path(@video),
class: "btn btn-success btn-sm",
form: { data: { ujs_target: "audio-confirmation-form" } },
params: { audio_confirmation: { confirmation_type: match.confirmation_type, time_elapsed: match.start_time, composer_info: match.composer_info, publisher_info: match.publisher_info, catalog: match.catalog, title: match.title, edl_type: match.edl_type }, matched_file_name: match.filename },
method: :get,
remote: true,
data: { disable_with: t("shared.disable_with") } do %>
<%= fa_icon "plus" %>
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>
</div>
<div data-ujs-target="video-analysis-msg">
<% if @video.analysis_pending? %>
<div class="p-3 text-center text-muted">
<%= fa_icon "cog spin" %> Video is still being analyzed
</div>
<% end %>
</div>
</div>
</div>
</div>
<div class="col-lg-12">
<div class="card">
<div class="card-header">
<h5>Added to Report</h5>
</div>
<div class="overflow-auto" id="audio_confirmations" style="height: 400px;">
<%= render "video_analyses/audio_confirmations", audio_confirmations: @audio_confirmations %>
</div>
</div>
</div>
</div>
</div>
<div class="tab-pane" id="issues_and_concerns_tab" role="tabpanel" aria-labelledby="issues-and-concerns-tab">
<div>
<div class="card">
<div class="card-header">
<h5>Added to Report</h5>
</div>
<div class="overflow-auto" id="issues_and_concerns_list" style="height: 660px;">
<%= render "video_analyses/unreleased_appearances", unreleased_appearances: @unreleased_appearances_data.unreleased_appearances %>
</div>
</div>
</div>
</div>
<div class="tab-pane" id="notes" role="tabpanel" aria-labelledby="notes">
<div>
<div class="card">
<div class="card-header">
<h5>Notes</h5>
</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><%= Bookmark.human_attribute_name(:category) %></th>
<th>Text</th>
<th>Video TC</th>
<th></th>
</tr>
</thead>
<tbody id="video_bookmarks">
<% if @bookmarks.any? %>
<%= render partial: "bookmarks/bookmark", collection: @bookmarks %>
<% else %>
<%= render partial: "bookmarks/empty_bookmarks" %>
<% end %>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<% project_feature @video.project, :talent_release do %>
<div class="row mb-2">
<div class="col-12">
<div class="card">
<div class="card-header" data-target="#talent_releases_section" data-toggle="collapse">
<h5>
<span class="collapse-indicator"></span>
Talent Releases
</h5>
</div>
<div class="collapse show" id="talent_releases_section">
<div class="card-body">
<div class="mb-3">
<%= bootstrap_form_tag url: video_video_analyses_talent_releases_path(@video), layout: :inline, method: :get, remote: true do |form| %>
<%= form.search_field :query, class: "mt-1 mt-sm-0", hide_label: true, wrapper: false, placeholder: "Search...", value: params[:query] %>
<%= form.button fa_icon("search", text: "Search"), class: "btn btn-primary mt-1 mt-sm-0 ml-sm-1", data: { disable_with: fa_icon("spinner spin", text: "Searching") } %>
<%= link_to fa_icon("eraser", text: "Clear"), video_video_analyses_talent_releases_path(@video), class: "btn btn-danger mt-1 mt-sm-0 ml-1", data: { disable_with: fa_icon("spinner spin", text: "Clearing") }, remote: true %>
<% end %>
</div>
<ul class="list-inline overflow-auto text-nowrap" id="talent_releases">
<%= render "releasables", releasables: @talent_releases, video: @video %>
</ul>
</div>
</div>
</div>
</div>
</div>
<% end %>
<% project_feature @video.project, :appearance_release do %>
<div class="row mb-2">
<div class="col-12">
<div class="card">
<div class="card-header" data-target="#appearance_releases_section" data-toggle="collapse">
<h5>
<span class="collapse-indicator"></span>
Appearance Releases
</h5>
</div>
<div class="collapse show" id="appearance_releases_section">
<div class="card-body">
<div class="mb-3">
<%= bootstrap_form_tag url: video_video_analyses_appearance_releases_path(@video), layout: :inline, method: :get, remote: true do |form| %>
<%= form.search_field :query, class: "mt-1 mt-sm-0", hide_label: true, wrapper: false, placeholder: "Search...", value: params[:query] %>
<%= form.button fa_icon("search", text: "Search"), class: "btn btn-primary mt-1 mt-sm-0 ml-sm-1", data: { disable_with: fa_icon("spinner spin", text: "Searching") } %>
<%= link_to fa_icon("eraser", text: "Clear"), video_video_analyses_appearance_releases_path(@video), class: "btn btn-danger mt-1 mt-sm-0 ml-1", data: { disable_with: fa_icon("spinner spin", text: "Clearing") }, remote: true %>
<% end %>
</div>
<ul class="list-inline overflow-auto text-nowrap" id="appearance_releases">
<%= render "releasables", releasables: @appearance_releases, video: @video %>
</ul>
</div>
</div>
</div>
</div>
</div>
<% end %>
<% project_feature @video.project, :location_release do %>
<div class="row mb-2">
<div class="col-12">
<div class="card">
<div class="card-header" data-target="#location_releases_section" data-toggle="collapse">
<h5>
<span class="collapse-indicator"></span>
Location Releases
</h5>
</div>
<div class="collapse show" id="location_releases_section">
<div class="card-body">
<div class="mb-3">
<%= bootstrap_form_tag url: video_video_analyses_location_releases_path(@video), layout: :inline, method: :get, remote: true do |form| %>
<%= form.search_field :query, class: "mt-1 mt-sm-0", hide_label: true, wrapper: false, placeholder: "Search...", value: params[:query] %>
<%= form.button fa_icon("search", text: "Search"), class: "btn btn-primary mt-1 mt-sm-0 ml-sm-1", data: { disable_with: fa_icon("spinner spin", text: "Searching") } %>
<%= link_to fa_icon("eraser", text: "Clear"), video_video_analyses_location_releases_path(@video), class: "btn btn-danger mt-1 mt-sm-0 ml-1", data: { disable_with: fa_icon("spinner spin", text: "Clearing") }, remote: true %>
<% end %>
</div>
<ul class="list-inline overflow-auto text-nowrap" id="location_releases">
<%= render "releasables", releasables: @location_releases, video: @video %>
</ul>
</div>
</div>
</div>
</div>
</div>
<% end %>
<% project_feature @video.project, :acquired_media_release do %>
<div class="row mb-2">
<div class="col-12">
<div class="card">
<div class="card-header" data-target="#acquired_media_releases_section" data-toggle="collapse">
<h5>
<span class="collapse-indicator"></span>
Acquired Media Releases (Footage & Stills)
</h5>
</div>
<div class="collapse show" id="acquired_media_releases_section">
<div class="card-body">
<div class="mb-3">
<%= bootstrap_form_tag url: video_video_analyses_acquired_media_releases_path(@video), layout: :inline, method: :get, remote: true do |form| %>
<%= form.search_field :query, class: "mt-1 mt-sm-0", hide_label: true, wrapper: false, placeholder: "Search...", value: params[:query] %>
<%= form.button fa_icon("search", text: "Search"), class: "btn btn-primary mt-1 mt-sm-0 ml-sm-1", data: { disable_with: fa_icon("spinner spin", text: "Searching") } %>
<%= link_to fa_icon("eraser", text: "Clear"), video_video_analyses_acquired_media_releases_path(@video), class: "btn btn-danger mt-1 mt-sm-0 ml-1", data: { disable_with: fa_icon("spinner spin", text: "Clearing") }, remote: true %>
<% end %>
</div>
<ul class="list-inline overflow-auto text-nowrap" id="acquired_media_releases">
<%= render "releasables", releasables: @acquired_media_releases, video: @video %>
</ul>
</div>
</div>
</div>
</div>
</div>
<% end %>
<% project_feature @video.project, :music_release do %>
<div class="row mb-2">
<div class="col-12">
<div class="card">
<div class="card-header" data-target="#music_releases_section" data-toggle="collapse">
<h5>
<span class="collapse-indicator"></span>
Music Releases (Original Music Release)
</h5>
</div>
<div class="collapse show" id="music_releases_section">
<div class="card-body">
<div class="mb-3">
<%= bootstrap_form_tag url: [@video, :video_analyses, :music_releases], layout: :inline, method: :get, remote: true do |form| %>
<%= form.search_field :query, class: "mt-1 mt-sm-0", hide_label: true, wrapper: false, placeholder: "Search...", value: params[:query] %>
<%= form.button fa_icon("search", text: "Search"), class: "btn btn-primary mt-1 mt-sm-0 ml-sm-1", data: { disable_with: fa_icon("spinner spin", text: "Searching") } %>
<%= link_to fa_icon("eraser", text: "Clear"), [@video, :video_analyses, :music_releases], class: "btn btn-danger mt-1 mt-sm-0 ml-1", data: { disable_with: fa_icon("spinner spin", text: "Clearing") }, remote: true %>
<% end %>
</div>
<ul class="list-inline overflow-auto text-nowrap" id="music_releases">
<%= render "releasables", releasables: @music_releases, video: @video %>
</ul>
</div>
</div>
</div>
</div>
</div>
<% end %>
<% project_feature @video.project, :material_release do %>
<div class="row mb-2">
<div class="col-12">
<div class="card">
<div class="card-header" data-target="#material_releases_section" data-toggle="collapse">
<h5>
<span class="collapse-indicator"></span>
Material Releases (Products / Logos)
</h5>
</div>
<div class="collapse show" id="material_releases_section">
<div class="card-body">
<div class="mb-3">
<%= bootstrap_form_tag url: video_video_analyses_material_releases_path(@video), layout: :inline, method: :get, remote: true do |form| %>
<%= form.search_field :query, class: "mt-1 mt-sm-0", hide_label: true, wrapper: false, placeholder: "Search...", value: params[:query] %>
<%= form.button fa_icon("search", text: "Search"), class: "btn btn-primary mt-1 mt-sm-0 ml-sm-1", data: { disable_with: fa_icon("spinner spin", text: "Searching") } %>
<%= link_to fa_icon("eraser", text: "Clear"), video_video_analyses_material_releases_path(@video), class: "btn btn-danger mt-1 mt-sm-0 ml-1", data: { disable_with: fa_icon("spinner spin", text: "Clearing") }, remote: true %>
<% end %>
</div>
<ul class="list-inline overflow-auto text-nowrap" id="material_releases">
<%= render "releasables", releasables: @material_releases, video: @video %>
</ul>
</div>
</div>
</div>
</div>
</div>
<% end %>
</main>

View File

@@ -0,0 +1,8 @@
// Hide any open toolitps before removing elements from the DOM
$("#talent_releases [data-toggle=tooltip]").tooltip("dispose");
// Update the release list
$("#talent_releases").html("<%= j render("video_analyses/releasables", releasables: @talent_releases, video: @video) %>");
// # Reset the search form
$("#talent_releases_section form input[name='query']").val("<%= params[:query] %>");

View File

@@ -0,0 +1,36 @@
<%= content_tag :div, class: "modal modal-right", id: "edit_unreleased_appearance_modal", aria: { labelledby: "modalLabel", hidden: true }, role: "dialog", tabindex: -1 do %>
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="modalLabel">Update Unreleased Appearance</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<%= bootstrap_form_with model: unreleased_appearance, url: [unreleased_appearance, {video_id: unreleased_appearance.video}], layout: :horizontal, label_col: "col-3", control_col: "col-9" do |form| %>
<div class="modal-body">
<%= render "video_analyses/show_hide_edl_events", edl_events_data: @edl_events_data, model_name: "unreleased_appearance" %>
<div id="unreleased_appearance_fields">
<%= form.hidden_field :time_elapsed, value: unreleased_appearance.time_elapsed %>
<%= form.static_control nil, name: nil, label: "Video Timecode", value: unreleased_appearance.appears_at %>
<%= form.text_field :channel %>
<%= form.text_field :timecode_in %>
<%= form.text_field :timecode_out %>
<%= form.text_field :duration %>
<%= form.text_field :source_file_name %>
<%= form.text_field :clip_name %>
<%= form.text_field :description %>
<%= form.select :note_category, options_for_note_category_select(unreleased_appearance), label: "Note" %>
<%= form.text_area :notes, control_col: "col-12", hide_label: true, placeholder: true, rows: 4 %>
</div>
</div>
<div class="modal-footer">
<%= form.button "Close", class: "btn btn-secondary", data: { dismiss: "modal" } %>
<%= form.submit class: "btn btn-primary", data: { disable_with: t("shared.disable_with") } %>
</div>
<% end %>
</div>
</div>
<% end %>

View File

@@ -0,0 +1,36 @@
<%= content_tag :div, class: "modal modal-right", id: "new_unreleased_appearance_modal", aria: { labelledby: "modalLabel", hidden: true }, role: "dialog", tabindex: -1 do %>
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="modalLabel">New Unreleased Appearance</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<%= bootstrap_form_with model: [unreleased_appearance.video, "video_analyses", unreleased_appearance], layout: :horizontal, label_col: "col-3", control_col: "col-9" do |form| %>
<div class="modal-body">
<%= render "video_analyses/show_hide_edl_events", edl_events_data: @edl_events_data, model_name: "unreleased_appearance" %>
<div id="unreleased_appearance_fields">
<%= form.hidden_field :time_elapsed, value: unreleased_appearance.time_elapsed %>
<%= form.static_control nil, name: nil, label: "Video Timecode", value: unreleased_appearance.appears_at %>
<%= form.text_field :channel %>
<%= form.text_field :timecode_in %>
<%= form.text_field :timecode_out %>
<%= form.text_field :duration %>
<%= form.text_field :source_file_name %>
<%= form.text_field :clip_name %>
<%= form.text_field :description %>
<%= form.select :note_category, options_for_note_category_select(unreleased_appearance), label: "Note" %>
<%= form.text_area :notes, control_col: "col-12", hide_label: true, placeholder: true, rows: 4 %>
</div>
</div>
<div class="modal-footer">
<%= form.button "Close", class: "btn btn-secondary", data: { dismiss: "modal" } %>
<%= form.submit class: "btn btn-primary", data: { disable_with: t("shared.disable_with") } %>
</div>
<% end %>
</div>
</div>
<% end %>

View File

@@ -0,0 +1,4 @@
$("#issues_and_concerns_list").html("<%= j render("video_analyses/unreleased_appearances", unreleased_appearances: @unreleased_appearances_data.unreleased_appearances) %>");
<% # Close the modal %>
$("#new_unreleased_appearance_modal").modal("toggle");

View File

@@ -0,0 +1 @@
$("#issues_and_concerns_list").html("<%= j render("video_analyses/unreleased_appearances", unreleased_appearances: @unreleased_appearances_data.unreleased_appearances) %>");

View File

@@ -0,0 +1,11 @@
<% # Remove the modal if it already exists %>
<% # Remove modals if it already exists %>
$("#new_unreleased_appearance_modal").remove();
$("#edit_unreleased_appearance_modal").remove();
<% # Create and show the modal %>
$("body").append("<%= j render('edit_unreleased_appearance_modal', unreleased_appearance: @unreleased_appearance) %>");
$("#edit_unreleased_appearance_modal").modal("toggle");
handleNotesFieldVisibility();

View File

@@ -0,0 +1,9 @@
$("[data-toggle=tooltip]").tooltip("dispose");
<% # Remove modals if it already exists %>
$("#new_unreleased_appearance_modal").remove();
$("#edit_unreleased_appearance_modal").remove();
<% # Create and show the modal %>
$("body").append("<%= j render('new_unreleased_appearance_modal', unreleased_appearance: @unreleased_appearance) %>");
$("#new_unreleased_appearance_modal").modal("toggle");

View File

@@ -0,0 +1,4 @@
$("#issues_and_concerns_list").html("<%= j render("video_analyses/unreleased_appearances", unreleased_appearances: @unreleased_appearances_data.unreleased_appearances) %>");
<% # Close the modal %>
$("#edit_unreleased_appearance_modal").modal("toggle");