Compare commits
3 Commits
prevent-AP
...
add-amendm
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a1b45ce85a | ||
|
|
1134424e37 | ||
|
|
ee710d7cd1 |
10
.env.sample
10
.env.sample
@@ -7,6 +7,8 @@ AWS_SECRET_ACCESS_KEY=
|
|||||||
AWS_REGION=
|
AWS_REGION=
|
||||||
|
|
||||||
BRAYNIAC_AI_API_ENDPOINT=https://z99cprg2eg.execute-api.us-east-1.amazonaws.com/dev/v0.0.1
|
BRAYNIAC_AI_API_ENDPOINT=https://z99cprg2eg.execute-api.us-east-1.amazonaws.com/dev/v0.0.1
|
||||||
|
SOURCE_AUDIO_API_ENDPOINT=https://bigmedia.sourceaudio.com/api
|
||||||
|
SOURCE_AUDIO_TOKEN=
|
||||||
|
|
||||||
# Optional
|
# Optional
|
||||||
REDIS_URL=
|
REDIS_URL=
|
||||||
@@ -14,6 +16,7 @@ REDIS_URL=
|
|||||||
# Required for Zoom.us integration
|
# Required for Zoom.us integration
|
||||||
ZOOM_API_KEY=
|
ZOOM_API_KEY=
|
||||||
ZOOM_API_SECRET=
|
ZOOM_API_SECRET=
|
||||||
|
ZOOM_ACCOUNT_NUMBER=
|
||||||
ZOOM_PRO_USERS_LIMIT= # defaults to 3
|
ZOOM_PRO_USERS_LIMIT= # defaults to 3
|
||||||
ZOOM_USER_TYPE= # 'pro' / 'basic'
|
ZOOM_USER_TYPE= # 'pro' / 'basic'
|
||||||
ZOOM_ENABLE_RECORDINGS= # true / false (default: false)
|
ZOOM_ENABLE_RECORDINGS= # true / false (default: false)
|
||||||
@@ -25,10 +28,3 @@ MUX_TOKEN_ID=
|
|||||||
MUX_TOKEN_SECRET=
|
MUX_TOKEN_SECRET=
|
||||||
MUX_BROADCAST_SERVER_URL=rtmp://global-live.mux.com:5222/app
|
MUX_BROADCAST_SERVER_URL=rtmp://global-live.mux.com:5222/app
|
||||||
MUX_TEST_MODE_DISABLED=
|
MUX_TEST_MODE_DISABLED=
|
||||||
|
|
||||||
# Required for creating user through API
|
|
||||||
CUSTOM_API_TOKEN=
|
|
||||||
|
|
||||||
# Required for simulcasting to Millicast for director mode
|
|
||||||
MILLICAST_API_SECRET=
|
|
||||||
MILLICAST_ACCOUNT_ID=
|
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ class AcquiredMediaReleasesController < ApplicationController
|
|||||||
@acquired_media_release = build_acquired_media_release(acquired_media_release_params)
|
@acquired_media_release = build_acquired_media_release(acquired_media_release_params)
|
||||||
|
|
||||||
if @acquired_media_release.save
|
if @acquired_media_release.save
|
||||||
|
log_create_analytics
|
||||||
SetTagsForReleasableJob.perform_later(@acquired_media_release)
|
SetTagsForReleasableJob.perform_later(@acquired_media_release)
|
||||||
redirect_to [@project, :acquired_media_releases], notice: t(".notice")
|
redirect_to [@project, :acquired_media_releases], notice: t(".notice")
|
||||||
else
|
else
|
||||||
@@ -118,8 +119,11 @@ class AcquiredMediaReleasesController < ApplicationController
|
|||||||
:term_id, :term_text,
|
:term_id, :term_text,
|
||||||
:restriction_id, :restriction_text,
|
:restriction_id, :restriction_text,
|
||||||
categories: [],
|
categories: [],
|
||||||
files: []
|
file_infos_attributes: %i[
|
||||||
)
|
filename
|
||||||
|
content_type
|
||||||
|
byte_size
|
||||||
|
])
|
||||||
end
|
end
|
||||||
|
|
||||||
def build_acquired_media_release(attrs = {})
|
def build_acquired_media_release(attrs = {})
|
||||||
@@ -135,4 +139,8 @@ class AcquiredMediaReleasesController < ApplicationController
|
|||||||
|
|
||||||
results
|
results
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def log_create_analytics
|
||||||
|
TrackAnalyticsJob.perform_later(Current.user, Current.account, :track_create_non_native_release, release_type: AcquiredMediaRelease.to_s, user_agent: request.user_agent, user_ip: request.remote_ip)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -19,11 +19,6 @@ class Admin::BroadcastsController < Admin::ApplicationController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def broadcast_update_params
|
def broadcast_update_params
|
||||||
params.require(:broadcast).permit(
|
params.require(:broadcast).permit(:stream_url_override, :stream_key_override, :director_mode_video_embed)
|
||||||
:video_conference_url_override,
|
|
||||||
:stream_url_override,
|
|
||||||
:stream_key_override,
|
|
||||||
:director_mode_video_embed
|
|
||||||
)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ class Api::ReleasesController < Api::ApiController
|
|||||||
release.contract_template_id = @contract_template.id
|
release.contract_template_id = @contract_template.id
|
||||||
handle_attachments(release, release_create_params[:photos])
|
handle_attachments(release, release_create_params[:photos])
|
||||||
release.save!(context: :native)
|
release.save!(context: :native)
|
||||||
|
log_create_analytics
|
||||||
after_create(release)
|
after_create(release)
|
||||||
handle_response(release, :created)
|
handle_response(release, :created)
|
||||||
end
|
end
|
||||||
@@ -180,4 +181,8 @@ class Api::ReleasesController < Api::ApiController
|
|||||||
parameters = parameters.slice(*keys).except(:created_at, :updated_at, :id, :user_id, :signature)
|
parameters = parameters.slice(*keys).except(:created_at, :updated_at, :id, :user_id, :signature)
|
||||||
parameters
|
parameters
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def log_create_analytics
|
||||||
|
TrackAnalyticsJob.perform_later(Current.user, Current.account, :track_create_native_release, release_type: model_constant.to_s, account: @account, user_agent: request.user_agent, user_ip: request.remote_ip, application: :ios)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,13 +1,5 @@
|
|||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
require './lib/knock_monkeypatch'
|
|
||||||
|
|
||||||
class Api::UserTokenController < Knock::AuthTokenController
|
class Api::UserTokenController < Knock::AuthTokenController
|
||||||
include Oath::ControllerHelpers
|
|
||||||
include RememberMe::Controller
|
|
||||||
|
|
||||||
skip_before_action :verify_authenticity_token
|
skip_before_action :verify_authenticity_token
|
||||||
before_action :sign_in_user
|
|
||||||
|
|
||||||
rescue_from Exception, :with => :return_error
|
rescue_from Exception, :with => :return_error
|
||||||
|
|
||||||
@@ -43,10 +35,4 @@ class Api::UserTokenController < Knock::AuthTokenController
|
|||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
|
||||||
|
|
||||||
def sign_in_user
|
|
||||||
sign_in(entity)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,33 +0,0 @@
|
|||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
class Api::UsersController < Api::ApiController
|
|
||||||
skip_before_action :authenticate_user
|
|
||||||
before_action :verify_custom_token, only: :create
|
|
||||||
|
|
||||||
def create
|
|
||||||
if user_params[:email].nil? || user_params[:password].nil?
|
|
||||||
raise ActionController::ParameterMissing.new 'Missing email or password'
|
|
||||||
end
|
|
||||||
|
|
||||||
user = Oath::Services::SignUp.new(user_params).perform
|
|
||||||
render json: user.slice(:email, :created_at, :first_name, :last_name)
|
|
||||||
end
|
|
||||||
|
|
||||||
private
|
|
||||||
|
|
||||||
def user_params
|
|
||||||
params.require(:user).permit(%i[
|
|
||||||
email
|
|
||||||
password
|
|
||||||
first_name
|
|
||||||
last_name
|
|
||||||
])
|
|
||||||
end
|
|
||||||
|
|
||||||
def verify_custom_token
|
|
||||||
if token.blank? || token != ENV['CUSTOM_API_TOKEN']
|
|
||||||
unauthorized_entity(:user)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -18,6 +18,7 @@ class AppearanceReleasesController < ApplicationController
|
|||||||
@appearance_release = build_appearance_release(appearance_release_params)
|
@appearance_release = build_appearance_release(appearance_release_params)
|
||||||
|
|
||||||
if @appearance_release.save(context: :non_native)
|
if @appearance_release.save(context: :non_native)
|
||||||
|
log_create_analytics
|
||||||
AddHeadshotCollectionUidToProjectJob.perform_later(@project)
|
AddHeadshotCollectionUidToProjectJob.perform_later(@project)
|
||||||
SetTagsForReleasableJob.perform_later(@appearance_release)
|
SetTagsForReleasableJob.perform_later(@appearance_release)
|
||||||
redirect_to [@project, :appearance_releases], notice: "The release has been imported. #{link_to_import_another}"
|
redirect_to [@project, :appearance_releases], notice: "The release has been imported. #{link_to_import_another}"
|
||||||
@@ -126,4 +127,8 @@ class AppearanceReleasesController < ApplicationController
|
|||||||
def link_to_import_another
|
def link_to_import_another
|
||||||
view_context.link_to "Import Another", [:new, @project, :appearance_release]
|
view_context.link_to "Import Another", [:new, @project, :appearance_release]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def log_create_analytics
|
||||||
|
TrackAnalyticsJob.perform_later(Current.user, Current.account, :track_create_non_native_release, release_type: AppearanceRelease.to_s, user_agent: request.user_agent, user_ip: request.remote_ip)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -6,12 +6,9 @@ class ApprovalsController < ApplicationController
|
|||||||
|
|
||||||
def create
|
def create
|
||||||
@releasable.approve_by(current_user)
|
@releasable.approve_by(current_user)
|
||||||
@releasable.approved_by_user_signature.attach(approved_by_user_signature_params) if signature_data.present?
|
|
||||||
|
|
||||||
if @releasable.save(context: :approval)
|
if @releasable.save
|
||||||
redirect_to [@project, "#{@releasable_param.name.pluralize}"], notice: t('.release_approved', release_type: @releasable.model_name.human)
|
redirect_to [@project, "#{@releasable_param.name.pluralize}"], notice: t('.release_approved', release_type: @releasable.model_name.human)
|
||||||
else
|
|
||||||
render :new
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -28,21 +25,4 @@ class ApprovalsController < ApplicationController
|
|||||||
def set_project
|
def set_project
|
||||||
@project = @releasable.project
|
@project = @releasable.project
|
||||||
end
|
end
|
||||||
|
|
||||||
def releasable_params
|
|
||||||
params.require(releasable_param.name).permit(approved_by_user_signature: :data)
|
|
||||||
end
|
|
||||||
|
|
||||||
def signature_data
|
|
||||||
releasable_params.dig(:approved_by_user_signature, :data)
|
|
||||||
end
|
|
||||||
|
|
||||||
def approved_by_user_signature_params
|
|
||||||
{
|
|
||||||
data: signature_data,
|
|
||||||
filename: "approved_by_user_signature.png",
|
|
||||||
content_type: "image/png",
|
|
||||||
identify: false,
|
|
||||||
}
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -23,13 +23,10 @@ class BroadcastsController < ApplicationController
|
|||||||
else
|
else
|
||||||
render :new
|
render :new
|
||||||
end
|
end
|
||||||
rescue MuxRuby::ApiError, ActiveResource::ConnectionError => e
|
|
||||||
Raven.capture_exception(e)
|
|
||||||
redirect_to [@project, :broadcasts], alert: t(".alert")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def show
|
def show
|
||||||
@conference_url = conference_url_for(@broadcast)
|
@conference_url = url_for [@broadcast.project, @broadcast, :zoom_meeting]
|
||||||
@recordings = @broadcast.broadcast_recordings.visible.order_by_recent.paginate(page: params[:page])
|
@recordings = @broadcast.broadcast_recordings.visible.order_by_recent.paginate(page: params[:page])
|
||||||
@files = @broadcast.files.order("created_at DESC").paginate(page: params[:files_page])
|
@files = @broadcast.files.order("created_at DESC").paginate(page: params[:files_page])
|
||||||
render layout: 'application'
|
render layout: 'application'
|
||||||
@@ -112,10 +109,6 @@ class BroadcastsController < ApplicationController
|
|||||||
results
|
results
|
||||||
end
|
end
|
||||||
|
|
||||||
def conference_url_for(broadcast)
|
|
||||||
broadcast.video_conference_url_override || url_for([broadcast.project, broadcast, :zoom_meeting])
|
|
||||||
end
|
|
||||||
|
|
||||||
def log_create_analytics
|
def log_create_analytics
|
||||||
TrackAnalyticsJob.perform_later(Current.user, Current.account, :track_create_live_stream, user_agent: request.user_agent, user_ip: request.remote_ip)
|
TrackAnalyticsJob.perform_later(Current.user, Current.account, :track_create_live_stream, user_agent: request.user_agent, user_ip: request.remote_ip)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ class ContractTemplatesController < ApplicationController
|
|||||||
contract = Contract.new releasable_instance, true
|
contract = Contract.new releasable_instance, true
|
||||||
send_file contract.to_pdf, download_attributes
|
send_file contract.to_pdf, download_attributes
|
||||||
elsif @contract_template.save
|
elsif @contract_template.save
|
||||||
log_create_analytics
|
|
||||||
redirect_to [@project, :contract_templates], notice: t('.notice')
|
redirect_to [@project, :contract_templates], notice: t('.notice')
|
||||||
else
|
else
|
||||||
@release_type = contract_template_params[:release_type]
|
@release_type = contract_template_params[:release_type]
|
||||||
@@ -95,9 +94,7 @@ class ContractTemplatesController < ApplicationController
|
|||||||
:question_9_text, :question_10_text,
|
:question_9_text, :question_10_text,
|
||||||
:question_11_text, :question_12_text,
|
:question_11_text, :question_12_text,
|
||||||
:question_13_text, :question_14_text,
|
:question_13_text, :question_14_text,
|
||||||
:question_15_text, :questionnaire_legal_text,
|
:question_15_text)
|
||||||
:exhibit_a_legal_text, :exhibit_a_question_text,
|
|
||||||
:exhibit_b_legal_text, :exhibit_b_question_text)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def download_attributes
|
def download_attributes
|
||||||
@@ -107,8 +104,4 @@ class ContractTemplatesController < ApplicationController
|
|||||||
type: 'application/pdf'
|
type: 'application/pdf'
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
def log_create_analytics
|
|
||||||
TrackAnalyticsJob.perform_later(Current.user, Current.account, :track_create_contract_template, user_agent: request.user_agent, user_ip: request.remote_ip)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class FilesController < ApplicationController
|
class FileInfosController < ApplicationController
|
||||||
before_action :set_releasable
|
before_action :set_releasable
|
||||||
|
|
||||||
layout "project"
|
layout "project"
|
||||||
@@ -16,7 +16,7 @@ class FilesController < ApplicationController
|
|||||||
|
|
||||||
if @releasable.update(releasable_params)
|
if @releasable.update(releasable_params)
|
||||||
SetTagsForReleasableJob.perform_later(@releasable)
|
SetTagsForReleasableJob.perform_later(@releasable)
|
||||||
redirect_to [@project, @releasable.model_name.plural], notice: "Files added successfully to the release."
|
redirect_to [@project, @releasable.model_name.plural], notice: t(".notice")
|
||||||
else
|
else
|
||||||
render :edit
|
render :edit
|
||||||
end
|
end
|
||||||
@@ -29,10 +29,16 @@ class FilesController < ApplicationController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def set_releasable
|
def set_releasable
|
||||||
@releasable = authorize policy_scope(releasable_param.type).find(releasable_param.id), :edit_files?
|
@releasable = authorize policy_scope(releasable_param.type).find(releasable_param.id), :"#{action_name}_file_infos?"
|
||||||
end
|
end
|
||||||
|
|
||||||
def releasable_params
|
def releasable_params
|
||||||
params.fetch(releasable_param.name, {}).permit(files: [])
|
params.fetch(releasable_param.name, {}).permit(
|
||||||
|
file_infos_attributes: [
|
||||||
|
:filename,
|
||||||
|
:content_type,
|
||||||
|
:byte_size
|
||||||
|
],
|
||||||
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -18,6 +18,7 @@ class LocationReleasesController < ApplicationController
|
|||||||
@location_release = build_location_release(location_release_params)
|
@location_release = build_location_release(location_release_params)
|
||||||
|
|
||||||
if @location_release.save
|
if @location_release.save
|
||||||
|
log_create_analytics
|
||||||
SetTagsForReleasableJob.perform_later(@location_release)
|
SetTagsForReleasableJob.perform_later(@location_release)
|
||||||
redirect_to [@project, :location_releases], notice: t(".notice")
|
redirect_to [@project, :location_releases], notice: t(".notice")
|
||||||
else
|
else
|
||||||
@@ -89,4 +90,8 @@ class LocationReleasesController < ApplicationController
|
|||||||
|
|
||||||
results
|
results
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def log_create_analytics
|
||||||
|
TrackAnalyticsJob.perform_later(Current.user, Current.account, :track_create_non_native_release, release_type: LocationRelease.to_s, user_agent: request.user_agent, user_ip: request.remote_ip)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ class MaterialReleasesController < ApplicationController
|
|||||||
@material_release = build_material_release(material_release_params)
|
@material_release = build_material_release(material_release_params)
|
||||||
|
|
||||||
if @material_release.save
|
if @material_release.save
|
||||||
|
log_create_analytics
|
||||||
SetTagsForReleasableJob.perform_later(@material_release)
|
SetTagsForReleasableJob.perform_later(@material_release)
|
||||||
redirect_to [@project, :material_releases], notice: t(".notice")
|
redirect_to [@project, :material_releases], notice: t(".notice")
|
||||||
else
|
else
|
||||||
@@ -135,4 +136,8 @@ class MaterialReleasesController < ApplicationController
|
|||||||
|
|
||||||
results
|
results
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def log_create_analytics
|
||||||
|
TrackAnalyticsJob.perform_later(Current.user, Current.account, :track_create_non_native_release, release_type: MaterialRelease.to_s, user_agent: request.user_agent, user_ip: request.remote_ip)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ class MusicReleasesController < ApplicationController
|
|||||||
@music_release = build_music_release(music_release_params)
|
@music_release = build_music_release(music_release_params)
|
||||||
|
|
||||||
if @music_release.save
|
if @music_release.save
|
||||||
|
log_create_analytics
|
||||||
SetTagsForReleasableJob.perform_later(@music_release)
|
SetTagsForReleasableJob.perform_later(@music_release)
|
||||||
redirect_to [@project, :music_releases], notice: t(".notice")
|
redirect_to [@project, :music_releases], notice: t(".notice")
|
||||||
else
|
else
|
||||||
@@ -110,4 +111,8 @@ class MusicReleasesController < ApplicationController
|
|||||||
|
|
||||||
results
|
results
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def log_create_analytics
|
||||||
|
TrackAnalyticsJob.perform_later(Current.user, Current.account, :track_create_non_native_release, release_type: MusicRelease.to_s, user_agent: request.user_agent, user_ip: request.remote_ip)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ class ProjectsController < ApplicationController
|
|||||||
before_action :set_project, only: [:show, :edit, :update, :destroy]
|
before_action :set_project, only: [:show, :edit, :update, :destroy]
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@projects = filtered_projects.order_by_name
|
@projects = policy_scope(Current.account.projects).order_by_name
|
||||||
end
|
end
|
||||||
|
|
||||||
def new
|
def new
|
||||||
@@ -46,20 +46,6 @@ class ProjectsController < ApplicationController
|
|||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def filtered_projects
|
|
||||||
results = projects
|
|
||||||
|
|
||||||
if params[:query].present?
|
|
||||||
results = results.search(params[:query])
|
|
||||||
end
|
|
||||||
|
|
||||||
results
|
|
||||||
end
|
|
||||||
|
|
||||||
def projects
|
|
||||||
authorize policy_scope(Current.account.projects)
|
|
||||||
end
|
|
||||||
|
|
||||||
def set_project
|
def set_project
|
||||||
@project = authorize projects.find(params[:id])
|
@project = authorize projects.find(params[:id])
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ class Public::AcquiredMediaReleasesController < Public::BaseController
|
|||||||
@acquired_media_release = build_acquired_media_release(acquired_media_release_params_with_locale_and_contract_template)
|
@acquired_media_release = build_acquired_media_release(acquired_media_release_params_with_locale_and_contract_template)
|
||||||
|
|
||||||
if @acquired_media_release.save(context: :native)
|
if @acquired_media_release.save(context: :native)
|
||||||
|
log_create_analytics
|
||||||
after_create(@acquired_media_release)
|
after_create(@acquired_media_release)
|
||||||
else
|
else
|
||||||
render :new
|
render :new
|
||||||
@@ -99,8 +100,11 @@ class Public::AcquiredMediaReleasesController < Public::BaseController
|
|||||||
:signature_base64,
|
:signature_base64,
|
||||||
:locale, :contract_template,
|
:locale, :contract_template,
|
||||||
categories: [],
|
categories: [],
|
||||||
files: []
|
file_infos_attributes: %i[
|
||||||
)
|
filename
|
||||||
|
content_type
|
||||||
|
byte_size
|
||||||
|
])
|
||||||
end
|
end
|
||||||
|
|
||||||
def acquired_media_release_params_with_locale
|
def acquired_media_release_params_with_locale
|
||||||
@@ -110,4 +114,8 @@ class Public::AcquiredMediaReleasesController < Public::BaseController
|
|||||||
def acquired_media_release_params_with_locale_and_contract_template
|
def acquired_media_release_params_with_locale_and_contract_template
|
||||||
acquired_media_release_params_with_locale.merge(contract_template: @contract_template)
|
acquired_media_release_params_with_locale.merge(contract_template: @contract_template)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def log_create_analytics
|
||||||
|
TrackAnalyticsJob.perform_later(nil, nil, :track_create_native_release, release_type: AcquiredMediaRelease.to_s, account: @account, user_agent: request.user_agent, user_ip: request.remote_ip)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ class Public::AppearanceReleasesController < Public::BaseController
|
|||||||
@appearance_release = build_appearance_release(appearance_release_params_with_locale_and_contract_template)
|
@appearance_release = build_appearance_release(appearance_release_params_with_locale_and_contract_template)
|
||||||
|
|
||||||
if @appearance_release.save(context: :native)
|
if @appearance_release.save(context: :native)
|
||||||
|
log_create_analytics
|
||||||
after_create(@appearance_release)
|
after_create(@appearance_release)
|
||||||
else
|
else
|
||||||
render :new
|
render :new
|
||||||
@@ -86,35 +87,12 @@ class Public::AppearanceReleasesController < Public::BaseController
|
|||||||
]
|
]
|
||||||
end
|
end
|
||||||
|
|
||||||
def questionnaire_params
|
|
||||||
[
|
|
||||||
:question_1_answer,
|
|
||||||
:question_2_answer,
|
|
||||||
:question_3_answer,
|
|
||||||
:question_4_answer,
|
|
||||||
:question_5_answer,
|
|
||||||
:question_6_answer,
|
|
||||||
:question_7_answer,
|
|
||||||
:question_8_answer,
|
|
||||||
:question_9_answer,
|
|
||||||
:question_10_answer,
|
|
||||||
:question_11_answer,
|
|
||||||
:question_12_answer,
|
|
||||||
:question_13_answer,
|
|
||||||
:question_14_answer,
|
|
||||||
:question_15_answer,
|
|
||||||
]
|
|
||||||
end
|
|
||||||
|
|
||||||
def appearance_release_params
|
def appearance_release_params
|
||||||
params.require(:appearance_release).permit(person_params, guardian_params,
|
params.require(:appearance_release).permit(person_params, guardian_params,
|
||||||
second_guardian_params,
|
second_guardian_params,
|
||||||
questionnaire_params,
|
|
||||||
:minor, :signature_base64,
|
:minor, :signature_base64,
|
||||||
:person_date_of_birth,
|
:person_date_of_birth,
|
||||||
:locale, :contract_template,
|
:locale, :contract_template)
|
||||||
:exhibit_a_answer, :exhibit_b_answer
|
|
||||||
)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def appearance_release_params_with_locale
|
def appearance_release_params_with_locale
|
||||||
@@ -124,4 +102,8 @@ class Public::AppearanceReleasesController < Public::BaseController
|
|||||||
def appearance_release_params_with_locale_and_contract_template
|
def appearance_release_params_with_locale_and_contract_template
|
||||||
appearance_release_params_with_locale.merge(contract_template: @contract_template)
|
appearance_release_params_with_locale.merge(contract_template: @contract_template)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def log_create_analytics
|
||||||
|
TrackAnalyticsJob.perform_later(nil, nil, :track_create_native_release, release_type: AppearanceRelease.to_s, account: @account, user_agent: request.user_agent, user_ip: request.remote_ip)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ class Public::BroadcastsController < Public::BaseController
|
|||||||
before_action :set_broadcast, only: [:show, :update]
|
before_action :set_broadcast, only: [:show, :update]
|
||||||
|
|
||||||
def show
|
def show
|
||||||
@conference_url = conference_url_for(@broadcast)
|
@conference_url = broadcast_zoom_meeting_url(@broadcast.token)
|
||||||
@multi_view_broadcasts = multi_view_broadcasts
|
@multi_view_broadcasts = multi_view_broadcasts
|
||||||
@recordings = @broadcast.broadcast_recordings.visible.order_by_recent.paginate(page: params[:page])
|
@recordings = @broadcast.broadcast_recordings.visible.order_by_recent.paginate(page: params[:page])
|
||||||
@files = @broadcast.files.order("created_at DESC").paginate(page: params[:files_page])
|
@files = @broadcast.files.order("created_at DESC").paginate(page: params[:files_page])
|
||||||
@@ -43,10 +43,6 @@ class Public::BroadcastsController < Public::BaseController
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def conference_url_for(broadcast)
|
|
||||||
broadcast.video_conference_url_override || broadcast_zoom_meeting_url(broadcast.token)
|
|
||||||
end
|
|
||||||
|
|
||||||
class MultiViewBroadcast
|
class MultiViewBroadcast
|
||||||
include Rails.application.routes.url_helpers
|
include Rails.application.routes.url_helpers
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ class Public::LocationReleasesController < Public::BaseController
|
|||||||
@location_release = build_location_release(location_release_params_with_locale_and_contract_template)
|
@location_release = build_location_release(location_release_params_with_locale_and_contract_template)
|
||||||
|
|
||||||
if @location_release.save(context: :native)
|
if @location_release.save(context: :native)
|
||||||
|
log_create_analytics
|
||||||
after_create(@location_release)
|
after_create(@location_release)
|
||||||
else
|
else
|
||||||
render :new
|
render :new
|
||||||
@@ -75,4 +76,8 @@ class Public::LocationReleasesController < Public::BaseController
|
|||||||
def location_release_params_with_locale_and_contract_template
|
def location_release_params_with_locale_and_contract_template
|
||||||
location_release_params_with_locale.merge(contract_template: @contract_template)
|
location_release_params_with_locale.merge(contract_template: @contract_template)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def log_create_analytics
|
||||||
|
TrackAnalyticsJob.perform_later(nil, nil, :track_create_native_release, release_type: LocationRelease.to_s, account: @account, user_agent: request.user_agent, user_ip: request.remote_ip)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ class Public::MaterialReleasesController < Public::BaseController
|
|||||||
@material_release = build_material_release(material_release_params_with_locale_and_contract_template)
|
@material_release = build_material_release(material_release_params_with_locale_and_contract_template)
|
||||||
|
|
||||||
if @material_release.save(context: :native)
|
if @material_release.save(context: :native)
|
||||||
|
log_create_analytics
|
||||||
after_create(@material_release)
|
after_create(@material_release)
|
||||||
else
|
else
|
||||||
render :new
|
render :new
|
||||||
@@ -103,4 +104,8 @@ class Public::MaterialReleasesController < Public::BaseController
|
|||||||
def material_release_params_with_locale_and_contract_template
|
def material_release_params_with_locale_and_contract_template
|
||||||
material_release_params_with_locale.merge(contract_template: @contract_template)
|
material_release_params_with_locale.merge(contract_template: @contract_template)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def log_create_analytics
|
||||||
|
TrackAnalyticsJob.perform_later(nil, nil, :track_create_native_release, release_type: MaterialRelease.to_s, account: @account, user_agent: request.user_agent, user_ip: request.remote_ip)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ class Public::MedicalReleasesController < Public::BaseController
|
|||||||
if @medical_release.contract_template.present?
|
if @medical_release.contract_template.present?
|
||||||
AttachContractToReleasableJob.perform_later(@medical_release)
|
AttachContractToReleasableJob.perform_later(@medical_release)
|
||||||
end
|
end
|
||||||
|
log_create_analytics
|
||||||
else
|
else
|
||||||
render :new
|
render :new
|
||||||
end
|
end
|
||||||
@@ -115,4 +116,8 @@ class Public::MedicalReleasesController < Public::BaseController
|
|||||||
def medical_release_params_with_locale_and_contract_template
|
def medical_release_params_with_locale_and_contract_template
|
||||||
medical_release_params_with_locale.merge(contract_template: @contract_template)
|
medical_release_params_with_locale.merge(contract_template: @contract_template)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def log_create_analytics
|
||||||
|
TrackAnalyticsJob.perform_later(nil, nil, :track_create_native_release, release_type: MedicalRelease.to_s, account: @account, user_agent: request.user_agent, user_ip: request.remote_ip)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ class Public::MiscReleasesController < Public::BaseController
|
|||||||
if @misc_release.contract_template.present?
|
if @misc_release.contract_template.present?
|
||||||
AttachContractToReleasableJob.perform_later(@misc_release)
|
AttachContractToReleasableJob.perform_later(@misc_release)
|
||||||
end
|
end
|
||||||
|
log_create_analytics
|
||||||
else
|
else
|
||||||
render :new
|
render :new
|
||||||
end
|
end
|
||||||
@@ -49,14 +50,6 @@ class Public::MiscReleasesController < Public::BaseController
|
|||||||
:signature_base64,
|
:signature_base64,
|
||||||
:locale,
|
:locale,
|
||||||
:contract_template,
|
:contract_template,
|
||||||
:applicable_medium_id,
|
|
||||||
:applicable_medium_text,
|
|
||||||
:territory_id,
|
|
||||||
:territory_text,
|
|
||||||
:term_id,
|
|
||||||
:term_text,
|
|
||||||
:restriction_id,
|
|
||||||
:restriction_text,
|
|
||||||
photos: [],
|
photos: [],
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
@@ -120,4 +113,8 @@ class Public::MiscReleasesController < Public::BaseController
|
|||||||
def misc_release_params_with_locale_and_contract_template
|
def misc_release_params_with_locale_and_contract_template
|
||||||
misc_release_params_with_locale.merge(contract_template: @contract_template)
|
misc_release_params_with_locale.merge(contract_template: @contract_template)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def log_create_analytics
|
||||||
|
TrackAnalyticsJob.perform_later(nil, nil, :track_create_native_release, release_type: MiscRelease.to_s, account: @account, user_agent: request.user_agent, user_ip: request.remote_ip)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ class Public::TalentReleasesController < Public::BaseController
|
|||||||
@talent_release = build_talent_release(talent_release_params_with_locale_and_contract_template)
|
@talent_release = build_talent_release(talent_release_params_with_locale_and_contract_template)
|
||||||
|
|
||||||
if @talent_release.save(context: :native)
|
if @talent_release.save(context: :native)
|
||||||
|
log_create_analytics
|
||||||
after_create(@talent_release)
|
after_create(@talent_release)
|
||||||
else
|
else
|
||||||
render :new
|
render :new
|
||||||
@@ -107,4 +108,8 @@ class Public::TalentReleasesController < Public::BaseController
|
|||||||
def talent_release_params_with_locale_and_contract_template
|
def talent_release_params_with_locale_and_contract_template
|
||||||
talent_release_params_with_locale.merge(contract_template: @contract_template)
|
talent_release_params_with_locale.merge(contract_template: @contract_template)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def log_create_analytics
|
||||||
|
TrackAnalyticsJob.perform_later(nil, nil, :track_create_native_release, release_type: TalentRelease.to_s, account: @account, user_agent: request.user_agent, user_ip: request.remote_ip)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ class TalentReleasesController < ApplicationController
|
|||||||
@talent_release = build_talent_release(talent_release_params)
|
@talent_release = build_talent_release(talent_release_params)
|
||||||
|
|
||||||
if @talent_release.save
|
if @talent_release.save
|
||||||
|
log_create_analytics
|
||||||
AddHeadshotCollectionUidToProjectJob.perform_later(@project)
|
AddHeadshotCollectionUidToProjectJob.perform_later(@project)
|
||||||
SetTagsForReleasableJob.perform_later(@talent_release)
|
SetTagsForReleasableJob.perform_later(@talent_release)
|
||||||
redirect_to [@project, :talent_releases], notice: t(".notice")
|
redirect_to [@project, :talent_releases], notice: t(".notice")
|
||||||
@@ -136,4 +137,8 @@ class TalentReleasesController < ApplicationController
|
|||||||
|
|
||||||
results
|
results
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def log_create_analytics
|
||||||
|
TrackAnalyticsJob.perform_later(Current.user, Current.account, :track_create_non_native_release, release_type: TalentRelease.to_s, user_agent: request.user_agent, user_ip: request.remote_ip)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -6,6 +6,6 @@ module MailHelper
|
|||||||
"1. Tell us the name of the video: \n\n" \
|
"1. Tell us the name of the video: \n\n" \
|
||||||
"2. Attach each EDL to this email. Please make sure to indicate whether the EDL is a Video Only, Graphics Only, or Audio Only EDL."
|
"2. Attach each EDL to this email. Please make sure to indicate whether the EDL is a Video Only, Graphics Only, or Audio Only EDL."
|
||||||
|
|
||||||
mail_to "info@mesuite.ai", content, subject: subject, body: body
|
mail_to "info@bigmedia.ai", content, subject: subject, body: body
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -67,23 +67,6 @@ class ActiveStorageDropzone {
|
|||||||
var upload = new that.UploaderClass(file, url, delegate);
|
var upload = new that.UploaderClass(file, url, delegate);
|
||||||
createUpload(this, upload);
|
createUpload(this, upload);
|
||||||
});
|
});
|
||||||
|
|
||||||
this.on("addedfile", function(file) {
|
|
||||||
// Show download link in dropzone previews
|
|
||||||
|
|
||||||
let div = document.createElement("div");
|
|
||||||
let anchor = document.createElement("a");
|
|
||||||
let download_icon = "<i class='fa fa-download' aria-hidden='true'></i> Download";
|
|
||||||
|
|
||||||
anchor.innerHTML = download_icon;
|
|
||||||
anchor.href = file.dataURL;
|
|
||||||
anchor.setAttribute('target', '_blank');
|
|
||||||
anchor.setAttribute('style', 'background-color: rgba(255, 255, 255, 0.4); padding: 0 0.4em; border: 1px solid transparent; text-decoration: none;');
|
|
||||||
div.append(anchor);
|
|
||||||
div.setAttribute('class', 'dz-download-link')
|
|
||||||
div.setAttribute('style', 'margin-top: 1em;')
|
|
||||||
$(file.previewElement.childNodes[3]).append(div);
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
class AdminMailer < ApplicationMailer
|
class AdminMailer < ApplicationMailer
|
||||||
default to: %w[bray@mesuite.ai]
|
default to: %w(bray@bigmedia.ai lee@bigmedia.ai)
|
||||||
|
|
||||||
def new_video(video)
|
def new_video(video)
|
||||||
@video = video
|
@video = video
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class ApplicationMailer < ActionMailer::Base
|
class ApplicationMailer < ActionMailer::Base
|
||||||
default from: ENV.fetch("MAILER_FROM_ADDRESS") { "support@mesuite.ai" }
|
default from: ENV.fetch("MAILER_FROM_ADDRESS") { "support@bigmedia.ai" }
|
||||||
layout "mailer"
|
layout "mailer"
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -64,19 +64,6 @@ class Account < ApplicationRecord
|
|||||||
])).sum(:byte_size).to_f
|
])).sum(:byte_size).to_f
|
||||||
end
|
end
|
||||||
|
|
||||||
def total_number_of_releases
|
|
||||||
[
|
|
||||||
MiscRelease.where(project: projects).size,
|
|
||||||
AppearanceRelease.where(project: projects).size,
|
|
||||||
TalentRelease.where(project: projects).size,
|
|
||||||
MaterialRelease.where(project: projects).size,
|
|
||||||
MedicalRelease.where(project: projects).size,
|
|
||||||
LocationRelease.where(project: projects).size,
|
|
||||||
AcquiredMediaRelease.where(project: projects).size,
|
|
||||||
MusicRelease.where(project: projects).size
|
|
||||||
].sum
|
|
||||||
end
|
|
||||||
|
|
||||||
def to_param
|
def to_param
|
||||||
slug
|
slug
|
||||||
end
|
end
|
||||||
@@ -98,7 +85,7 @@ class Account < ApplicationRecord
|
|||||||
end
|
end
|
||||||
|
|
||||||
def taskme_enabled?
|
def taskme_enabled?
|
||||||
plan_uid.to_s == "me_suite" || plan_uid.to_s == "taskme"
|
ENV["TASKME_ENABLED"] && (plan_uid.to_s == "me_suite" || plan_uid.to_s == "taskme")
|
||||||
end
|
end
|
||||||
|
|
||||||
def plan_name
|
def plan_name
|
||||||
|
|||||||
@@ -18,14 +18,13 @@ class AcquiredMediaRelease < ApplicationRecord
|
|||||||
|
|
||||||
class << self
|
class << self
|
||||||
def custom_csv_exportable_headers
|
def custom_csv_exportable_headers
|
||||||
%i[name files_count owner_info]
|
%i[name file_infos_count]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# This association needs to be removed after changing the API. Removing it right now will cause failure in API specs.
|
|
||||||
has_many :file_infos, as: :releasable, dependent: :destroy
|
has_many :file_infos, as: :releasable, dependent: :destroy
|
||||||
|
|
||||||
has_many_attached :files
|
accepts_nested_attributes_for :file_infos
|
||||||
|
|
||||||
composed_of :person_address,
|
composed_of :person_address,
|
||||||
class_name: "Address",
|
class_name: "Address",
|
||||||
@@ -103,19 +102,7 @@ class AcquiredMediaRelease < ApplicationRecord
|
|||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
def files_count
|
def file_infos_count
|
||||||
files.any? ? files.size : I18n.t('acquired_media_releases.acquired_media_release.no_media')
|
file_infos.any? ? file_infos.size : I18n.t('acquired_media_releases.acquired_media_release.no_media')
|
||||||
end
|
|
||||||
|
|
||||||
def image_files
|
|
||||||
files_blobs.where("content_type ILIKE ?", "%image%")
|
|
||||||
end
|
|
||||||
|
|
||||||
def video_files
|
|
||||||
files_blobs.where("content_type ILIKE ?", "%video%")
|
|
||||||
end
|
|
||||||
|
|
||||||
def other_files
|
|
||||||
files_blobs.where("NOT content_type ILIKE ANY (array[?])", ["%image%", "%video%"])
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ class AppHost
|
|||||||
use_ssl: false,
|
use_ssl: false,
|
||||||
},
|
},
|
||||||
production: {
|
production: {
|
||||||
host: "mesuite.ai",
|
host: "bigmedia.ai",
|
||||||
use_ssl: true,
|
use_ssl: true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,8 +19,6 @@ class AppearanceRelease < ApplicationRecord
|
|||||||
include Approvable
|
include Approvable
|
||||||
include Amendmenable
|
include Amendmenable
|
||||||
|
|
||||||
NUMBER_OF_CUSTOM_FIELDS = 15
|
|
||||||
|
|
||||||
class << self
|
class << self
|
||||||
def custom_csv_exportable_headers
|
def custom_csv_exportable_headers
|
||||||
%i[name contact_info]
|
%i[name contact_info]
|
||||||
|
|||||||
@@ -49,13 +49,11 @@ class Broadcast < ApplicationRecord
|
|||||||
private
|
private
|
||||||
|
|
||||||
def create_mux_live_stream
|
def create_mux_live_stream
|
||||||
stream = MuxLiveStream.create_with_simulcast
|
stream = MuxLiveStream.new
|
||||||
|
|
||||||
self.stream_uid = stream.id
|
self.stream_uid = stream.id
|
||||||
self.stream_key = stream.key
|
self.stream_key = stream.key
|
||||||
self.stream_playback_uid = stream.playback_id
|
self.stream_playback_uid = stream.playback_id
|
||||||
self.simulcast_uid = stream.simulcast_id
|
|
||||||
self.director_mode_video_embed ||= stream.simulcast_destination.try(:playback_embed)
|
|
||||||
self.save!
|
self.save!
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -2,21 +2,12 @@ module Approvable
|
|||||||
extend ActiveSupport::Concern
|
extend ActiveSupport::Concern
|
||||||
|
|
||||||
included do
|
included do
|
||||||
include ActiveStorageSupport::SupportForBase64
|
|
||||||
|
|
||||||
has_one_base64_attached :approved_by_user_signature
|
|
||||||
|
|
||||||
# Requires signature when saving in the approval context
|
|
||||||
with_options on: :approval do
|
|
||||||
validates :approved_by_user_signature, attached: true
|
|
||||||
end
|
|
||||||
|
|
||||||
def approve_by(user)
|
def approve_by(user)
|
||||||
return unless approved_at.nil?
|
return unless approved_at.nil?
|
||||||
|
|
||||||
self.approved_by_user_name = user.full_name
|
self.approved_by_user_name = user.full_name
|
||||||
self.approved_by_user_email = user.email
|
self.approved_by_user_email = user.email
|
||||||
self.approved_at = BigMediaTime.time_zone_now
|
self.approved_at = Time.zone.now
|
||||||
end
|
end
|
||||||
|
|
||||||
def approved?
|
def approved?
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
module CsvExportable
|
module CsvExportable
|
||||||
extend ActiveSupport::Concern
|
extend ActiveSupport::Concern
|
||||||
|
|
||||||
COMMON_HEADERS = %i[approved notes tags signed_at].freeze
|
COMMON_HEADERS = %i[approved? notes tags signed_at].freeze
|
||||||
COMMON_VALUES = %w[approved? clean_notes clean_tags signed_on].freeze
|
COMMON_VALUES = %w[clean_notes clean_tags signed_on].freeze
|
||||||
|
|
||||||
included do
|
included do
|
||||||
class << self
|
class << self
|
||||||
@@ -29,20 +29,11 @@ module CsvExportable
|
|||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def owner_info
|
|
||||||
compact_contact_info(name: person_name, address: person_address, phone: person_phone, email: person_email)
|
|
||||||
end
|
|
||||||
|
|
||||||
def contact_info
|
def contact_info
|
||||||
owner_info
|
|
||||||
end
|
|
||||||
|
|
||||||
def compact_contact_info(name: nil, address: nil, phone: nil, email: nil)
|
|
||||||
contact_info = ''
|
contact_info = ''
|
||||||
contact_info += "#{name}; " if name.present?
|
contact_info += "#{person_address}; " if person_address.present?
|
||||||
contact_info += "#{address}; " if address.present?
|
contact_info += "P: #{person_phone}; " if person_phone.present?
|
||||||
contact_info += "P: #{phone}; " if phone.present?
|
contact_info += "E: #{person_email}" if person_email.present?
|
||||||
contact_info += "E: #{email}" if email.present?
|
|
||||||
contact_info.delete_suffix '; '
|
contact_info.delete_suffix '; '
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -23,9 +23,6 @@ class ContractTemplate < ApplicationRecord
|
|||||||
has_rich_text :guardian_clause
|
has_rich_text :guardian_clause
|
||||||
has_rich_text :signature_legal_text
|
has_rich_text :signature_legal_text
|
||||||
has_rich_text :amendment_clause
|
has_rich_text :amendment_clause
|
||||||
has_rich_text :exhibit_a_legal_text
|
|
||||||
has_rich_text :exhibit_b_legal_text
|
|
||||||
has_rich_text :questionnaire_legal_text
|
|
||||||
|
|
||||||
validates :name, presence: true
|
validates :name, presence: true
|
||||||
validates :release_type, presence: true
|
validates :release_type, presence: true
|
||||||
@@ -73,14 +70,6 @@ class ContractTemplate < ApplicationRecord
|
|||||||
(1..NUMBER_OF_CUSTOM_FIELDS).any? { |n| public_send("question_#{n}_text").presence }
|
(1..NUMBER_OF_CUSTOM_FIELDS).any? { |n| public_send("question_#{n}_text").presence }
|
||||||
end
|
end
|
||||||
|
|
||||||
def has_exhibit_a?
|
|
||||||
exhibit_a_legal_text.present?
|
|
||||||
end
|
|
||||||
|
|
||||||
def has_exhibit_b?
|
|
||||||
exhibit_b_legal_text.present?
|
|
||||||
end
|
|
||||||
|
|
||||||
def editable?
|
def editable?
|
||||||
releases.size.zero?
|
releases.size.zero?
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ class LocationRelease < ApplicationRecord
|
|||||||
|
|
||||||
class << self
|
class << self
|
||||||
def custom_csv_exportable_headers
|
def custom_csv_exportable_headers
|
||||||
%i[location_info owner_info amendment_signed_column]
|
%i[name address]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -67,18 +67,6 @@ class LocationRelease < ApplicationRecord
|
|||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
def location_info
|
|
||||||
compact_contact_info(name: name, address: address)
|
|
||||||
end
|
|
||||||
|
|
||||||
def amendment_signed_column
|
|
||||||
if amendment_signable?
|
|
||||||
amendment_signed?
|
|
||||||
else
|
|
||||||
I18n.t('location_releases.csv.no_amendment_clause')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def end_date_after_start_date
|
def end_date_after_start_date
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ class MaterialRelease < ApplicationRecord
|
|||||||
|
|
||||||
class << self
|
class << self
|
||||||
def custom_csv_exportable_headers
|
def custom_csv_exportable_headers
|
||||||
%i[name owner_info]
|
%i[name]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -1,41 +0,0 @@
|
|||||||
class MillicastDestination
|
|
||||||
attr_reader :name, :token
|
|
||||||
|
|
||||||
def self.create
|
|
||||||
token_stream_name = SecureRandom.urlsafe_base64
|
|
||||||
|
|
||||||
publish_token = Millicast::PublishToken.create(
|
|
||||||
label: SecureRandom.urlsafe_base64,
|
|
||||||
streams: [
|
|
||||||
{ streamName: token_stream_name }
|
|
||||||
]
|
|
||||||
)
|
|
||||||
|
|
||||||
new(token_stream_name, publish_token.data.token)
|
|
||||||
end
|
|
||||||
|
|
||||||
def initialize(name, token)
|
|
||||||
@name = name
|
|
||||||
@token = token
|
|
||||||
end
|
|
||||||
|
|
||||||
def account_id
|
|
||||||
ENV["MILLICAST_ACCOUNT_ID"]
|
|
||||||
end
|
|
||||||
|
|
||||||
def key
|
|
||||||
"#{name}?token=#{token}"
|
|
||||||
end
|
|
||||||
|
|
||||||
def url
|
|
||||||
"rtmp://live-rtmp-pub.millicast.com:1935/v2/pub"
|
|
||||||
end
|
|
||||||
|
|
||||||
def playback_url
|
|
||||||
"https://viewer.millicast.com/v2?streamId=#{account_id}/#{name}"
|
|
||||||
end
|
|
||||||
|
|
||||||
def playback_embed
|
|
||||||
"<iframe src=\"#{playback_url}\" allowfullscreen width=\"640\" height=\"480\"></iframe>"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -11,7 +11,6 @@ class MiscRelease < ApplicationRecord
|
|||||||
include GuardianPhotoable
|
include GuardianPhotoable
|
||||||
include CsvExportable
|
include CsvExportable
|
||||||
include Approvable
|
include Approvable
|
||||||
include Exploitable
|
|
||||||
|
|
||||||
class << self
|
class << self
|
||||||
def custom_csv_exportable_headers
|
def custom_csv_exportable_headers
|
||||||
|
|||||||
@@ -1,15 +1,4 @@
|
|||||||
class MuxLiveStream
|
class MuxLiveStream
|
||||||
attr_accessor :simulcast_id, :simulcast_destination
|
|
||||||
|
|
||||||
def self.create_with_simulcast(destination = nil)
|
|
||||||
destination ||= MillicastDestination.create
|
|
||||||
|
|
||||||
MuxLiveStream.new.tap do |stream|
|
|
||||||
stream.id # force the live stream to be created by calling for its id
|
|
||||||
stream.create_simulcast(destination)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def id
|
def id
|
||||||
live_stream.data.id
|
live_stream.data.id
|
||||||
end
|
end
|
||||||
@@ -26,15 +15,6 @@ class MuxLiveStream
|
|||||||
client.delete_live_stream(stream_uid)
|
client.delete_live_stream(stream_uid)
|
||||||
end
|
end
|
||||||
|
|
||||||
def create_simulcast(destination)
|
|
||||||
return if test_mode_enabled?
|
|
||||||
|
|
||||||
request = MuxRuby::CreateSimulcastTargetRequest.new(stream_key: destination.key, url: destination.url)
|
|
||||||
result = client.create_live_stream_simulcast_target(id, request)
|
|
||||||
self.simulcast_destination = destination
|
|
||||||
self.simulcast_id = result.data.id
|
|
||||||
end
|
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def live_stream
|
def live_stream
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ class Project < ApplicationRecord
|
|||||||
include Archivable
|
include Archivable
|
||||||
include Filterable
|
include Filterable
|
||||||
include Syncable
|
include Syncable
|
||||||
include PgSearch
|
|
||||||
|
|
||||||
SIGNABLE_RELEASE_TYPES = %w(talent appearance acquired_media location material medical misc)
|
SIGNABLE_RELEASE_TYPES = %w(talent appearance acquired_media location material medical misc)
|
||||||
AVAILABLE_RELEASE_TYPES = %w(appearance location material acquired_media talent music medical misc)
|
AVAILABLE_RELEASE_TYPES = %w(appearance location material acquired_media talent music medical misc)
|
||||||
@@ -43,15 +42,6 @@ class Project < ApplicationRecord
|
|||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
pg_search_scope :search, {
|
|
||||||
against: [:name],
|
|
||||||
using: {
|
|
||||||
tsearch: {any_word: true, prefix: true},
|
|
||||||
trigram: {},
|
|
||||||
dmetaphone: {any_word: true}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
validates :name, presence: true, uniqueness: { scope: :account_id }
|
validates :name, presence: true, uniqueness: { scope: :account_id }
|
||||||
|
|
||||||
filterable_by :active, :inactive, :archived
|
filterable_by :active, :inactive, :archived
|
||||||
|
|||||||
@@ -19,7 +19,11 @@ class AcquiredMediaReleasePolicy < ApplicationPolicy
|
|||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
def edit_files?
|
def edit_file_infos?
|
||||||
|
true
|
||||||
|
end
|
||||||
|
|
||||||
|
def update_file_infos?
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -170,24 +170,6 @@ class Analytics
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def track_create_contract_template(user_agent:, user_ip:)
|
|
||||||
if analytics_enabled?
|
|
||||||
identify
|
|
||||||
track(
|
|
||||||
{
|
|
||||||
user_id: user.id,
|
|
||||||
event: "Contract Template Created",
|
|
||||||
properties: {
|
|
||||||
account: account.try(:name),
|
|
||||||
account_id: account.try(:id),
|
|
||||||
user_agent: user_agent,
|
|
||||||
ip: user_ip,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
attr_reader :user, :account, :backend
|
attr_reader :user, :account, :backend
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<%= bootstrap_form_with model: account, url: account_path, html: { autocorrect: :off, autocapitalize: :none, autocomplete: :off, spellcheck: false }, layout: :inline, remote: true do |form| %>
|
<%= bootstrap_form_with model: account, url: account_path, html: { autocorrect: :off, autocapitalize: :none, autocomplete: :off, spellcheck: false }, layout: :inline, remote: true do |form| %>
|
||||||
<%= form.file_field :logo, hide_label: true, accept: "image/*", placeholder: "Upload Logo", direct_upload: true, wrapper_class: "mr-1", required: true %>
|
<%= form.file_field :logo, hide_label: true, accept: "image/*", placeholder: "Upload Logo", direct_upload: true, wrapper_class: "mr-1" %>
|
||||||
<%= form.button(fa_icon("upload", text: t(".submit")), class: "btn btn-md btn-primary", data: { disable_with: t("shared.disable_with") }) %>
|
<%= form.button(fa_icon("upload", text: t(".submit")), class: "btn btn-md btn-primary", data: { disable_with: t("shared.disable_with") }) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -12,15 +12,12 @@
|
|||||||
<%= acquired_media_release.name %>
|
<%= acquired_media_release.name %>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<% if acquired_media_release.files.any? %>
|
<% if acquired_media_release.file_infos.any? %>
|
||||||
<%= acquired_media_release.files.size %>
|
<%= acquired_media_release.file_infos.size %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= fa_icon("warning", text: t(".no_media"), class: "text-danger") %>
|
<%= fa_icon("warning", text: t(".no_media"), class: "text-danger") %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
|
||||||
<%= contact_info_for(acquired_media_release.contact_person) %>
|
|
||||||
</td>
|
|
||||||
<td>
|
<td>
|
||||||
<%= notes_preview acquired_media_release.notes.order_by_recent %>
|
<%= notes_preview acquired_media_release.notes.order_by_recent %>
|
||||||
</td>
|
</td>
|
||||||
@@ -40,8 +37,8 @@
|
|||||||
<% if policy(acquired_media_release.tags).new? %>
|
<% if policy(acquired_media_release.tags).new? %>
|
||||||
<%= link_to fa_icon("tags fw", text: "Tags"), [:new, acquired_media_release, :acts_as_taggable_on_tag], class: "dropdown-item", remote: true %>
|
<%= link_to fa_icon("tags fw", text: "Tags"), [:new, acquired_media_release, :acts_as_taggable_on_tag], class: "dropdown-item", remote: true %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if policy(acquired_media_release).edit_files? %>
|
<% if policy(acquired_media_release).edit_file_infos? %>
|
||||||
<%= link_to fa_icon("file fw", text: "Media"), [:edit, acquired_media_release, :files], class: "dropdown-item" %>
|
<%= link_to fa_icon("file fw", text: "Add Media"), [:edit, acquired_media_release, :file_infos], class: "dropdown-item" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if policy(Contract).show? && (acquired_media_release.contract.attached? || acquired_media_release.contract_template.present?) %>
|
<% if policy(Contract).show? && (acquired_media_release.contract.attached? || acquired_media_release.contract_template.present?) %>
|
||||||
<%= link_to fa_icon("download fw", text: "Download"), [acquired_media_release, :contracts, format: "pdf"], class: "dropdown-item", target: "_blank" %>
|
<%= link_to fa_icon("download fw", text: "Download"), [acquired_media_release, :contracts, format: "pdf"], class: "dropdown-item", target: "_blank" %>
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
<%= fa_icon "warning" %>
|
<%= fa_icon "warning" %>
|
||||||
<strong>For optimal accuracy, please ensure video file names and photo file names match the source file name in the editing sequence.</strong>
|
<strong>For optimal accuracy, please ensure video file names and photo file names match the source file name in the editing sequence.</strong>
|
||||||
</div>
|
</div>
|
||||||
<%= render "shared/releasable_files_dropzone", form: form, releasable: acquired_media_release %>
|
<%= render "shared/file_infos_dropzone", form: form, releasable: acquired_media_release %>
|
||||||
|
|
||||||
<div class="<%= class_string("collapse" => !acquired_media_release.minor?) %>" data-ujs-target="guardian-fields">
|
<div class="<%= class_string("collapse" => !acquired_media_release.minor?) %>" data-ujs-target="guardian-fields">
|
||||||
<br>
|
<br>
|
||||||
|
|||||||
@@ -28,8 +28,7 @@
|
|||||||
<th data-behavior="all-selectable"><%= check_box_tag "acquired_media_release_ids[]", false, false %></th>
|
<th data-behavior="all-selectable"><%= check_box_tag "acquired_media_release_ids[]", false, false %></th>
|
||||||
<th><%= t '.table_headers.approved'%></th>
|
<th><%= t '.table_headers.approved'%></th>
|
||||||
<th><%= AcquiredMediaRelease.human_attribute_name(:name) %></th>
|
<th><%= AcquiredMediaRelease.human_attribute_name(:name) %></th>
|
||||||
<th><%= t(".table_headers.files_count") %></th>
|
<th><%= t(".table_headers.file_infos_count") %></th>
|
||||||
<th><%= t(".table_headers.owner_info") %></th>
|
|
||||||
<th><%= t(".table_headers.notes") %></th>
|
<th><%= t(".table_headers.notes") %></th>
|
||||||
<th><%= t(".table_headers.tags") %></th>
|
<th><%= t(".table_headers.tags") %></th>
|
||||||
<th><%= t(".table_headers.signed_at") %></th>
|
<th><%= t(".table_headers.signed_at") %></th>
|
||||||
|
|||||||
@@ -8,9 +8,6 @@
|
|||||||
<td>
|
<td>
|
||||||
<%= account.projects.size %>
|
<%= account.projects.size %>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
|
||||||
<%= account.total_number_of_releases %>
|
|
||||||
</td>
|
|
||||||
<td>
|
<td>
|
||||||
<%= number_with_delimiter convert_duration(account.current_month_video_duration_total, from: :seconds, to: :minutes).round %> minutes
|
<%= number_with_delimiter convert_duration(account.current_month_video_duration_total, from: :seconds, to: :minutes).round %> minutes
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -15,7 +15,6 @@
|
|||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
<th>Plan</th>
|
<th>Plan</th>
|
||||||
<th># Projects</th>
|
<th># Projects</th>
|
||||||
<th># Releases Signed</th>
|
|
||||||
<th>Monthly Video Upload Minutes</th>
|
<th>Monthly Video Upload Minutes</th>
|
||||||
<th>Total Video Upload Minutes</th>
|
<th>Total Video Upload Minutes</th>
|
||||||
<th>Total Storage</th>
|
<th>Total Storage</th>
|
||||||
|
|||||||
@@ -9,8 +9,6 @@
|
|||||||
<dd class="col-sm-10"><%= @account.users.size %></dd>
|
<dd class="col-sm-10"><%= @account.users.size %></dd>
|
||||||
<dt class="col-sm-2">Created at</dt>
|
<dt class="col-sm-2">Created at</dt>
|
||||||
<dd class="col-sm-10"><%= time_ago_in_words(@account.created_at) %> ago</dd>
|
<dd class="col-sm-10"><%= time_ago_in_words(@account.created_at) %> ago</dd>
|
||||||
<dt class="col-sm-2"># of Releases</dt>
|
|
||||||
<dd class="col-sm-10"><%= @account.total_number_of_releases %></dd>
|
|
||||||
</dl>
|
</dl>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
<%= errors_summary_for broadcast %>
|
<%= errors_summary_for broadcast %>
|
||||||
|
|
||||||
<%= bootstrap_form_with model: model, local: true do |form| %>
|
<%= bootstrap_form_with model: model, local: true do |form| %>
|
||||||
<%= form.text_field :video_conference_url_override %>
|
|
||||||
<%= form.text_field :stream_url_override %>
|
<%= form.text_field :stream_url_override %>
|
||||||
<%= form.text_field :stream_key_override %>
|
<%= form.text_field :stream_key_override %>
|
||||||
<%= form.text_area :director_mode_video_embed %>
|
<%= form.text_area :director_mode_video_embed %>
|
||||||
|
|||||||
@@ -1,13 +1,9 @@
|
|||||||
<div class="card shadow-sm">
|
<div class="card shadow-sm">
|
||||||
<%= card_header text: t(".heading", release_type: @releasable_param.name.titleize), close_action_path: [@project, "#{@releasable_param.name.pluralize}"] %>
|
<%= card_header text: t(".heading", release_type: @releasable_param.name.titleize), close_action_path: [@project, "#{@releasable_param.name.pluralize}"] %>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<embed class="embeded-contract-preview mb-3" type="application/pdf" src="<%= url_for [@releasable, :contracts, format: "pdf"] %>" width="90%" height="1200" />
|
<embed class="embeded-contract-preview" type="application/pdf" src="<%= url_for [@releasable, :contracts, format: "pdf"] %>" width="90%" height="1200" />
|
||||||
|
|
||||||
<%= errors_summary_for @releasable %>
|
|
||||||
<%= bootstrap_form_with model: @releasable, method: :post, url: public_send("#{@releasable_param.name}_approvals_path", @releasable), local: true do |form| %>
|
<%= bootstrap_form_with model: @releasable, method: :post, url: public_send("#{@releasable_param.name}_approvals_path", @releasable), local: true do |form| %>
|
||||||
<%= card_field_set_tag 'Signature' do %>
|
|
||||||
<%= render "shared/signature_fields", form: form, signature_field: 'approved_by_user_signature[data]' %>
|
|
||||||
<% end %>
|
|
||||||
<div class="row align-items-center text-center mt-4">
|
<div class="row align-items-center text-center mt-4">
|
||||||
<%= link_to t("shared.cancel"), [@releasable.project, "#{@releasable_param.name.pluralize}"], class: "col-3 text-reset" %>
|
<%= link_to t("shared.cancel"), [@releasable.project, "#{@releasable_param.name.pluralize}"], class: "col-3 text-reset" %>
|
||||||
<div class="col-9">
|
<div class="col-9">
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<% if broadcast.director_mode_video_embed.present? && params[:director_mode].present? %>
|
<% if broadcast.streamer_recording? && broadcast.active? %>
|
||||||
|
<div id="broadcast_video" class="embed-responsive-item" data-video-type="stream"></div>
|
||||||
|
<% elsif broadcast.director_mode_video_embed.present? && params[:director_mode] == "true" %>
|
||||||
<div class="embed-responsive-item" data-video-type="stream">
|
<div class="embed-responsive-item" data-video-type="stream">
|
||||||
<%= raw broadcast.director_mode_video_embed %>
|
<%= raw broadcast.director_mode_video_embed %>
|
||||||
</div>
|
</div>
|
||||||
<% elsif broadcast.streamer_recording? && broadcast.active? %>
|
|
||||||
<div id="broadcast_video" class="embed-responsive-item" data-video-type="stream"></div>
|
|
||||||
<% else %>
|
<% else %>
|
||||||
<div id="broadcast_video" class="embed-responsive-item" data-video-type="stream">
|
<div id="broadcast_video" class="embed-responsive-item" data-video-type="stream">
|
||||||
<table class="w-100 h-100 bg-secondary">
|
<table class="w-100 h-100 bg-secondary">
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<%= field_set_tag content_tag(:span, t(".release_info.heading"), class: "h6 text-muted text-uppercase") do %>
|
<%= field_set_tag content_tag(:span, t(".release_info.heading"), class: "h6 text-muted text-uppercase") do %>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<%= form.text_field :name, wrapper_class: "col-sm-6" %>
|
<%= form.text_field :name, wrapper_class: "col-sm-6" %>
|
||||||
<%= form.select :release_type, options_for_release_type_select(project, @release_type), { wrapper_class: "col-sm-6" }, data: { toggle: "collapse-select", target_show_values_mapping: { "#guardian_clause": %w(acquired_media appearance talent material misc medical), "#fee_field": %w(appearance talent location material acquired_media), "#exploitable_rights_fields": %w(appearance talent location material acquired_media misc), "#custom_fields": %w(medical misc appearance), "#amendment_clause": %w(appearance location), "#exhibit_fields": %w(appearance) } }, class: "form-control custom-select" %>
|
<%= form.select :release_type, options_for_release_type_select(project, @release_type), { wrapper_class: "col-sm-6" }, data: { toggle: "collapse-select", target_show_values_mapping: { "#guardian_clause": %w(acquired_media appearance talent material misc medical), "#fee_field": %w(appearance talent location material acquired_media), "#exploitable_rights_fields": %w(appearance talent location material acquired_media), "#custom_fields": %w(medical misc), "#amendment_clause": %w(appearance location) } }, class: "form-control custom-select" %>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-row mb-3">
|
<div class="form-row mb-3">
|
||||||
<%= form.radio_button :accessibility, :public_template, label: "Public", wrapper_class: "mr-3" %>
|
<%= form.radio_button :accessibility, :public_template, label: "Public", wrapper_class: "mr-3" %>
|
||||||
@@ -34,25 +34,6 @@
|
|||||||
<%= form.rich_text_area :amendment_clause %>
|
<%= form.rich_text_area :amendment_clause %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div id="exhibit_fields">
|
|
||||||
<%= form.form_group do %>
|
|
||||||
<%= form.rich_text_area :exhibit_a_legal_text %>
|
|
||||||
<small class="form-text text-muted mb-4"><%= t(".exhibits.help.option_field")%></small>
|
|
||||||
<% end %>
|
|
||||||
<%= form.form_group do %>
|
|
||||||
<%= form.text_area :exhibit_a_question_text %>
|
|
||||||
<small class="form-text text-muted mb-4"><%= t(".exhibits.help.option_field")%></small>
|
|
||||||
<% end %>
|
|
||||||
<%= form.form_group do %>
|
|
||||||
<%= form.rich_text_area :exhibit_b_legal_text %>
|
|
||||||
<small class="form-text text-muted mb-4"><%= t(".exhibits.help.option_field")%></small>
|
|
||||||
<% end %>
|
|
||||||
<%= form.form_group do %>
|
|
||||||
<%= form.text_area :exhibit_b_question_text %>
|
|
||||||
<small class="form-text text-muted mb-4"><%= t(".exhibits.help.option_field")%></small>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="signature_legal_text">
|
<div id="signature_legal_text">
|
||||||
<%= form.form_group do %>
|
<%= form.form_group do %>
|
||||||
<%= form.rich_text_area :signature_legal_text %>
|
<%= form.rich_text_area :signature_legal_text %>
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
<p class="heading"><strong><u><%= t ".heading.#{releasable.model_name.param_key}" %></u></strong></p>
|
|
||||||
<h4>Legal</h4>
|
|
||||||
<p><%= releasable.contract_template.exhibit_a_legal_text %></p>
|
|
||||||
<% if releasable.contract_template.exhibit_a_question_text.present? %>
|
|
||||||
<h4>Question</h4>
|
|
||||||
<p><strong><%= releasable.contract_template.exhibit_a_question_text %></strong></p>
|
|
||||||
<p><%= releasable.exhibit_a_answer %></p>
|
|
||||||
<% end %>
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
<p class="heading"><strong><u><%= t ".heading.#{releasable.model_name.param_key}" %></u></strong></p>
|
|
||||||
<h4>Legal</h4>
|
|
||||||
<p><%= releasable.contract_template.exhibit_b_legal_text %></p>
|
|
||||||
<% if releasable.contract_template.exhibit_b_question_text.present? %>
|
|
||||||
<h4>Question</h4>
|
|
||||||
<p><strong><%= releasable.contract_template.exhibit_b_question_text %></strong></p>
|
|
||||||
<p><%= releasable.exhibit_b_answer %></p>
|
|
||||||
<% end %>
|
|
||||||
@@ -8,37 +8,38 @@
|
|||||||
Description: <%= release.description %>
|
Description: <%= release.description %>
|
||||||
</p>
|
</p>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% photos = release.image_files %>
|
|
||||||
|
<% photos = release.file_infos.photo %>
|
||||||
<% unless photos.empty? %>
|
<% unless photos.empty? %>
|
||||||
<h3>Photos</h3>
|
<h3>Photos</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<% photos.each do |blob| %>
|
<% photos.each do |file_info| %>
|
||||||
<li>
|
<li>
|
||||||
<%= blob.filename %>
|
<%= file_info.filename %>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% videos = release.video_files %>
|
<% videos = release.file_infos.video %>
|
||||||
<% unless videos.empty? %>
|
<% unless videos.empty? %>
|
||||||
<h3>Videos</h3>
|
<h3>Videos</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<% videos.each do |blob| %>
|
<% videos.each do |file_info| %>
|
||||||
<li>
|
<li>
|
||||||
<%= blob.filename %>
|
<%= file_info.filename %>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% other = release.other_files %>
|
<% other = release.file_infos.other %>
|
||||||
<% unless other.empty? %>
|
<% unless other.empty? %>
|
||||||
<h3>Other files</h3>
|
<h3>Other files</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<% other.each do |blob| %>
|
<% other.each do |file_info| %>
|
||||||
<li>
|
<li>
|
||||||
<%= blob.filename %>
|
<%= file_info.filename %>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -11,9 +11,3 @@
|
|||||||
<%= description_list_pair t('.description_labels.issued_by'), releasable.approved_by_user_name %>
|
<%= description_list_pair t('.description_labels.issued_by'), releasable.approved_by_user_name %>
|
||||||
<%= description_list_pair t('.description_labels.date_issued'), releasable.approved_at %>
|
<%= description_list_pair t('.description_labels.date_issued'), releasable.approved_at %>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<% if preview %>
|
|
||||||
<%= image_tag dummy_signature %>
|
|
||||||
<% elsif releasable.approved_by_user_signature.attached? %>
|
|
||||||
<%= image_tag releasable.approved_by_user_signature.variant(auto_orient: true, resize: "200x200") %>
|
|
||||||
<% end %>
|
|
||||||
|
|||||||
@@ -6,5 +6,3 @@
|
|||||||
<p><%= releasable.public_send("question_#{n}_answer") %></p>
|
<p><%= releasable.public_send("question_#{n}_answer") %></p>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= contract_template.questionnaire_legal_text %>
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
<%= contract_template.guardian_clause %>
|
<%= contract_template.guardian_clause %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% if releasable.respond_to?(:question_1_answer) %>
|
<% if releasable.model_name.in? %w(MedicalRelease MiscRelease) %>
|
||||||
<div class="page">
|
<div class="page">
|
||||||
<%= render "contracts/questionnaire", releasable: releasable, contract_template: contract_template, preview: preview %>
|
<%= render "contracts/questionnaire", releasable: releasable, contract_template: contract_template, preview: preview %>
|
||||||
</div>
|
</div>
|
||||||
@@ -30,23 +30,9 @@
|
|||||||
<div class="page">
|
<div class="page">
|
||||||
<%= render "contracts/amendment_page", releasable: releasable, preview: preview %>
|
<%= render "contracts/amendment_page", releasable: releasable, preview: preview %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<%end %>
|
||||||
|
|
||||||
<% if releasable.respond_to?(:exhibit_a_answer) %>
|
<% if releasable.respond_to?(:approved?) && releasable.approved? %>
|
||||||
<% if contract_template.has_exhibit_a? %>
|
|
||||||
<div class="page">
|
|
||||||
<%= render "contracts/exhibit_a_page", releasable: releasable, preview: preview %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% if contract_template.has_exhibit_b? %>
|
|
||||||
<div class="page">
|
|
||||||
<%= render "contracts/exhibit_b_page", releasable: releasable, preview: preview %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% if releasable.try(:approved?) %>
|
|
||||||
<div class="page">
|
<div class="page">
|
||||||
<%= render "contracts/for_office_use_only", releasable: releasable, preview: preview %>
|
<%= render "contracts/for_office_use_only", releasable: releasable, preview: preview %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<div class="card shadow-sm">
|
<div class="card shadow-sm">
|
||||||
<%= card_header text: t(".heading"), subtext: @releasable.name, close_action_path: [@project, @releasable.model_name.plural] %>
|
<%= card_header text: t(".heading"), subtext: @releasable.name, close_action_path: [@project, @releasable.model_name.plural] %>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<% if @releasable.files.any? %>
|
<% if @releasable.file_infos.any? %>
|
||||||
<div class="alert alert-info text-center text-md-left">
|
<div class="alert alert-info text-center text-md-left">
|
||||||
<%= fa_icon "info-circle" %>
|
<%= fa_icon "info-circle" %>
|
||||||
<strong>To Add Photos & Videos to the release: Drag & Drop Files or Click or Tap here to browse media.</strong>
|
<strong>To Add Photos & Videos to the release: Drag & Drop Files or Click or Tap here to browse media.</strong>
|
||||||
@@ -11,8 +11,8 @@
|
|||||||
<%= fa_icon "warning" %>
|
<%= fa_icon "warning" %>
|
||||||
<strong>For optimal accuracy, please ensure video file names and photo file names match the source file name in the editing sequence.</strong>
|
<strong>For optimal accuracy, please ensure video file names and photo file names match the source file name in the editing sequence.</strong>
|
||||||
</div>
|
</div>
|
||||||
<%= bootstrap_form_with model: @releasable, url: [@releasable, :files] do |form| %>
|
<%= bootstrap_form_with model: @releasable, url: [@releasable, :file_infos] do |form| %>
|
||||||
<%= render "shared/releasable_files_dropzone", form: form, releasable: @releasable %>
|
<%= render "shared/file_infos_dropzone", form: form, releasable: @releasable %>
|
||||||
|
|
||||||
<div class="row align-items-center text-center mt-4">
|
<div class="row align-items-center text-center mt-4">
|
||||||
<%= link_to t("shared.cancel"), [@project, @releasable.model_name.plural], class: "col-3 text-reset" %>
|
<%= link_to t("shared.cancel"), [@project, @releasable.model_name.plural], class: "col-3 text-reset" %>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="<%= I18n.locale %>">
|
<html lang="<%= I18n.locale %>">
|
||||||
<head>
|
<head>
|
||||||
<title>ME Suite</title>
|
<title>BiGMedia.ai App</title>
|
||||||
<%= csrf_meta_tags %>
|
<%= csrf_meta_tags %>
|
||||||
<%= csp_meta_tag %>
|
<%= csp_meta_tag %>
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="<%= I18n.locale %>">
|
<html lang="<%= I18n.locale %>">
|
||||||
<head>
|
<head>
|
||||||
<title>ME Suite</title>
|
<title>BiGMedia.ai App</title>
|
||||||
<%= csrf_meta_tags %>
|
<%= csrf_meta_tags %>
|
||||||
<%= csp_meta_tag %>
|
<%= csp_meta_tag %>
|
||||||
|
|
||||||
|
|||||||
@@ -18,9 +18,6 @@
|
|||||||
<td>
|
<td>
|
||||||
<%= material_release.name %>
|
<%= material_release.name %>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
|
||||||
<%= contact_info_for(material_release.contact_person) %>
|
|
||||||
</td>
|
|
||||||
<td>
|
<td>
|
||||||
<%= notes_preview material_release.notes.order_by_recent %>
|
<%= notes_preview material_release.notes.order_by_recent %>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -29,10 +29,10 @@
|
|||||||
<th><%= t '.table_headers.approved'%></th>
|
<th><%= t '.table_headers.approved'%></th>
|
||||||
<th></th>
|
<th></th>
|
||||||
<th><%= MaterialRelease.human_attribute_name(:name) %></th>
|
<th><%= MaterialRelease.human_attribute_name(:name) %></th>
|
||||||
<th><%= t(".table_headers.owner_info") %>
|
|
||||||
<th><%= t(".table_headers.notes") %></th>
|
<th><%= t(".table_headers.notes") %></th>
|
||||||
<th><%= t(".table_headers.tags") %></th>
|
<th><%= t(".table_headers.tags") %></th>
|
||||||
<th><%= t(".table_headers.signed_at") %></th>
|
<th><%= t(".table_headers.signed_at") %></th>
|
||||||
|
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
<% if policy(Project).new? %>
|
|
||||||
<div class="col-sm-6 col-md-4 col-lg-3 mt-4">
|
|
||||||
<li class="card h-100 shadow-sm">
|
|
||||||
<div class="card-body d-flex flex-column justify-content-center align-items-center">
|
|
||||||
<%= fa_icon("plus-circle", class: "text-success", style: "font-size:4rem") %>
|
|
||||||
<%= link_to t(".actions.new"), [:new, :project], class: "mt-4 text-reset text-decoration-none stretched-link" %>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
@@ -1,14 +1,17 @@
|
|||||||
<% if @projects.any? %>
|
<% if @projects.any? %>
|
||||||
<section class="container mt-5">
|
<section class="container mt-5">
|
||||||
<div class="d-flex flex-row justify-content-between align-items-center mb-3">
|
<h1 class="h3"><%= t(".heading") %> (<%= @projects.size %>)</h1>
|
||||||
<h1 class="h3"><%= t(".heading") %> (<%= @projects.size %>)</h1>
|
<ul class="list-unstyled mt-2 row">
|
||||||
|
<% if policy(Project).new? %>
|
||||||
<%= bootstrap_form_with url: [@account, :projects], method: :get, remote: true, layout: :inline, id: "search" do |form| %>
|
<div class="col-sm-6 col-md-4 col-lg-3 mt-4">
|
||||||
<%= form.search_field :query, hide_label: true, placeholder: t(".actions.search"), class: "rounded-pill-right", value: params[:query], prepend: form.button(fa_icon("search"), class: "btn btn-light border rounded-pill-left") %>
|
<li class="card h-100 shadow-sm">
|
||||||
|
<div class="card-body d-flex flex-column justify-content-center align-items-center">
|
||||||
|
<%= fa_icon("plus-circle", class: "text-success", style: "font-size:4rem") %>
|
||||||
|
<%= link_to t(".actions.new"), [:new, :project], class: "mt-4 text-reset text-decoration-none stretched-link" %>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
|
||||||
<ul id="projects" class="list-unstyled mt-2 row">
|
|
||||||
<%= render partial: "new_project_button" %>
|
|
||||||
<%= render @projects %>
|
<%= render @projects %>
|
||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
$("#projects").html("")
|
|
||||||
$("#projects").append("<%= j render(partial: "new_project_button") %>");
|
|
||||||
$("#projects").append("<%= j render(@projects) %>");
|
|
||||||
$("form input[type='search']").val("<%= params[:query] %>");
|
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<%= card_field_set_tag t(".files.heading") do %>
|
<%= card_field_set_tag t(".files.heading") do %>
|
||||||
<%= render "shared/releasable_files_dropzone", form: form, releasable: @acquired_media_release %>
|
<%= render "shared/file_infos_dropzone", form: form, releasable: @acquired_media_release %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|||||||
@@ -13,29 +13,6 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
<% if @contract_template.has_exhibit_a? %>
|
|
||||||
<%= card_field_set_tag t(".exhibits.exhibit_a.heading") do %>
|
|
||||||
<p><%= @contract_template.exhibit_a_legal_text %></p>
|
|
||||||
<% if @contract_template.exhibit_a_question_text.present? %>
|
|
||||||
<div class="form-row">
|
|
||||||
<%= form.text_area :exhibit_a_answer, label: @contract_template.exhibit_a_question_text, wrapper_class: "col-sm-12" %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
<hr>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% if @contract_template.has_exhibit_b? %>
|
|
||||||
<%= card_field_set_tag t(".exhibits.exhibit_b.heading") do %>
|
|
||||||
<p><%= @contract_template.exhibit_b_legal_text %></p>
|
|
||||||
<% if @contract_template.exhibit_b_question_text.present? %>
|
|
||||||
<div class="form-row">
|
|
||||||
<%= form.text_area :exhibit_b_answer, label: @contract_template.exhibit_b_question_text, wrapper_class: "col-sm-12" %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
<hr>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% unless @contract_template.guardian_clause.blank? %>
|
<% unless @contract_template.guardian_clause.blank? %>
|
||||||
<%= form.form_group :minor do %>
|
<%= form.form_group :minor do %>
|
||||||
@@ -48,19 +25,6 @@
|
|||||||
<hr>
|
<hr>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% if @contract_template.has_questionnaire? %>
|
|
||||||
<%= card_field_set_tag t(".questionnaire.heading") do %>
|
|
||||||
<% (1..AppearanceRelease::NUMBER_OF_CUSTOM_FIELDS).each do |n| %>
|
|
||||||
<% if @contract_template.public_send("question_#{n}_text").present? %>
|
|
||||||
<div class="form-row">
|
|
||||||
<%= form.text_area "question_#{n}_answer", wrapper_class: "col-sm-12", label: @contract_template.public_send("question_#{n}_text") %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
<hr>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<%= card_field_set_tag t(".personal_info.heading") do %>
|
<%= card_field_set_tag t(".personal_info.heading") do %>
|
||||||
<div class="alert alert-warning font-weight-bold"><%= t ".personal_info.instructions" %></div>
|
<div class="alert alert-warning font-weight-bold"><%= t ".personal_info.instructions" %></div>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<%= bootstrap_form_with model: [@account, @project, @contract_template, @medical_release], local: true, validation_context: :native do |form| %>
|
<%= bootstrap_form_with model: [@account, @project, @contract_template, @medical_release], local: true, validation_context: :native do |form| %>
|
||||||
<div class="alert alert-warning font-weight-bold"><%= t ".instructions_html", name: @project.name %></div>
|
<div class="alert alert-warning font-weight-bold"><%= t ".instructions_html", name: @project.name %></div>
|
||||||
<%= card_field_set_tag t(".legal.heading") do %>
|
<%= card_field_set_tag t(".legal.heading") do %>
|
||||||
<%= @contract_template.body %>
|
<p><%= @contract_template.body %></p>
|
||||||
<% if @contract_template.fee? %>
|
<% if @contract_template.fee? %>
|
||||||
<p>
|
<p>
|
||||||
Fee <span class="font-weight-bold text-success"><%= number_to_currency @contract_template.fee %></span>
|
Fee <span class="font-weight-bold text-success"><%= number_to_currency @contract_template.fee %></span>
|
||||||
@@ -34,9 +34,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if @contract_template.questionnaire_legal_text.present? %>
|
|
||||||
<%= @contract_template.questionnaire_legal_text %>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
<hr>
|
<hr>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -3,6 +3,3 @@
|
|||||||
<%= form.text_area "question_#{n}_text", wrapper_class: "col-sm-12" %>
|
<%= form.text_area "question_#{n}_text", wrapper_class: "col-sm-12" %>
|
||||||
</div>
|
</div>
|
||||||
<% end%>
|
<% end%>
|
||||||
<%= form.form_group do %>
|
|
||||||
<%= form.rich_text_area :questionnaire_legal_text, hint: true %>
|
|
||||||
<% end %>
|
|
||||||
|
|||||||
@@ -15,3 +15,4 @@
|
|||||||
data-placeholder="<%= dropzone_placeholder_message_for(releasable) %>"
|
data-placeholder="<%= dropzone_placeholder_message_for(releasable) %>"
|
||||||
data-submit-button="#submit_release">
|
data-submit-button="#submit_release">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +0,0 @@
|
|||||||
<div class="field d-none">
|
|
||||||
<%= form.label :files %>
|
|
||||||
<%= form.file_field :files, disable: true, direct_upload: true, multiple: true, id: "releasable_files", hide_label: true %>
|
|
||||||
<% releasable.files.each do |file| %>
|
|
||||||
<% unless file.persisted? %>
|
|
||||||
<%= hidden_field_tag "#{releasable.model_name.param_key}[files][]", file.signed_id %>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="dropzone field border-dashed"
|
|
||||||
data-accepted-files="audio/*,image/*,video/*,application/*"
|
|
||||||
data-behavior="dropzone"
|
|
||||||
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>
|
|
||||||
@@ -18,7 +18,15 @@
|
|||||||
<div class="card-body p-0">
|
<div class="card-body p-0">
|
||||||
<div class="embed-responsive embed-responsive-16by9">
|
<div class="embed-responsive embed-responsive-16by9">
|
||||||
<div class="embed-responsive-item">
|
<div class="embed-responsive-item">
|
||||||
<div style="padding:56.25% 0 0 0;position:relative;"><iframe src="https://player.vimeo.com/video/444718363" style="position:absolute;top:0;left:0;width:100%;height:100%;" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe></div><script src="https://player.vimeo.com/api/player.js"></script>
|
<table class="w-100 h-100 bg-secondary">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td class="text-center align-middle text-white">
|
||||||
|
Video tutorial will be available soon
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -10,5 +10,5 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
If you have questions about how to use the software, please visit <%= link_to "MESuite.ai", "https://www.mesuite.ai/contact" %>.
|
If you have questions about how to use the software, please visit <%= link_to "BiGMedia.ai", "https://www.bigmedia.ai/contact" %>.
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
@@ -7,4 +7,4 @@ Please click below to set your password.
|
|||||||
<%= edit_password_reset_url(id: @user.password_reset_token, host: AppHost.new.domain_with_port) %>
|
<%= edit_password_reset_url(id: @user.password_reset_token, host: AppHost.new.domain_with_port) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
If you have questions about how to use the software, please visit https://www.mesuite.ai/contact.
|
If you have questions about how to use the software, please visit https://www.bigmedia.ai/contact.
|
||||||
|
|||||||
@@ -49,5 +49,4 @@ Rails.application.configure do
|
|||||||
|
|
||||||
ENV["ENABLE_ANALYTICS"] = "true"
|
ENV["ENABLE_ANALYTICS"] = "true"
|
||||||
ENV["BRAYNIAC_AI_API_ENDPOINT"] ||= ""
|
ENV["BRAYNIAC_AI_API_ENDPOINT"] ||= ""
|
||||||
ENV["MILLICAST_API_SECRET"] ||= ""
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
require "millicast"
|
|
||||||
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Rails.application.config.session_store :cookie_store, key: '_easy_release_session', expire_after: 1.month
|
|
||||||
@@ -62,10 +62,9 @@ en:
|
|||||||
empty: Acquired Media Releases will appear here
|
empty: Acquired Media Releases will appear here
|
||||||
table_headers:
|
table_headers:
|
||||||
approved: Approved
|
approved: Approved
|
||||||
files_count: No. Files
|
file_infos_count: No. Files
|
||||||
name: Name
|
name: Name
|
||||||
notes: Notes
|
notes: Notes
|
||||||
owner_info: Owner Info
|
|
||||||
signed_at: Date Signed
|
signed_at: Date Signed
|
||||||
tags: Tags
|
tags: Tags
|
||||||
new:
|
new:
|
||||||
@@ -143,8 +142,8 @@ en:
|
|||||||
review: Review
|
review: Review
|
||||||
sign_amendment: Sign Additional Clause
|
sign_amendment: Sign Additional Clause
|
||||||
messages:
|
messages:
|
||||||
amendment_not_signed_tooltip: Additional Clause Not Yet Signed
|
amendment_not_signed_tooltip: Secondary Clause Not Yet Signed
|
||||||
amendment_signed_tooltip: Additional Clause Signed
|
amendment_signed_tooltip: Secondary Clause Signed
|
||||||
approved_tooltip: Approved by %{user} on %{timestamp}
|
approved_tooltip: Approved by %{user} on %{timestamp}
|
||||||
no_photos: Needs Photo
|
no_photos: Needs Photo
|
||||||
create:
|
create:
|
||||||
@@ -231,7 +230,6 @@ en:
|
|||||||
broadcast_recordings:
|
broadcast_recordings:
|
||||||
confirm_hide: Are you sure you want to hide this recording from everyone?
|
confirm_hide: Are you sure you want to hide this recording from everyone?
|
||||||
create:
|
create:
|
||||||
alert: A live stream could not be created. Please try again later or contact support.
|
|
||||||
notice: A live stream has been created
|
notice: A live stream has been created
|
||||||
destroy:
|
destroy:
|
||||||
alert: A live stream has been deleted
|
alert: A live stream has been deleted
|
||||||
@@ -312,10 +310,6 @@ en:
|
|||||||
custom_fields:
|
custom_fields:
|
||||||
heading: Questionnaire
|
heading: Questionnaire
|
||||||
instructions: Please list the questions you wish the signer to answer. Any unused question fields will be hidden.
|
instructions: Please list the questions you wish the signer to answer. Any unused question fields will be hidden.
|
||||||
exhibits:
|
|
||||||
heading: Exhibits
|
|
||||||
help:
|
|
||||||
option_field: Leave blank if not required for this contract.
|
|
||||||
exploitable_rights:
|
exploitable_rights:
|
||||||
heading: Exploitable Rights
|
heading: Exploitable Rights
|
||||||
legal:
|
legal:
|
||||||
@@ -356,16 +350,10 @@ en:
|
|||||||
contracts:
|
contracts:
|
||||||
amendment_page:
|
amendment_page:
|
||||||
description_labels:
|
description_labels:
|
||||||
amendment_clause: Clause
|
amendment_clause: Amendment Clause
|
||||||
amendment_signature: Clause Signature
|
amendment_signature: Amendment Signature
|
||||||
amendment_signer_name: Clause Signer Name
|
amendment_signer_name: Amendment Signer Name
|
||||||
heading: Additional Clause
|
heading: Secondary Clause
|
||||||
exhibit_a_page:
|
|
||||||
heading:
|
|
||||||
appearance_release: Exhibit A
|
|
||||||
exhibit_b_page:
|
|
||||||
heading:
|
|
||||||
appearance_release: Exhibit B
|
|
||||||
for_office_use_only:
|
for_office_use_only:
|
||||||
description_labels:
|
description_labels:
|
||||||
date_issued: Date Issued
|
date_issued: Date Issued
|
||||||
@@ -385,7 +373,6 @@ en:
|
|||||||
other: Minor photos
|
other: Minor photos
|
||||||
questionnaire:
|
questionnaire:
|
||||||
heading:
|
heading:
|
||||||
appearance_release: Questionnaire
|
|
||||||
medical_release: Medical Questionnaire
|
medical_release: Medical Questionnaire
|
||||||
misc_release: Questionnaire
|
misc_release: Questionnaire
|
||||||
signature_page:
|
signature_page:
|
||||||
@@ -447,16 +434,17 @@ en:
|
|||||||
download_type: Type
|
download_type: Type
|
||||||
errors_helper:
|
errors_helper:
|
||||||
failure_message: "The following errors have prevented this %{model_name} from being submitted:"
|
failure_message: "The following errors have prevented this %{model_name} from being submitted:"
|
||||||
files:
|
file_infos:
|
||||||
edit:
|
edit:
|
||||||
heading: Media
|
heading: Add Media
|
||||||
|
update:
|
||||||
|
notice: The release has been updated
|
||||||
helpers:
|
helpers:
|
||||||
help:
|
help:
|
||||||
contract_template:
|
contract_template:
|
||||||
amendment_clause: Leave blank if not required for this contract
|
amendment_clause: Leave blank if not required for this contract
|
||||||
fee: Leave at $0.00 for no-fee
|
fee: Leave at $0.00 for no-fee
|
||||||
guardian_clause: Leave blank if not required for this contract
|
guardian_clause: Leave blank if not required for this contract
|
||||||
questionnaire_legal_text: Leave blank if not required for this contract
|
|
||||||
signature_legal_text: Leave blank if not required for this contract
|
signature_legal_text: Leave blank if not required for this contract
|
||||||
task_request:
|
task_request:
|
||||||
time_allowed: Minimum of 2 hours, no partial hours allowed
|
time_allowed: Minimum of 2 hours, no partial hours allowed
|
||||||
@@ -535,7 +523,7 @@ en:
|
|||||||
person_name: Name
|
person_name: Name
|
||||||
person_phone: Phone number
|
person_phone: Phone number
|
||||||
contract_template:
|
contract_template:
|
||||||
amendment_clause: Additional Contract Clause
|
amendment_clause: Secondary Clause
|
||||||
location_release:
|
location_release:
|
||||||
address_city: City
|
address_city: City
|
||||||
address_country: Country
|
address_country: Country
|
||||||
@@ -844,8 +832,6 @@ en:
|
|||||||
location_releases:
|
location_releases:
|
||||||
create:
|
create:
|
||||||
notice: The location release has been created
|
notice: The location release has been created
|
||||||
csv:
|
|
||||||
no_amendment_clause: No additional contract clause
|
|
||||||
destroy:
|
destroy:
|
||||||
alert: The location release has been deleted
|
alert: The location release has been deleted
|
||||||
edit:
|
edit:
|
||||||
@@ -868,9 +854,7 @@ en:
|
|||||||
search: Search
|
search: Search
|
||||||
empty: Location Releases will appear here
|
empty: Location Releases will appear here
|
||||||
table_headers:
|
table_headers:
|
||||||
address: Address
|
amendment_signed: Amendment
|
||||||
amendment_signed: Additional Clause
|
|
||||||
amendment_signed_column: Additional Clause
|
|
||||||
approved: Approved
|
approved: Approved
|
||||||
location_info: Location Info
|
location_info: Location Info
|
||||||
notes: Notes
|
notes: Notes
|
||||||
@@ -881,10 +865,10 @@ en:
|
|||||||
actions:
|
actions:
|
||||||
manage: Manage
|
manage: Manage
|
||||||
review: Review
|
review: Review
|
||||||
sign_amendment: Sign Additional Clause
|
sign_amendment: Sign Amendment
|
||||||
messages:
|
messages:
|
||||||
amendment_not_signed_tooltip: Additional clause not yet signed
|
amendment_not_signed_tooltip: Amendment not yet signed
|
||||||
amendment_signed_tooltip: Additional clause signed
|
amendment_signed_tooltip: Amendment Signed
|
||||||
approved_tooltip: Approved by %{user} on %{timestamp}
|
approved_tooltip: Approved by %{user} on %{timestamp}
|
||||||
no_photos: Needs Photo
|
no_photos: Needs Photo
|
||||||
new:
|
new:
|
||||||
@@ -925,7 +909,6 @@ en:
|
|||||||
approved: Approved
|
approved: Approved
|
||||||
name: Name
|
name: Name
|
||||||
notes: Notes
|
notes: Notes
|
||||||
owner_info: Owner Info
|
|
||||||
signed_at: Date Signed
|
signed_at: Date Signed
|
||||||
tags: Tags
|
tags: Tags
|
||||||
material_release:
|
material_release:
|
||||||
@@ -950,6 +933,7 @@ en:
|
|||||||
empty: Medical releases will appear here
|
empty: Medical releases will appear here
|
||||||
table_headers:
|
table_headers:
|
||||||
approved: Approved
|
approved: Approved
|
||||||
|
approved?: Approved
|
||||||
contact_info: Contact info
|
contact_info: Contact info
|
||||||
name: Person name
|
name: Person name
|
||||||
notes: Notes
|
notes: Notes
|
||||||
@@ -1099,13 +1083,9 @@ en:
|
|||||||
actions:
|
actions:
|
||||||
folder: Add Folder
|
folder: Add Folder
|
||||||
new: Create New Project
|
new: Create New Project
|
||||||
search: Search
|
|
||||||
heading: Open Projects
|
heading: Open Projects
|
||||||
new:
|
new:
|
||||||
heading: Create New Project
|
heading: Create New Project
|
||||||
new_project_button:
|
|
||||||
actions:
|
|
||||||
new: Create New Project
|
|
||||||
project:
|
project:
|
||||||
actions:
|
actions:
|
||||||
delete: Delete
|
delete: Delete
|
||||||
@@ -1163,12 +1143,12 @@ en:
|
|||||||
heading: Signature
|
heading: Signature
|
||||||
amendments:
|
amendments:
|
||||||
create:
|
create:
|
||||||
amendment_already_signed_message: Release additional clause is already signed!
|
amendment_already_signed_message: Release amendment is already signed!
|
||||||
amendment_signed_message: Release additional clause signed successfully! Thank you
|
amendment_signed_message: Release amendment signed successfully! Thank you
|
||||||
new:
|
new:
|
||||||
amendment:
|
amendment:
|
||||||
heading: Additional Clause
|
heading: Amendment
|
||||||
copy_url: Copy sign additional clause URL
|
copy_url: Copy sign amendment URL
|
||||||
signature:
|
signature:
|
||||||
heading: Signature
|
heading: Signature
|
||||||
signed_contract_preview: Signed Contract Preview
|
signed_contract_preview: Signed Contract Preview
|
||||||
@@ -1177,11 +1157,6 @@ en:
|
|||||||
notice: Your release has been signed. Thank you!
|
notice: Your release has been signed. Thank you!
|
||||||
new:
|
new:
|
||||||
cancel: Cancel
|
cancel: Cancel
|
||||||
exhibits:
|
|
||||||
exhibit_a:
|
|
||||||
heading: Exhibit A
|
|
||||||
exhibit_b:
|
|
||||||
heading: Exhibit B
|
|
||||||
guardian_2_info:
|
guardian_2_info:
|
||||||
heading: Second Guardian Information (if company requires)
|
heading: Second Guardian Information (if company requires)
|
||||||
guardian_2_photo:
|
guardian_2_photo:
|
||||||
@@ -1211,8 +1186,6 @@ en:
|
|||||||
no_photo: No photo yet
|
no_photo: No photo yet
|
||||||
take_photo: Take Photo
|
take_photo: Take Photo
|
||||||
warning: If your photo appears sideways, it will be autocorrected when you submit your release.
|
warning: If your photo appears sideways, it will be autocorrected when you submit your release.
|
||||||
questionnaire:
|
|
||||||
heading: Questionnaire
|
|
||||||
signature:
|
signature:
|
||||||
heading: Sign Below
|
heading: Sign Below
|
||||||
broadcasts:
|
broadcasts:
|
||||||
|
|||||||
@@ -16,11 +16,9 @@ es:
|
|||||||
heading: Guardian Photo
|
heading: Guardian Photo
|
||||||
index:
|
index:
|
||||||
table_headers:
|
table_headers:
|
||||||
approved: Appproved (ES)
|
|
||||||
file_infos_count: No. Files (ES)
|
file_infos_count: No. Files (ES)
|
||||||
name: Name (ES)
|
name: Name (ES)
|
||||||
notes: Notes (ES)
|
notes: Notes (ES)
|
||||||
owner_info: Owner Info (ES)
|
|
||||||
signed_at: Date Signed (ES)
|
signed_at: Date Signed (ES)
|
||||||
tags: Tags (ES)
|
tags: Tags (ES)
|
||||||
activerecord:
|
activerecord:
|
||||||
@@ -49,8 +47,8 @@ es:
|
|||||||
appearance_releases:
|
appearance_releases:
|
||||||
appearance_release:
|
appearance_release:
|
||||||
actions:
|
actions:
|
||||||
manage: Manage (ES)
|
|
||||||
sign_amendment: Sign Additional Clause (ES)
|
sign_amendment: Sign Additional Clause (ES)
|
||||||
|
manage: Manage (ES)
|
||||||
messages:
|
messages:
|
||||||
amendment_not_signed_tooltip: Amendment not yet signed (ES)
|
amendment_not_signed_tooltip: Amendment not yet signed (ES)
|
||||||
amendment_signed_tooltip: Amendment signed (ES)
|
amendment_signed_tooltip: Amendment signed (ES)
|
||||||
@@ -74,7 +72,6 @@ es:
|
|||||||
imported_appearance_release_missing_attachment: Person photo or contract missing for imported appearance release (ES)
|
imported_appearance_release_missing_attachment: Person photo or contract missing for imported appearance release (ES)
|
||||||
table_headers:
|
table_headers:
|
||||||
amendment_signed: Additional Clause (ES)
|
amendment_signed: Additional Clause (ES)
|
||||||
approved: Approved (ES)
|
|
||||||
contact_info: ""
|
contact_info: ""
|
||||||
name: ""
|
name: ""
|
||||||
notes: ""
|
notes: ""
|
||||||
@@ -296,8 +293,6 @@ es:
|
|||||||
person_email: Dirección de correo electrónico
|
person_email: Dirección de correo electrónico
|
||||||
person_name: Nómbre
|
person_name: Nómbre
|
||||||
person_phone: Número de teléfono
|
person_phone: Número de teléfono
|
||||||
contract_template:
|
|
||||||
amendment_clause: Additional Contract Clause (ES)
|
|
||||||
material_release:
|
material_release:
|
||||||
guardian_2_address_city: Guardian 2 city (ES)
|
guardian_2_address_city: Guardian 2 city (ES)
|
||||||
guardian_2_address_country: Guardian 2 country (ES)
|
guardian_2_address_country: Guardian 2 country (ES)
|
||||||
@@ -415,23 +410,19 @@ es:
|
|||||||
update: Approve (ES)
|
update: Approve (ES)
|
||||||
update: 'Actualizar %{model}'
|
update: 'Actualizar %{model}'
|
||||||
location_releases:
|
location_releases:
|
||||||
csv:
|
|
||||||
no_amendment_clause: No amendment clause (ES)
|
|
||||||
form:
|
form:
|
||||||
photos:
|
photos:
|
||||||
dropzone_label: Tap to take a photo of the Property (optional) (ES)
|
dropzone_label: Tap to take a photo of the Property (optional) (ES)
|
||||||
index:
|
index:
|
||||||
table_headers:
|
table_headers:
|
||||||
address: Address (ES)
|
address: Address (ES)
|
||||||
amendment_signed: Additional Clause (ES)
|
amendment_signed: Amendment (ES)
|
||||||
amendment_signed_column: Amendment signed (ES)
|
|
||||||
approved: Approved (ES)
|
|
||||||
notes: Notes (ES)
|
notes: Notes (ES)
|
||||||
signed_at: Date Signed (ES)
|
signed_at: Date Signed (ES)
|
||||||
tags: Tags (ES)
|
tags: Tags (ES)
|
||||||
location_release:
|
location_release:
|
||||||
actions:
|
actions:
|
||||||
sign_amendment: Sign Additional Clause (ES)
|
sign_amendment: Sign Amendment (ES)
|
||||||
messages:
|
messages:
|
||||||
amendment_not_signed_tooltip: Amendment not yet signed (ES)
|
amendment_not_signed_tooltip: Amendment not yet signed (ES)
|
||||||
amendment_signed_tooltip: Amendment Signed (ES)
|
amendment_signed_tooltip: Amendment Signed (ES)
|
||||||
@@ -451,10 +442,8 @@ es:
|
|||||||
heading: Guardian Photo
|
heading: Guardian Photo
|
||||||
index:
|
index:
|
||||||
table_headers:
|
table_headers:
|
||||||
approved: Approved (ES)
|
|
||||||
name: Name (ES)
|
name: Name (ES)
|
||||||
notes: Notes (ES)
|
notes: Notes (ES)
|
||||||
owner_info: Owner Info
|
|
||||||
signed_at: Date Signed (ES)
|
signed_at: Date Signed (ES)
|
||||||
tags: Tags (ES)
|
tags: Tags (ES)
|
||||||
medical_releases:
|
medical_releases:
|
||||||
@@ -463,6 +452,7 @@ es:
|
|||||||
index:
|
index:
|
||||||
table_headers:
|
table_headers:
|
||||||
approved: Approved (ES)
|
approved: Approved (ES)
|
||||||
|
approved?: Approved (ES)
|
||||||
contact_info: Contact info (ES)
|
contact_info: Contact info (ES)
|
||||||
name: Person name (ES)
|
name: Person name (ES)
|
||||||
notes: Notes (ES)
|
notes: Notes (ES)
|
||||||
@@ -476,7 +466,6 @@ es:
|
|||||||
misc_releases:
|
misc_releases:
|
||||||
index:
|
index:
|
||||||
table_headers:
|
table_headers:
|
||||||
approved: Approved (ES)
|
|
||||||
contact_info: Contact info (ES)
|
contact_info: Contact info (ES)
|
||||||
name: Person name (ES)
|
name: Person name (ES)
|
||||||
notes: Notes (ES)
|
notes: Notes (ES)
|
||||||
@@ -485,7 +474,6 @@ es:
|
|||||||
music_releases:
|
music_releases:
|
||||||
index:
|
index:
|
||||||
table_headers:
|
table_headers:
|
||||||
approved: Approved (ES)
|
|
||||||
composers_count: No. Composers (ES)
|
composers_count: No. Composers (ES)
|
||||||
file_infos_count: No. Files (ES)
|
file_infos_count: No. Files (ES)
|
||||||
name: Name (ES)
|
name: Name (ES)
|
||||||
@@ -520,7 +508,7 @@ es:
|
|||||||
amendment_signed_message: Release amendment signed successfully! Thank you (ES)
|
amendment_signed_message: Release amendment signed successfully! Thank you (ES)
|
||||||
new:
|
new:
|
||||||
amendment:
|
amendment:
|
||||||
heading: Additional Clause (ES)
|
heading: Amendment
|
||||||
copy_url: Copy sign amendment URL (ES)
|
copy_url: Copy sign amendment URL (ES)
|
||||||
signature:
|
signature:
|
||||||
heading: Signature (ES)
|
heading: Signature (ES)
|
||||||
@@ -647,7 +635,6 @@ es:
|
|||||||
heading: Guardian Photo (ES)
|
heading: Guardian Photo (ES)
|
||||||
index:
|
index:
|
||||||
table_headers:
|
table_headers:
|
||||||
approved: Approved (ES)
|
|
||||||
email: Email (ES)
|
email: Email (ES)
|
||||||
name: Name (ES)
|
name: Name (ES)
|
||||||
notes: Notes (ES)
|
notes: Notes (ES)
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ Rails.application.routes.draw do
|
|||||||
concern :taggable do
|
concern :taggable do
|
||||||
resources :acts_as_taggable_on_tags, only: [:new, :create, :destroy], controller: "tags"
|
resources :acts_as_taggable_on_tags, only: [:new, :create, :destroy], controller: "tags"
|
||||||
end
|
end
|
||||||
concern :file_uploadable do
|
concern :file_infoable do
|
||||||
resource :files, only: [:edit, :update]
|
resource :file_infos, only: [:edit, :update]
|
||||||
end
|
end
|
||||||
concern :approvable do
|
concern :approvable do
|
||||||
resource :approvals, only: [:new, :create]
|
resource :approvals, only: [:new, :create]
|
||||||
@@ -51,7 +51,7 @@ Rails.application.routes.draw do
|
|||||||
resource :account, only: [:new, :create, :update]
|
resource :account, only: [:new, :create, :update]
|
||||||
resources :account_auths, only: [:index, :create, :update, :destroy]
|
resources :account_auths, only: [:index, :create, :update, :destroy]
|
||||||
resources :projects, shallow: true do
|
resources :projects, shallow: true do
|
||||||
resources :acquired_media_releases, except: [:show], concerns: [:contractable, :notable, :file_uploadable]
|
resources :acquired_media_releases, except: [:show], concerns: [:contractable, :notable, :file_infoable]
|
||||||
resources :appearance_releases, except: [:show], concerns: [:contractable, :notable]
|
resources :appearance_releases, except: [:show], concerns: [:contractable, :notable]
|
||||||
resources :appearance_release_imports, only: [:create]
|
resources :appearance_release_imports, only: [:create]
|
||||||
resources :location_releases, except: [:show], concerns: [:contractable, :notable, :photoable]
|
resources :location_releases, except: [:show], concerns: [:contractable, :notable, :photoable]
|
||||||
@@ -162,7 +162,6 @@ Rails.application.routes.draw do
|
|||||||
scope 'v1' do
|
scope 'v1' do
|
||||||
get 'sync' => 'sync#index'
|
get 'sync' => 'sync#index'
|
||||||
post 'user_token' => 'user_token#create'
|
post 'user_token' => 'user_token#create'
|
||||||
post 'users' => 'users#create'
|
|
||||||
resource :profiles, only: [:show]
|
resource :profiles, only: [:show]
|
||||||
resources :projects, only: [:index] do
|
resources :projects, only: [:index] do
|
||||||
resources :broadcasts, only: [:index, :show, :update]
|
resources :broadcasts, only: [:index, :show, :update]
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
class AddSimulcastUidToBroadcasts < ActiveRecord::Migration[6.0]
|
|
||||||
def change
|
|
||||||
add_column :broadcasts, :simulcast_uid, :string
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
class AddExhibitFieldsToContractTemplates < ActiveRecord::Migration[6.0]
|
|
||||||
def change
|
|
||||||
add_column :contract_templates, :exhibit_a_legal_text, :text
|
|
||||||
add_column :contract_templates, :exhibit_a_question_text, :text
|
|
||||||
add_column :contract_templates, :exhibit_b_legal_text, :text
|
|
||||||
add_column :contract_templates, :exhibit_b_question_text, :text
|
|
||||||
|
|
||||||
add_column :appearance_releases, :exhibit_a_answer, :text
|
|
||||||
add_column :appearance_releases, :exhibit_b_answer, :text
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
class AddQuestionAnswersToAppearanceReleases < ActiveRecord::Migration[6.0]
|
|
||||||
def change
|
|
||||||
add_column :appearance_releases, :question_1_answer, :text
|
|
||||||
add_column :appearance_releases, :question_2_answer, :text
|
|
||||||
add_column :appearance_releases, :question_3_answer, :text
|
|
||||||
add_column :appearance_releases, :question_4_answer, :text
|
|
||||||
add_column :appearance_releases, :question_5_answer, :text
|
|
||||||
add_column :appearance_releases, :question_6_answer, :text
|
|
||||||
add_column :appearance_releases, :question_7_answer, :text
|
|
||||||
add_column :appearance_releases, :question_8_answer, :text
|
|
||||||
add_column :appearance_releases, :question_9_answer, :text
|
|
||||||
add_column :appearance_releases, :question_10_answer, :text
|
|
||||||
add_column :appearance_releases, :question_11_answer, :text
|
|
||||||
add_column :appearance_releases, :question_12_answer, :text
|
|
||||||
add_column :appearance_releases, :question_13_answer, :text
|
|
||||||
add_column :appearance_releases, :question_14_answer, :text
|
|
||||||
add_column :appearance_releases, :question_15_answer, :text
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
class AddVideoConferenceUrlOverrideToBroadcasts < ActiveRecord::Migration[6.0]
|
|
||||||
def change
|
|
||||||
add_column :broadcasts, :video_conference_url_override, :string
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -366,24 +366,7 @@ CREATE TABLE public.appearance_releases (
|
|||||||
approved_by_user_name text,
|
approved_by_user_name text,
|
||||||
approved_by_user_email text,
|
approved_by_user_email text,
|
||||||
approved_at timestamp without time zone,
|
approved_at timestamp without time zone,
|
||||||
amendment_signer_name character varying,
|
amendment_signer_name character varying
|
||||||
exhibit_a_answer text,
|
|
||||||
exhibit_b_answer text,
|
|
||||||
question_1_answer text,
|
|
||||||
question_2_answer text,
|
|
||||||
question_3_answer text,
|
|
||||||
question_4_answer text,
|
|
||||||
question_5_answer text,
|
|
||||||
question_6_answer text,
|
|
||||||
question_7_answer text,
|
|
||||||
question_8_answer text,
|
|
||||||
question_9_answer text,
|
|
||||||
question_10_answer text,
|
|
||||||
question_11_answer text,
|
|
||||||
question_12_answer text,
|
|
||||||
question_13_answer text,
|
|
||||||
question_14_answer text,
|
|
||||||
question_15_answer text
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@@ -584,9 +567,7 @@ CREATE TABLE public.broadcasts (
|
|||||||
full_live_stream_playback_uid character varying,
|
full_live_stream_playback_uid character varying,
|
||||||
stream_url_override character varying,
|
stream_url_override character varying,
|
||||||
stream_key_override character varying,
|
stream_key_override character varying,
|
||||||
director_mode_video_embed text,
|
director_mode_video_embed text
|
||||||
simulcast_uid character varying,
|
|
||||||
video_conference_url_override character varying
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@@ -684,11 +665,7 @@ CREATE TABLE public.contract_templates (
|
|||||||
question_13_text text,
|
question_13_text text,
|
||||||
question_14_text text,
|
question_14_text text,
|
||||||
question_15_text text,
|
question_15_text text,
|
||||||
accessibility integer DEFAULT 0,
|
accessibility integer DEFAULT 0
|
||||||
exhibit_a_legal_text text,
|
|
||||||
exhibit_a_question_text text,
|
|
||||||
exhibit_b_legal_text text,
|
|
||||||
exhibit_b_question_text text
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@@ -4021,10 +3998,6 @@ INSERT INTO "schema_migrations" (version) VALUES
|
|||||||
('20200730050903'),
|
('20200730050903'),
|
||||||
('20200803145912'),
|
('20200803145912'),
|
||||||
('20200803150138'),
|
('20200803150138'),
|
||||||
('20200804093409'),
|
('20200804093409');
|
||||||
('20200807190607'),
|
|
||||||
('20200811102720'),
|
|
||||||
('20200812060406'),
|
|
||||||
('20200819070738');
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
module Knock
|
|
||||||
class AuthTokenController < ApplicationController
|
|
||||||
skip_before_action :authenticate
|
|
||||||
alias authenticate_with_token authenticate
|
|
||||||
before_action :authenticate_with_token
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
require_relative "./millicast/base"
|
|
||||||
require_relative "./millicast/publish_token"
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
module Millicast
|
|
||||||
class Base < ActiveResource::Base
|
|
||||||
self.site = 'https://api.millicast.com/api'
|
|
||||||
self.connection.auth_type = :bearer
|
|
||||||
self.connection.bearer_token = ENV.fetch("MILLICAST_API_SECRET")
|
|
||||||
self.include_format_in_path = false
|
|
||||||
|
|
||||||
def self.enable_logging
|
|
||||||
ActiveSupport::Notifications.subscribe('request.active_resource') do |name, start, finish, id, payload|
|
|
||||||
puts payload
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
module Millicast
|
|
||||||
class PublishToken < Base
|
|
||||||
self.collection_name = "publish_token"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -87,10 +87,26 @@ RSpec.describe AcquiredMediaReleasesController, type: :controller do
|
|||||||
}.to have_enqueued_job(SetTagsForReleasableJob).with(AcquiredMediaRelease.last)
|
}.to have_enqueued_job(SetTagsForReleasableJob).with(AcquiredMediaRelease.last)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "adds files to release" do
|
it "creates nested file info records" do
|
||||||
post :create, params: { project_id: project, acquired_media_release: acquired_media_release_params.merge(file_params) }
|
expect {
|
||||||
|
post :create, params: {
|
||||||
|
project_id: project,
|
||||||
|
acquired_media_release: acquired_media_release_params.merge(
|
||||||
|
file_infos_attributes: {
|
||||||
|
0 => attributes_for(:file_info)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}.to change(FileInfo, :count).by(1)
|
||||||
|
expect(AcquiredMediaRelease.last.file_infos.size).to eq(1)
|
||||||
|
end
|
||||||
|
|
||||||
expect(AcquiredMediaRelease.last.files.size).to eq(1)
|
it "logs analytics" do
|
||||||
|
expect {
|
||||||
|
post :create, params: { project_id: project, acquired_media_release: acquired_media_release_params }
|
||||||
|
}.to(
|
||||||
|
have_enqueued_job(TrackAnalyticsJob).with(user, account, :track_create_non_native_release, release_type: "AcquiredMediaRelease", user_agent: "Rails Testing", user_ip: "0.0.0.0")
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
context "when the record would be invalid" do
|
context "when the record would be invalid" do
|
||||||
@@ -190,11 +206,4 @@ RSpec.describe AcquiredMediaReleasesController, type: :controller do
|
|||||||
restriction_text: "restrictions",
|
restriction_text: "restrictions",
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
def file_params
|
|
||||||
path = Rails.root.join("spec", "fixtures", "files", "contract.pdf")
|
|
||||||
contract_file = Rack::Test::UploadedFile.new(path, "application/pdf")
|
|
||||||
|
|
||||||
{ files: [contract_file] }
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ RSpec.describe Admin::AccountsController, type: :controller do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it "paginates the broadcast list" do
|
it "paginates the broadcast list" do
|
||||||
stub_mux_live_stream
|
allow(MuxLiveStream).to receive(:new).and_return(double(id: "id", key: "key", playback_id: "playback_id"))
|
||||||
project = create(:project, account: current_user.primary_account)
|
project = create(:project, account: current_user.primary_account)
|
||||||
create_list(:broadcast, 20, project: project )
|
create_list(:broadcast, 20, project: project )
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ RSpec.describe Admin::BroadcastsController, type: :controller do
|
|||||||
|
|
||||||
before do
|
before do
|
||||||
sign_in(current_user)
|
sign_in(current_user)
|
||||||
stub_mux_live_stream
|
allow(MuxLiveStream).to receive(:new).and_return(double(id: "id", key: "key", playback_id: "playback_id"))
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "#edit" do
|
describe "#edit" do
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ RSpec.describe Api::BroadcastsController, type: :controller do
|
|||||||
|
|
||||||
describe '#index' do
|
describe '#index' do
|
||||||
before do
|
before do
|
||||||
stub_mux_live_stream
|
allow(MuxLiveStream).to receive(:new).and_return(double(id: 'id', key: 'key', playback_id: 'playback_id'))
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'returns a list of all broadcasts ready for streaming in the project' do
|
it 'returns a list of all broadcasts ready for streaming in the project' do
|
||||||
|
|||||||
@@ -1,63 +0,0 @@
|
|||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
require 'rails_helper'
|
|
||||||
|
|
||||||
RSpec.describe Api::UserTokenController, type: :request do
|
|
||||||
let(:current_user) { create(:user) }
|
|
||||||
|
|
||||||
describe '#create' do
|
|
||||||
it 'returns error if credentials are not corrent and does not set cookie' do
|
|
||||||
|
|
||||||
post create_endpoint, params: wrong_auth_params
|
|
||||||
|
|
||||||
expect(response).to be_successful
|
|
||||||
expect(response.body).to match record_not_found
|
|
||||||
expect(cookie_data).to eq nil
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'sends token and cookie if credentials are correct' do
|
|
||||||
post create_endpoint, params: correct_auth_params
|
|
||||||
|
|
||||||
expect(response).to be_successful
|
|
||||||
expect(response.body).not_to match record_not_found
|
|
||||||
expect(response.body).to match token_response
|
|
||||||
expect(cookie_data).not_to eq nil
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
private
|
|
||||||
|
|
||||||
def wrong_auth_params
|
|
||||||
{
|
|
||||||
auth: {
|
|
||||||
email: 'wrong_email@api-test.com',
|
|
||||||
password: 'password'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
def correct_auth_params
|
|
||||||
{
|
|
||||||
auth: {
|
|
||||||
email: current_user.email,
|
|
||||||
password: 'password'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
def create_endpoint
|
|
||||||
'/api/v1/user_token'
|
|
||||||
end
|
|
||||||
|
|
||||||
def record_not_found
|
|
||||||
/Record not found/
|
|
||||||
end
|
|
||||||
|
|
||||||
def token_response
|
|
||||||
/jwt/
|
|
||||||
end
|
|
||||||
|
|
||||||
def cookie_data
|
|
||||||
cookies[:_easy_release_session]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -1,78 +0,0 @@
|
|||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
require 'rails_helper'
|
|
||||||
|
|
||||||
RSpec.describe Api::UsersController, type: :controller do
|
|
||||||
before do
|
|
||||||
ENV['CUSTOM_API_TOKEN'] = "custom_token"
|
|
||||||
end
|
|
||||||
describe '#create' do
|
|
||||||
context 'Invalid token' do
|
|
||||||
it 'Returns 401 (Unauthorized) status if token is not valid' do
|
|
||||||
|
|
||||||
post :create
|
|
||||||
|
|
||||||
expect(response).not_to be_successful
|
|
||||||
expect(response).to have_http_status(401)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'Valid token' do
|
|
||||||
before :each do
|
|
||||||
controller.request.env['HTTP_AUTHORIZATION'] = 'Bearer custom_token'
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'Returns Server error if user param is missing' do
|
|
||||||
user_count = User.all.count
|
|
||||||
|
|
||||||
expect do
|
|
||||||
post :create
|
|
||||||
end.to raise_exception ActionController::ParameterMissing
|
|
||||||
|
|
||||||
expect(User.all.count).to eq user_count
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'Returns Server Error if email or password is missing' do
|
|
||||||
user_count = User.all.count
|
|
||||||
|
|
||||||
expect do
|
|
||||||
post :create, params: { user: { email: "a@b.com" } }
|
|
||||||
end.to raise_exception ActionController::ParameterMissing
|
|
||||||
|
|
||||||
expect do
|
|
||||||
post :create, params: { user: { password: "123" } }
|
|
||||||
end.to raise_exception ActionController::ParameterMissing
|
|
||||||
|
|
||||||
expect(User.all.count).to eq user_count
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'Returns Server Error if body contains not permitted params' do
|
|
||||||
user_count = User.all.count
|
|
||||||
|
|
||||||
expect do
|
|
||||||
post :create, params: { user: { email: "a@b.com", password: "123", admin: true } }
|
|
||||||
end.to raise_exception ActionController::UnpermittedParameters
|
|
||||||
|
|
||||||
expect(User.all.count).to eq user_count
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'Creates user if body contains correct params' do
|
|
||||||
expect do
|
|
||||||
post :create, params: { user: { email: "a@b.com", password: "123" } }
|
|
||||||
end.to change(User, :count).by(1)
|
|
||||||
|
|
||||||
expect(response).to be_successful
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'Nothing changes if existing email is used' do
|
|
||||||
create(:user, email: "a@b.com")
|
|
||||||
|
|
||||||
expect do
|
|
||||||
post :create, params: { user: { email: "a@b.com", password: "123" } }
|
|
||||||
end.not_to change(User, :count)
|
|
||||||
|
|
||||||
expect(response).to be_successful
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -152,6 +152,14 @@ RSpec.describe AppearanceReleasesController, tye: :controller do
|
|||||||
}.to have_enqueued_job(SetTagsForReleasableJob).with(AppearanceRelease.last)
|
}.to have_enqueued_job(SetTagsForReleasableJob).with(AppearanceRelease.last)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "logs analytics" do
|
||||||
|
expect {
|
||||||
|
post :create, params: { project_id: project, appearance_release: appearance_release_params }
|
||||||
|
}.to(
|
||||||
|
have_enqueued_job(TrackAnalyticsJob).with(user, account, :track_create_non_native_release, release_type: "AppearanceRelease", user_agent: "Rails Testing", user_ip: "0.0.0.0")
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
context "when the record would be invalid" do
|
context "when the record would be invalid" do
|
||||||
before do
|
before do
|
||||||
allow_any_instance_of(AppearanceRelease).to receive(:save).and_return(false)
|
allow_any_instance_of(AppearanceRelease).to receive(:save).and_return(false)
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user