Upstream sync
This commit is contained in:
BIN
app/assets/images/ME_PRO_black.png
Normal file
BIN
app/assets/images/ME_PRO_black.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
BIN
app/assets/images/live_icon.png
Normal file
BIN
app/assets/images/live_icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 24 KiB |
@@ -24,7 +24,7 @@ $(document).on "turbolinks:load", ->
|
||||
stream_selected = $("#broadcast_video").data('videoType') == 'stream';
|
||||
if data.streamer_status == 'recording' && data.status == 'active' && stream_selected
|
||||
$("#broadcast_video").html data.video_content
|
||||
$("#live_take").html data.live_take_content
|
||||
$("#recording_status").html data.recording_status_content
|
||||
|
||||
new (Clappr.Player)(
|
||||
<%= "baseUrl: 'http://cdn.clappr.io/latest'," if Rails.env.test? %>
|
||||
@@ -37,7 +37,7 @@ $(document).on "turbolinks:load", ->
|
||||
hlsMinimumDvrSize: 1)
|
||||
if data.streamer_status == "idle" && data.status == "idle"
|
||||
$("#broadcast_video").html data.video_content
|
||||
$("#live_take").html data.live_take_content
|
||||
$("#recording_status").html data.recording_status_content
|
||||
|
||||
showBroadcastRecordings: (data) ->
|
||||
$(".flash-message").html data.flash_content
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
$(document).on("click", "[data-behavior=play_recording]", function() {
|
||||
clearPlayingHighlight();
|
||||
$(this).parent().parent().addClass('playing-highlight');
|
||||
|
||||
$("#broadcast_video").data('videoType', 'recording');
|
||||
|
||||
var playback_url = $(this).attr("data-playback-url")
|
||||
@@ -14,4 +17,11 @@ $(document).on("click", "[data-behavior=play_recording]", function() {
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on("click", "[data-behavior=play_stream]", function() { $("#broadcast_video").data('videoType', 'stream'); });
|
||||
$(document).on("click", "[data-behavior=play_stream]", function() {
|
||||
// clearPlayingHighlight();
|
||||
$("#broadcast_video").data('videoType', 'stream');
|
||||
});
|
||||
|
||||
function clearPlayingHighlight() {
|
||||
$(".playing-highlight").removeClass("playing-highlight");
|
||||
}
|
||||
@@ -467,4 +467,31 @@ trix-toolbar {
|
||||
.trix-button--icon-underline::before {
|
||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M12 17c3.31 0 6-2.69 6-6V3h-2.5v8c0 1.93-1.57 3.5-3.5 3.5S8.5 12.93 8.5 11V3H6v8c0 3.31 2.69 6 6 6zm-7 2v2h14v-2H5z'/%3E%3C/svg%3E");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Play button SVG
|
||||
.play-btn {
|
||||
width: 60%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.play-btn-svg{
|
||||
transition: 0.3s;
|
||||
stroke:#fedfc2;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.play-btn:hover .play-btn-svg {
|
||||
fill-opacity: 0;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
// Play button in video thumbnail preview
|
||||
.play-thumbnail { position: relative; }
|
||||
.play-thumbnail img { display: block; }
|
||||
.play-thumbnail .play-btn { position: absolute; bottom:5px; left:10px; }
|
||||
|
||||
// Active recording highlight
|
||||
.playing-highlight {
|
||||
background-color: scale-color($primary, $lightness: 80%);
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ class BroadcastsChannel < ApplicationCable::Channel
|
||||
def self.broadcast_stream_updates(broadcast)
|
||||
status_content = ApplicationController.render partial: "broadcasts/broadcast_status", locals: { broadcast: broadcast }
|
||||
video_content = ApplicationController.render partial: "broadcasts/video", locals: { broadcast: broadcast }
|
||||
live_take = ApplicationController.render partial: "broadcasts/live_take", locals: { broadcast: broadcast }
|
||||
recording_status_content = ApplicationController.render partial: "broadcasts/recording_status", locals: { broadcast: broadcast }
|
||||
|
||||
broadcast_to broadcast, {
|
||||
event: :broadcast_stream_update,
|
||||
@@ -19,7 +19,7 @@ class BroadcastsChannel < ApplicationCable::Channel
|
||||
playback_url: broadcast.stream_playback_url,
|
||||
full_live_stream_playback_url: broadcast.full_live_stream_playback_url,
|
||||
video_content: video_content,
|
||||
live_take_content: live_take,
|
||||
recording_status_content: recording_status_content,
|
||||
status_content: status_content,
|
||||
streamer_status: broadcast.streamer_status
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
class AccountSessionsController < ApplicationController
|
||||
skip_before_action :redirect_locked_accounts
|
||||
def update
|
||||
authorize :account_session, :update?
|
||||
session[:active_account] = account_session_params[:account_id]
|
||||
|
||||
31
app/controllers/admin/account_locks_controller.rb
Normal file
31
app/controllers/admin/account_locks_controller.rb
Normal file
@@ -0,0 +1,31 @@
|
||||
class Admin::AccountLocksController < Admin::ApplicationController
|
||||
before_action :set_account
|
||||
|
||||
def create
|
||||
authorize :account_lock, :create?
|
||||
@account.update(locked: true)
|
||||
redirect_to admin_accounts_path, notice: 'Account locked'
|
||||
end
|
||||
|
||||
def destroy
|
||||
authorize :account_lock, :destroy?
|
||||
@account.update(locked: false)
|
||||
redirect_to admin_accounts_path, notice: 'Account unlocked'
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def set_account
|
||||
if params[:account_id].present?
|
||||
@account = Account.find_by(slug: params[:account_id])
|
||||
else
|
||||
failure_redirect
|
||||
end
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
failure_redirect
|
||||
end
|
||||
|
||||
def failure_redirect
|
||||
redirect_to admin_accounts_path, alert: 'Failed to find the account'
|
||||
end
|
||||
end
|
||||
@@ -13,6 +13,7 @@ class ApplicationController < ActionController::Base
|
||||
|
||||
include SetCurrentRequestDetails
|
||||
before_action :redirect_accountless
|
||||
before_action :redirect_locked_accounts
|
||||
|
||||
private
|
||||
|
||||
@@ -29,6 +30,12 @@ class ApplicationController < ActionController::Base
|
||||
end
|
||||
end
|
||||
|
||||
def redirect_locked_accounts
|
||||
if Current.user && !Current.user.admin? && Current.account.present? && Current.account.locked?
|
||||
redirect_to locked_account_path
|
||||
end
|
||||
end
|
||||
|
||||
def signed_in_as_admin?
|
||||
signed_in? && current_user.admin?
|
||||
end
|
||||
|
||||
10
app/controllers/locked_accounts_controller.rb
Normal file
10
app/controllers/locked_accounts_controller.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
class LockedAccountsController < ApplicationController
|
||||
skip_before_action :redirect_locked_accounts
|
||||
skip_after_action :verify_policy_scoped
|
||||
|
||||
def index
|
||||
unless Current.account.locked?
|
||||
redirect_to projects_path
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -40,4 +40,13 @@ module DropzoneHelper
|
||||
{ name: file_info.filename, size: file_info.byte_size, type: file_info.content_type }
|
||||
end.to_json
|
||||
end
|
||||
|
||||
def dropzone_file_size_limit_for(releasable)
|
||||
case releasable.model_name.param_key
|
||||
when "material_release", "acquired_media_release"
|
||||
1000000
|
||||
else
|
||||
256
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -12,6 +12,7 @@ class ActiveStorageDropzone {
|
||||
var acceptedFiles = $(element).data("accepted-files") || "image/*";
|
||||
var dictDefaultMessage = $(element).data("placeholder") || "Drop files here";
|
||||
var submitButton = $($(element).data("submit-button"));
|
||||
var maxFileSize = $(element).data("max-file-size");
|
||||
var that = this;
|
||||
|
||||
this.myDropzone = new this.DropzoneClass(element, {
|
||||
@@ -20,6 +21,7 @@ class ActiveStorageDropzone {
|
||||
acceptedFiles: acceptedFiles,
|
||||
parallelUploads: 30,
|
||||
dictDefaultMessage: dictDefaultMessage,
|
||||
maxFilesize: maxFileSize,
|
||||
|
||||
init: function () {
|
||||
this.on("sending", (file, xhr, formData) => {
|
||||
|
||||
@@ -15,6 +15,7 @@ class MatchAppearanceReleasesJob < ApplicationJob
|
||||
matches = response.matches || []
|
||||
key_signed_id_hash = Hash[filtered_attachments_object[:keys].zip(filtered_attachments_object[:signed_ids])]
|
||||
handle_matches matches, project, key_signed_id_hash
|
||||
handle_unmatches matches, project, key_signed_id_hash
|
||||
matching_request.destroy
|
||||
end
|
||||
|
||||
@@ -40,6 +41,21 @@ class MatchAppearanceReleasesJob < ApplicationJob
|
||||
end
|
||||
end
|
||||
|
||||
def handle_unmatches(matches, project, key_signed_id_hash)
|
||||
matched_keys = matches.flat_map { |match| match.contracts + match.headshots }
|
||||
unmatches = key_signed_id_hash.find_all { |key, _| !key.in?(matched_keys) }
|
||||
|
||||
unmatches.each do |key, signed_id|
|
||||
blob = ActiveStorage::Blob.find_signed signed_id
|
||||
|
||||
if blob.image?
|
||||
create_release(project, nil, signed_id, nil)
|
||||
else
|
||||
create_release(project, signed_id, nil, nil)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def create_release(project, contract, headshot, identifier)
|
||||
random_contract_no = AppearanceRelease.random_contract_number.to_s
|
||||
is_incomplete = contract.nil? || headshot.nil?
|
||||
|
||||
9
app/policies/account_lock_policy.rb
Normal file
9
app/policies/account_lock_policy.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
class AccountLockPolicy < ApplicationPolicy
|
||||
def create?
|
||||
user.admin?
|
||||
end
|
||||
|
||||
def destroy?
|
||||
user.admin?
|
||||
end
|
||||
end
|
||||
@@ -6,7 +6,7 @@
|
||||
<%= form.email_field :email, class: "form-group" %>
|
||||
<%= form.password_field :password %>
|
||||
<%= form.text_field :account_name, label: 'Account Name' %>
|
||||
<%= form.select :interested_product_name, options_for_select(["I'm interested in all products", "DirectME", "ReleaseME", "CastME", "EditME", "DeliverME", "ExpenseME"]), { label: "What product are you most interested in?" }, { class: "form-control custom-select" } %>
|
||||
<%= form.select :interested_product_name, options_for_select(["I'm interested in all products", "ME Suite PRO", "DirectME", "ReleaseME", "CastME", "EditME", "DeliverME", "ExpenseME"]), { label: "What product are you most interested in?" }, { class: "form-control custom-select" } %>
|
||||
<div class="pt-3">
|
||||
<%= form.submit "Start Free Trial", class: "btn btn-block btn-danger font-weight-bold" %>
|
||||
</div>
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
<h3>Welcome To <%= suite_wordmark("d-inline-block") %></h3>
|
||||
<div class="mt-4">
|
||||
<p>Sign up for a <strong>14 Day Free Trial</strong> which includes full access to the following products. No credit card required!</p>
|
||||
<div class="d-flex justify-content-between pb-2">
|
||||
<div><%= image_tag "ME_PRO_black.png", width: "96.66%" %></div>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between pb-2">
|
||||
<div><%= image_tag "logo_directme.png", width: "90%" %></div>
|
||||
<div><%= image_tag "logo_releaseme.png", width: "90%" %></div>
|
||||
|
||||
@@ -1,16 +1,19 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<input id="total_entries" type=hidden value=<%= @acquired_media_releases.total_entries %> />
|
||||
<div class="d-md-flex d-sm-flex flex-sm-column flex-md-row flex-md-wrap mb-3">
|
||||
<% if policy(AcquiredMediaRelease).new? %>
|
||||
<%= link_to fa_icon("plus", text: t(".actions.new")), [:new, @project, :acquired_media_release], class: "btn btn-primary mr-2 mb-2" %>
|
||||
<div class="mr-auto">
|
||||
<%= link_to fa_icon("plus", text: t(".actions.new")), [:new, @project, :acquired_media_release], class: "btn btn-primary mr-2 mb-2" %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if @acquired_media_releases.any? && policy(AcquiredMediaRelease).tag_multiple? %>
|
||||
<%= button_to_bulk_tagging(@project) %>
|
||||
<% end %>
|
||||
|
||||
|
||||
<% if @acquired_media_releases.any? && policy(AcquiredMediaRelease).download_multiple? %>
|
||||
<%= link_to "Download All", [@project, :contract_downloads, release_type: @acquired_media_releases.name], method: :post, remote: true, class: "btn btn-light border ml-auto mr-2 mb-2", data: {
|
||||
<%= button_to "Download", [@project, :contract_downloads, release_type: @acquired_media_releases.name], id: "download_releases", method: :post, remote: true, class: "btn btn-light border mr-2 mb-2", data: {
|
||||
disable_with: "Please wait..." } %>
|
||||
<% end %>
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
$("#acquired_media_releases").html("<%= j render(@acquired_media_releases) %>");
|
||||
$("form input[type='search']").val("<%= params[:query] %>");
|
||||
$("#acquired_media_releases_pagination").html("<%= j will_paginate(@acquired_media_releases) %>");
|
||||
$("#selected_releases_form").attr('data-releasable-ids', JSON.stringify([]));
|
||||
$("#total_entries").val(<%= @acquired_media_releases.total_entries %>);
|
||||
@@ -30,6 +30,11 @@
|
||||
<%= link_to fa_icon("arrow-right", text: "Overview"), admin_account_path(account), class: "dropdown-item" %>
|
||||
<%= link_to fa_icon("pencil", text: "Edit"), edit_admin_account_path(account), class: "dropdown-item" %>
|
||||
<%= link_to fa_icon("arrow-right", text: "Account Managers"), account_auths_path({ account_id: account.id}), class: "dropdown-item" %>
|
||||
<% if account.locked? %>
|
||||
<%= link_to fa_icon("unlock", text: "Unlock Account"), [:admin, account, :lock], method: :delete, class: "dropdown-item" %>
|
||||
<% else %>
|
||||
<%= link_to fa_icon("lock", text: "Lock Account"), [:admin, account, :lock], method: :post, class: "dropdown-item" %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@@ -1,29 +1,31 @@
|
||||
<% if recordings.present? %>
|
||||
<div class="list-group">
|
||||
<% recordings.each do |recording| %>
|
||||
<div class="list-group-item list-group-item-action">
|
||||
<div class="d-flex align-items-start">
|
||||
<% if policy(BroadcastRecording).update? %>
|
||||
<%= link_to fa_icon("#{recording.starred ? 'star' : 'star-o'} fw"), [broadcast.project, broadcast, recording, :broadcast_recording_starrings], method: :post, class: "text-warning mr-3", remote: true %>
|
||||
<% end %>
|
||||
<%= image_tag(recording.thumbnail_url, class: 'img-thumbnail img-fluid max-w-75', data: { behavior: "play_recording", playback_url: recording.playback_url, id: dom_id(recording) }) %>
|
||||
<div class="ml-auto">
|
||||
<% if policy(BroadcastRecording).edit? %>
|
||||
<%= link_to fa_icon('edit'), [:edit, broadcast.project, broadcast, recording], remote: true %>
|
||||
<% end %>
|
||||
<%= link_to(fa_icon('download'), recording.download_url, target: "_blank") %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex flex-column align-items-start justify-content-start p-4">
|
||||
<h5><%= recording.name %></h5>
|
||||
<p><%= recording.description %></p>
|
||||
</div>
|
||||
<ul class="list-unstyled">
|
||||
<% recordings.each do |recording| %>
|
||||
<li class="media p-3">
|
||||
<% if policy(BroadcastRecording).update? %>
|
||||
<%= link_to fa_icon("#{recording.starred ? 'star' : 'star-o'} fw"), [broadcast.project, broadcast, recording, :broadcast_recording_starrings], method: :post, class: "text-warning mr-2", remote: true %>
|
||||
<% end %>
|
||||
|
||||
<div class="play-thumbnail">
|
||||
<%= image_tag(recording.thumbnail_url, class: 'mr-2', size: "64x64") %>
|
||||
<%= content_tag :div, class: "play-btn", data: { behavior: "play_recording", playback_url: recording.playback_url, id: dom_id(recording) } do %>
|
||||
<%= render "broadcasts/play_button_svg" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div id="recordings_pagination" class="row mt-5 justify-content-center">
|
||||
<%= will_paginate(recordings, params: {controller: "broadcasts", action: "show", project_id: broadcast.project_id, id: broadcast.id, page: params[:page], active_tab: 'recordings'}) %>
|
||||
</div>
|
||||
<% else %>
|
||||
<p class="mt-4">Recording of the live stream will appear here.</p>
|
||||
<% end %>
|
||||
|
||||
<div class="media-body">
|
||||
<h5 class="mt-0 mb-1"><%= recording.name %></h5>
|
||||
<small class="text-muted"><%= recording.description %></small>
|
||||
</div>
|
||||
|
||||
<% if policy(BroadcastRecording).edit? %>
|
||||
<%= link_to fa_icon('edit'), [:edit, broadcast.project, broadcast, recording], class: "mr-3", remote: true %>
|
||||
<% end %>
|
||||
|
||||
<%= link_to(fa_icon('download'), recording.download_url, target: "_blank") %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
<div id="recordings_pagination" class="row mt-5 justify-content-center">
|
||||
<%= will_paginate(recordings, params: {controller: "broadcasts", action: "show", project_id: broadcast.project_id, id: broadcast.id, page: params[:page], active_tab: 'recordings'}) %>
|
||||
</div>
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
<% if broadcast.streamer_connected? || (broadcast.streamer_recording? && !broadcast.active?) %>
|
||||
<p class="mb-1">Live stream has connected successfully and will be available soon.</p>
|
||||
<div class="badge badge-pill badge-success mb-2 text-uppercase">Connected</div>
|
||||
<% elsif broadcast.streamer_recording? && broadcast.active? %>
|
||||
<p class="mb-1">Live stream has begun, click play to watch it.</p>
|
||||
<div class="badge badge-pill badge-danger mb-2 text-uppercase">Live</div>
|
||||
<% elsif broadcast.streamer_disconnected? %>
|
||||
<p class="mb-1">Live stream got disconnected.</p>
|
||||
<div class="badge badge-pill badge-warning mb-2 text-uppercase">Disconnected</div>
|
||||
<% elsif (broadcast.idle? && broadcast.streamer_idle?) || (broadcast.created? && broadcast.streamer_idle?) %>
|
||||
<p class="mb-1">Live stream is waiting to begin.</p>
|
||||
<div class="badge badge-pill badge-primary mb-2 text-uppercase">Idle</div>
|
||||
<% end %>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="text-center pb-2" id="broadcast_file_form_<%= broadcast.token %>">
|
||||
<div class="text-center p-3" id="broadcast_file_form_<%= broadcast.token %>">
|
||||
<% if controller.class.module_parent.to_s == "Public" %>
|
||||
<%= render partial: "public/broadcasts/file_form", locals: { model: [broadcast], token: broadcast.token } %>
|
||||
<% else %>
|
||||
|
||||
@@ -1,12 +1,35 @@
|
||||
<div class="list-group">
|
||||
<div class="list-group-item list-group-item-action flex-column align-items-start">
|
||||
<div class="d-flex w-100 justify-content-between mb-1">
|
||||
<h5 class="mb-1"><%= broadcast.name %></h5>
|
||||
<small>Created - <%= time_ago_in_words(broadcast.created_at) + " ago" %></small>
|
||||
</div>
|
||||
<div id="broadcast_updates">
|
||||
<% # TODO: Refactor this %>
|
||||
<% if params[:director_mode] %>
|
||||
<% if controller.class.module_parent.to_s == "Public" %>
|
||||
<% live_take_url = url_for(params.permit!.merge(director_mode: true, token: broadcast.token)) %>
|
||||
<% else %>
|
||||
<% live_take_url = url_for(params.permit!.merge(director_mode: true, id: broadcast.id)) %>
|
||||
<% end %>
|
||||
<hr/>
|
||||
<% else %>
|
||||
<% if controller.class.module_parent.to_s == "Public" %>
|
||||
<% live_take_url = url_for(params.permit!.merge(token: broadcast.token).except(:director_mode)) %>
|
||||
<% else %>
|
||||
<% live_take_url = url_for(params.permit!.merge(id: broadcast.id).except(:director_mode)) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<div id="live-take" class="media p-3 playing-highlight">
|
||||
<div id="recording_status">
|
||||
<%= render 'broadcasts/recording_status', broadcast: broadcast %>
|
||||
</div>
|
||||
|
||||
<div class="play-thumbnail">
|
||||
<%= image_tag "live_icon.png", class: "mr-2", width: 64, alt: "Live stream thumbnail" %>
|
||||
<%= link_to live_take_url, class: "play-btn", data: { behavior: "play_stream" } do %>
|
||||
<%= render "broadcasts/play_button_svg" %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="media-body">
|
||||
<h5 class="mt-0"><%= broadcast.name %></h5>
|
||||
<small id="broadcast_updates" class="text-muted">
|
||||
<%= render partial: 'broadcasts/broadcast_status', locals: { broadcast: broadcast } %>
|
||||
</div>
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
3
app/views/broadcasts/_play_button_svg.html.erb
Normal file
3
app/views/broadcasts/_play_button_svg.html.erb
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 26 26">
|
||||
<polygon class="play-btn-svg" points="9.33 6.69 9.33 19.39 19.3 13.04 9.33 6.69"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 153 B |
1
app/views/broadcasts/_recording_status.html.erb
Normal file
1
app/views/broadcasts/_recording_status.html.erb
Normal file
@@ -0,0 +1 @@
|
||||
<%= fa_icon "circle fw", class: class_string('mr-2', 'text-danger' => broadcast.streamer_recording? && broadcast.active?) %>
|
||||
@@ -13,12 +13,18 @@
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<style>
|
||||
body {
|
||||
overflow-x: hidden;
|
||||
}
|
||||
</style>
|
||||
|
||||
<% content_for :header do %>
|
||||
<header></header>
|
||||
<% end %>
|
||||
|
||||
<div class="row no-gutters m-n3">
|
||||
<div class="col-lg-8 col-md-12 bg-black">
|
||||
<div class="col-lg-9 col-md-12 bg-black vh-100">
|
||||
<div class="d-flex justify-content-start align-items-center flex-row p-3 mb-5 bg-dark">
|
||||
<%= product_wordmark(:direct_me, class: 'navbar-brand text-white') %>
|
||||
<div class="ml-4 dropdown">
|
||||
@@ -85,32 +91,34 @@
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4 col-md-12 bg-white p-3 min-vh-100 overflow-auto">
|
||||
<% unless controller.class.module_parent.to_s == "Public" %>
|
||||
<% if @multi_view_broadcasts.present? %>
|
||||
<% tokens = @multi_view_broadcasts.map(&:token) %>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-primary" id="broadcast_share_url" data-behavior="clipboard" href="<%= broadcast_url(@broadcast.token, multi_view_tokens: tokens) %>">Share URL</button>
|
||||
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<span class="sr-only">Toggle Dropdown</span>
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<%= link_to t('.actions.reset_url'), [@project, @broadcast], method: :patch, class: "dropdown-item" %>
|
||||
<div class="col-lg-3 col-md-12 bg-white vh-100 overflow-auto">
|
||||
<div class="px-3 pt-3">
|
||||
<% unless controller.class.module_parent.to_s == "Public" %>
|
||||
<% if @multi_view_broadcasts.present? %>
|
||||
<% tokens = @multi_view_broadcasts.map(&:token) %>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-primary" id="broadcast_share_url" data-behavior="clipboard" href="<%= broadcast_url(@broadcast.token, multi_view_tokens: tokens) %>">Share URL</button>
|
||||
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<span class="sr-only">Toggle Dropdown</span>
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<%= link_to t('.actions.reset_url'), [@project, @broadcast], method: :patch, class: "dropdown-item" %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-primary" id="broadcast_share_url" data-behavior="clipboard" href="<%= broadcast_url(@broadcast.token) %>">Share URL</button>
|
||||
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<span class="sr-only">Toggle Dropdown</span>
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<%= link_to t('.actions.reset_url'), [@project, @broadcast], method: :patch, class: "dropdown-item" %>
|
||||
<% else %>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-primary" id="broadcast_share_url" data-behavior="clipboard" href="<%= broadcast_url(@broadcast.token) %>">Share URL</button>
|
||||
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<span class="sr-only">Toggle Dropdown</span>
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<%= link_to t('.actions.reset_url'), [@project, @broadcast], method: :patch, class: "dropdown-item" %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<%= link_to 'Video Conference', @conference_url, class: 'btn btn-primary', target: '_blank' %>
|
||||
<%= link_to 'Video Conference', @conference_url, class: 'btn btn-primary', target: '_blank' %>
|
||||
</div>
|
||||
<hr/>
|
||||
<ul class="nav nav-tabs override-nav-tabs mb-3">
|
||||
<li class="nav-item">
|
||||
@@ -125,21 +133,6 @@
|
||||
<div id="live_take">
|
||||
<%= render partial: 'broadcasts/live_take', locals: { broadcast: @broadcast } %>
|
||||
</div>
|
||||
<% if params[:director_mode] %>
|
||||
<% if controller.class.module_parent.to_s == "Public" %>
|
||||
<%= link_to "Play #{@broadcast.name.titleize}", url_for(params.permit!.merge(director_mode: true, token: @broadcast.token)), data: { behavior: "play_stream"}, class: "mt-2 btn btn-primary" %>
|
||||
<% else %>
|
||||
<%= link_to "Play #{@broadcast.name.titleize}", url_for(params.permit!.merge(director_mode: true, id: @broadcast.id)), data: { behavior: "play_stream"}, class: "mt-2 btn btn-primary" %>
|
||||
<% end %>
|
||||
<hr/>
|
||||
<% else %>
|
||||
<% if controller.class.module_parent.to_s == "Public" %>
|
||||
<%= link_to "Play #{@broadcast.name.titleize}", url_for(params.permit!.merge(token: @broadcast.token).except(:director_mode)), data: { behavior: "play_stream"}, class: "mt-2 btn btn-primary" %>
|
||||
<% else %>
|
||||
<%= link_to "Play #{@broadcast.name.titleize}", url_for(params.permit!.merge(id: @broadcast.id).except(:director_mode)), data: { behavior: "play_stream"}, class: "mt-2 btn btn-primary" %>
|
||||
<% end %>
|
||||
<hr/>
|
||||
<% end %>
|
||||
<div id="broadcast_recordings">
|
||||
<%= render partial: 'broadcasts/broadcast_recordings', locals: { recordings: @recordings, broadcast: @broadcast } %>
|
||||
</div>
|
||||
@@ -153,12 +146,12 @@
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<div class="tab-content pt-4">
|
||||
<div class="tab-content">
|
||||
<% @multi_view_broadcasts.each_with_index do |mvb, index| %>
|
||||
<div class="<%= class_string("tab-pane fade show", "active" => (params[:active_files_tab] == mvb.token || (params[:active_files_tab].nil? && index == 0))) %>" id="files_broadcast_<%= mvb.token %>">
|
||||
<%= render partial: 'broadcasts/files_section', locals: { broadcast: mvb, files: mvb.files } %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% else %>
|
||||
<%= render partial: 'broadcasts/files_section', locals: { broadcast: @broadcast, files: @files } %>
|
||||
|
||||
37
app/views/contracts/_logo_page.html.erb
Normal file
37
app/views/contracts/_logo_page.html.erb
Normal file
@@ -0,0 +1,37 @@
|
||||
<% has_logo = local_assigns[:logo] %>
|
||||
<% has_user_photo = releasable.model_name == "AppearanceRelease" && releasable.person_photo.attached? %>
|
||||
|
||||
<% if has_logo || has_user_photo %>
|
||||
<table class="heading-table">
|
||||
<tr>
|
||||
<td>
|
||||
<% if has_logo %>
|
||||
<div class="logo">
|
||||
<%= render "blank_contracts/logo", logo: logo %>
|
||||
</div>
|
||||
<% end %>
|
||||
</td>
|
||||
<td class="embed-person-photo">
|
||||
<% if has_user_photo %>
|
||||
<%= image_tag releasable.photos.first.variant(auto_orient: true, resize: "200x200"), id: "top-person-photo" %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<hr>
|
||||
<% end %>
|
||||
|
||||
<% if preview %>
|
||||
<h1>PREVIEW ONLY</h1>
|
||||
<% end %>
|
||||
|
||||
<% if contract_template.body.present? %>
|
||||
<%= contract_template.body %>
|
||||
<br/>
|
||||
<% end %>
|
||||
|
||||
<% if releasable.minor? && contract_template.guardian_clause.present? %>
|
||||
<p class="text-left"><strong>Guardian Clause</strong></p>
|
||||
<%= contract_template.guardian_clause %>
|
||||
<% end %>
|
||||
@@ -1,33 +1,12 @@
|
||||
<% if local_assigns[:logo] %>
|
||||
<div class="logo">
|
||||
<%= render "contracts/logo", logo: logo %>
|
||||
<% logo = local_assigns[:logo] ? local_assigns[:logo] : nil %>
|
||||
|
||||
<% if logo || (releasable.model_name == 'AppearanceRelease' && releasable.person_photo.attached?) ||
|
||||
contract_template.body.present? || (releasable.minor? && contract_template.guardian_clause.present?) %>
|
||||
<div class="page">
|
||||
<%= render "contracts/logo_page", logo: logo, preview: preview, releasable: releasable, contract_template: contract_template %>
|
||||
</div>
|
||||
<hr>
|
||||
<% end %>
|
||||
|
||||
<div class="page">
|
||||
<% if preview %>
|
||||
<h1>PREVIEW ONLY</h1>
|
||||
<% end %>
|
||||
|
||||
<% if releasable.model_name == "AppearanceRelease" && releasable.person_photo.attached? %>
|
||||
<div class="embed-person-photo">
|
||||
<%= image_tag releasable.photos.first.variant(auto_orient: true, resize: "200x200"), id: "top-person-photo" %>
|
||||
</div>
|
||||
<hr>
|
||||
<% end %>
|
||||
|
||||
<% if contract_template.body.present? %>
|
||||
<%= contract_template.body %>
|
||||
<br/>
|
||||
<% end %>
|
||||
|
||||
<% if releasable.minor? && contract_template.guardian_clause.present? %>
|
||||
<p class="text-left"><strong>Guardian Clause</strong></p>
|
||||
<%= contract_template.guardian_clause %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% if contract_template.present? && contract_template.has_questionnaire? %>
|
||||
<div class="page">
|
||||
<%= render "contracts/questionnaire", releasable: releasable, contract_template: contract_template, preview: preview %>
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<input id="total_entries" type=hidden value=<%= @location_releases.total_entries %> />
|
||||
<div class="d-md-flex d-sm-flex flex-sm-column flex-md-row flex-md-wrap mb-3">
|
||||
<% if policy(LocationRelease).new? %>
|
||||
<%= link_to fa_icon("plus", text: t(".actions.new")), [:new, @project, :location_release], class: "btn btn-primary mr-2 mb-2" %>
|
||||
<div class="mr-auto">
|
||||
<%= link_to fa_icon("plus", text: t(".actions.new")), [:new, @project, :location_release], class: "btn btn-primary mr-2 mb-2" %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if @location_releases.any? && policy(LocationRelease).tag_multiple? %>
|
||||
@@ -10,7 +13,7 @@
|
||||
<% end %>
|
||||
|
||||
<% if @location_releases.any? && policy(LocationRelease).download_multiple? %>
|
||||
<%= link_to "Download All", [@project, :contract_downloads, release_type: @location_releases.name], method: :post, remote: true, class: "btn btn-light border ml-auto mr-2 mb-2", data: {
|
||||
<%= button_to "Download", [@project, :contract_downloads, release_type: @location_releases.name], id: "download_releases", method: :post, remote: true, class: "btn btn-light border mr-2 mb-2", data: {
|
||||
disable_with: "Please wait..." } %>
|
||||
<% end %>
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
$("#location_releases").html("<%= j render(@location_releases) %>");
|
||||
$("form input[type='search']").val("<%= params[:query] %>");
|
||||
$("#location_releases_pagination").html("<%= j will_paginate(@location_releases) %>");
|
||||
$("#selected_releases_form").attr('data-releasable-ids', JSON.stringify([]));
|
||||
$("#total_entries").val(<%= @location_releases.total_entries %>);
|
||||
1
app/views/locked_accounts/index.html.erb
Normal file
1
app/views/locked_accounts/index.html.erb
Normal file
@@ -0,0 +1 @@
|
||||
<p><%= t '.account_locked_message' %></p>
|
||||
@@ -42,7 +42,7 @@
|
||||
<%= link_to fa_icon("tags fw", text: "Tags"), [:new, material_release, :acts_as_taggable_on_tag], class: "dropdown-item", remote: true %>
|
||||
<% end %>
|
||||
<% if policy(material_release).edit_files? %>
|
||||
<%= link_to fa_icon("file-o fw", text: "Add Media"), [:edit, material_release, :files], class: "dropdown-item" %>
|
||||
<%= link_to fa_icon("file-o fw", text: "Media"), [:edit, material_release, :files], class: "dropdown-item" %>
|
||||
<% end %>
|
||||
<% if policy(Contract).show? && (material_release.contract.attached? || material_release.contract_template.present?) %>
|
||||
<%= link_to fa_icon("download fw", text: "Download"), [material_release, :contracts, format: "pdf"], class: "dropdown-item", target: "_blank" %>
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<input id="total_entries" type=hidden value=<%= @material_releases.total_entries %> />
|
||||
<div class="d-md-flex d-sm-flex flex-sm-column flex-md-row flex-md-wrap mb-3">
|
||||
<% if policy(MaterialRelease).new? %>
|
||||
<%= link_to fa_icon("plus", text: t(".actions.new")), [:new, @project, :material_release], class: "btn btn-primary mr-2 mb-2" %>
|
||||
<div class="mr-auto">
|
||||
<%= link_to fa_icon("plus", text: t(".actions.new")), [:new, @project, :material_release], class: "btn btn-primary mr-2 mb-2" %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if @material_releases.any? && policy(MaterialRelease).tag_multiple? %>
|
||||
@@ -10,7 +13,7 @@
|
||||
<% end %>
|
||||
|
||||
<% if @material_releases.any? && policy(MaterialRelease).download_multiple? %>
|
||||
<%= link_to "Download All", [@project, :contract_downloads, release_type: @material_releases.name], method: :post, remote: true, class: "btn btn-light border ml-auto mr-2 mb-2", data: {
|
||||
<%= button_to "Download", [@project, :contract_downloads, release_type: @material_releases.name], id: "download_releases", method: :post, remote: true, class: "btn btn-light border mr-2 mb-2", data: {
|
||||
disable_with: "Please wait..." } %>
|
||||
<% end %>
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
$("#material_releases").html("<%= j render(@material_releases) %>");
|
||||
$("form input[type='search']").val("<%= params[:query] %>");
|
||||
$("#material_releases_pagination").html("<%= j will_paginate(@material_releases) %>");
|
||||
$("#selected_releases_form").attr('data-releasable-ids', JSON.stringify([]));
|
||||
$("#total_entries").val(<%= @material_releases.total_entries %>);
|
||||
@@ -1,12 +1,15 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<input id="total_entries" type=hidden value=<%= @medical_releases.total_entries %> />
|
||||
<div class="d-md-flex d-sm-flex flex-sm-column flex-md-row flex-md-wrap mb-3">
|
||||
<% if @medical_releases.any? && policy(MedicalRelease).tag_multiple? %>
|
||||
<%= button_to_bulk_tagging(@project) %>
|
||||
<div class="ml-auto">
|
||||
<%= button_to_bulk_tagging(@project) %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if @medical_releases.any? && policy(MedicalRelease).download_multiple? %>
|
||||
<%= link_to "Download All", [@project, :contract_downloads, release_type: @medical_releases.name], method: :post, remote: true, class: "btn btn-light border ml-auto mr-2 mb-2", data: {
|
||||
<%= button_to "Download", [@project, :contract_downloads, release_type: @medical_releases.name], id: "download_releases", method: :post, remote: true, class: "btn btn-light border mr-2 mb-2", data: {
|
||||
disable_with: "Please wait..." } %>
|
||||
<% end %>
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
$("#medical_releases").html("<%= j render(@medical_releases) %>");
|
||||
$("form input[type='search']").val("<%= params[:query] %>");
|
||||
$("#medical_releases_pagination").html("<%= j will_paginate(@medical_releases) %>");
|
||||
$("#selected_releases_form").attr('data-releasable-ids', JSON.stringify([]));
|
||||
$("#total_entries").val(<%= @medical_releases.total_entries %>);
|
||||
@@ -1,12 +1,15 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<input id="total_entries" type=hidden value=<%= @misc_releases.total_entries %> />
|
||||
<div class="d-md-flex d-sm-flex flex-sm-column flex-md-row flex-md-wrap mb-3">
|
||||
<% if @misc_releases.any? && policy(MiscRelease).tag_multiple? %>
|
||||
<%= button_to_bulk_tagging(@project) %>
|
||||
<div class="ml-auto">
|
||||
<%= button_to_bulk_tagging(@project) %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if @misc_releases.any? && policy(MiscRelease).download_multiple? %>
|
||||
<%= link_to "Download All", [@project, :contract_downloads, release_type: @misc_releases.name], method: :post, remote: true, class: "btn btn-light border ml-auto mr-2 mb-2", data: {
|
||||
<%= button_to "Download", [@project, :contract_downloads, release_type: @misc_releases.name], id: "download_releases", method: :post, remote: true, class: "btn btn-light border mr-2 mb-2", data: {
|
||||
disable_with: "Please wait..." } %>
|
||||
<% end %>
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
$("#misc_releases").html("<%= j render(@misc_releases) %>");
|
||||
$("form input[type='search']").val("<%= params[:query] %>");
|
||||
$("#misc_releases_pagination").html("<%= j will_paginate(@misc_releases) %>");
|
||||
$("#selected_releases_form").attr('data-releasable-ids', JSON.stringify([]));
|
||||
$("#total_entries").val(<%= @misc_releases.total_entries %>);
|
||||
@@ -1,8 +1,11 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<input id="total_entries" type=hidden value=<%= @music_releases.total_entries %> />
|
||||
<div class="d-md-flex d-sm-flex flex-sm-column flex-md-row flex-md-wrap mb-3">
|
||||
<% if policy(MusicRelease).new? %>
|
||||
<%= link_to fa_icon("plus", text: t(".actions.new")), [:new, @project, :music_release], class: "btn btn-primary mr-2 mb-2" %>
|
||||
<div class="mr-auto">
|
||||
<%= link_to fa_icon("plus", text: t(".actions.new")), [:new, @project, :music_release], class: "btn btn-primary mr-2 mb-2" %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if @music_releases.any? && policy(MusicRelease).tag_multiple? %>
|
||||
@@ -10,7 +13,7 @@
|
||||
<% end %>
|
||||
|
||||
<% if @music_releases.any? && policy(MusicRelease).download_multiple? %>
|
||||
<%= link_to "Download All", [@project, :contract_downloads, release_type: @music_releases.name], method: :post, remote: true, class: "btn btn-light border ml-auto mr-2 mb-2" %>
|
||||
<%= button_to "Download", [@project, :contract_downloads, release_type: @music_releases.name], id: "download_releases", method: :post, remote: true, class: "btn btn-light border mr-2 mb-2" %>
|
||||
<% end %>
|
||||
|
||||
<%= bootstrap_form_with url: [@project, :music_releases], method: :get, remote: true, layout: :inline, id: "search" do |form| %>
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
$("#music_releases").html("<%= j render(@music_releases) %>");
|
||||
$("form input[type='search']").val("<%= params[:query] %>");
|
||||
$("#music_releases_pagination").html("<%= j will_paginate(@music_releases) %>");
|
||||
$("#selected_releases_form").attr('data-releasable-ids', JSON.stringify([]));
|
||||
$("#total_entries").val(<%= @music_releases.total_entries %>);
|
||||
@@ -14,4 +14,5 @@
|
||||
data-file-input-id="releasable_files"
|
||||
data-existing-files="<%= mock_photos_json(releasable.files) %>"
|
||||
data-placeholder="<%= dropzone_placeholder_message_for(releasable) %>"
|
||||
data-submit-button="#submit_folder"></div>
|
||||
data-submit-button="#submit_folder"
|
||||
data-max-file-size="<%= dropzone_file_size_limit_for(releasable) %>"></div>
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<input id="total_entries" type=hidden value=<%= @talent_releases.total_entries %> />
|
||||
<div class="d-md-flex d-sm-flex flex-sm-column flex-md-row flex-md-wrap mb-3">
|
||||
<% if policy(TalentRelease).new? %>
|
||||
<%= link_to fa_icon("plus", text: t(".actions.new")), [:new, @project, :talent_release], class: "btn btn-primary mr-2 mb-2" %>
|
||||
<div class="mr-auto">
|
||||
<%= link_to fa_icon("plus", text: t(".actions.new")), [:new, @project, :talent_release], class: "btn btn-primary mr-2 mb-2" %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if @talent_releases.any? && policy(TalentRelease).tag_multiple? %>
|
||||
@@ -10,7 +13,7 @@
|
||||
<% end %>
|
||||
|
||||
<% if @talent_releases.any? && policy(TalentRelease).download_multiple? %>
|
||||
<%= link_to "Download All", [@project, :contract_downloads, release_type: @talent_releases.name], method: :post, remote: true, class: "btn btn-light border ml-auto mr-2 mb-2", data: {
|
||||
<%= button_to "Download", [@project, :contract_downloads, release_type: @talent_releases.name], id: "download_releases", method: :post, remote: true, class: "btn btn-light border mr-2 mb-2", data: {
|
||||
disable_with: "Please wait..." } %>
|
||||
<% end %>
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
$("#talent_releases").html("<%= j render(@talent_releases) %>");
|
||||
$("form input[type='search']").val("<%= params[:query] %>");
|
||||
$("#talent_releases_pagination").html("<%= j will_paginate(@talent_releases) %>");
|
||||
$("#selected_releases_form").attr('data-releasable-ids', JSON.stringify([]));
|
||||
$("#total_entries").val(<%= @talent_releases.total_entries %>);
|
||||
Reference in New Issue
Block a user