Compare commits
2 Commits
improve-do
...
add-splash
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cc30262811 | ||
|
|
252501f789 |
@@ -5,6 +5,7 @@ class BroadcastsController < ApplicationController
|
|||||||
before_action :build_broadcast, only: [:new, :create]
|
before_action :build_broadcast, only: [:new, :create]
|
||||||
before_action :set_broadcast, only: [:show, :destroy, :update]
|
before_action :set_broadcast, only: [:show, :destroy, :update]
|
||||||
before_action :set_multi_view_broadcasts, only: [:show]
|
before_action :set_multi_view_broadcasts, only: [:show]
|
||||||
|
before_action :show_splash_screen, only: :index
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@broadcasts = filtered_broadcasts.order_by_recent.paginate(page: params[:page])
|
@broadcasts = filtered_broadcasts.order_by_recent.paginate(page: params[:page])
|
||||||
@@ -49,6 +50,10 @@ class BroadcastsController < ApplicationController
|
|||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
def show_splash_screen
|
||||||
|
render :splash if broadcasts.count.zero?
|
||||||
|
end
|
||||||
|
|
||||||
def broadcast_params
|
def broadcast_params
|
||||||
params.require(:broadcast).permit(:name, files: [])
|
params.require(:broadcast).permit(:name, files: [])
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -13,10 +13,13 @@ module WordmarkHelper
|
|||||||
css += options[:class].to_s
|
css += options[:class].to_s
|
||||||
|
|
||||||
content_tag(:div, class: css) do
|
content_tag(:div, class: css) do
|
||||||
safe_join [
|
elements = [
|
||||||
content_tag(:span, t("shared.#{product_name}")),
|
content_tag(:span, t("shared.#{product_name}")),
|
||||||
content_tag(:span, t("shared.me"))
|
content_tag(:span, t("shared.me"))
|
||||||
]
|
]
|
||||||
|
prefix = options[:prefix]
|
||||||
|
elements.unshift content_tag(:span, "#{prefix} ") unless prefix.blank?
|
||||||
|
safe_join elements
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
59
app/views/broadcasts/splash.html.erb
Normal file
59
app/views/broadcasts/splash.html.erb
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
<div class="d-flex flex-row">
|
||||||
|
<div class="d-flex flex-column">
|
||||||
|
<%= product_wordmark :direct_me, prefix: t('.headings.welcome'), class: "h2" %>
|
||||||
|
<p class="text-muted"><%= t '.headings.subtitle' %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<%= link_to t(".actions.book_demo"), 'https://meetings.hubspot.com/bray2', class: "btn btn-primary border align-self-center h-50 ml-auto mr-2 pb-2", target: '_blank' %>
|
||||||
|
<% if policy(Broadcast).new? %>
|
||||||
|
<%= link_to t(".actions.create_stream"), [:new, @project, :broadcast], class: "btn btn-success border align-self-center h-50 pb-2" %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<div class="pt-2">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col">
|
||||||
|
<div class="card-body p-0">
|
||||||
|
<div class="embed-responsive embed-responsive-16by9">
|
||||||
|
<div class="embed-responsive-item">
|
||||||
|
<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 class="col">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col">
|
||||||
|
<h3><%= t '.headings.how_it_works' %></h3>
|
||||||
|
<ol>
|
||||||
|
<li><%= t '.list_items.create_stream' %></li>
|
||||||
|
<li><%= t '.list_items.share_stream' %></li>
|
||||||
|
<li><%= t '.list_items.launch_video_conference' %></li>
|
||||||
|
<li><%= t '.list_items.share_files' %></li>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col">
|
||||||
|
<h3><%= t '.headings.benefits' %></h3>
|
||||||
|
<ul class="fa-ul ml-5">
|
||||||
|
<%= content_tag(:li, fa_icon("check li", text: t('.list_items.stream_from_mobile_app'))) %>
|
||||||
|
<%= content_tag(:li, fa_icon("check li", text: t('.list_items.direct_shoots_anywhere'))) %>
|
||||||
|
<%= content_tag(:li, fa_icon("check li", text: t('.list_items.share_live_stream'))) %>
|
||||||
|
<%= content_tag(:li, fa_icon("check li", text: t('.list_items.stream_multiple_cameras'))) %>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -207,6 +207,24 @@ en:
|
|||||||
new:
|
new:
|
||||||
heading:
|
heading:
|
||||||
Create Live Stream
|
Create Live Stream
|
||||||
|
splash:
|
||||||
|
actions:
|
||||||
|
book_demo: Schedule a Demo
|
||||||
|
create_stream: Create New Live Stream
|
||||||
|
headings:
|
||||||
|
benefits: Benefits
|
||||||
|
how_it_works: How It Works
|
||||||
|
subtitle: Remote directing and video village solution
|
||||||
|
welcome: Welcome to
|
||||||
|
list_items:
|
||||||
|
create_stream: Create a live stream
|
||||||
|
direct_shoots_anywhere: Direct shoots anywhere around the world
|
||||||
|
launch_video_conference: Launch Video Conference using plugin
|
||||||
|
share_files: Share files via the ME Suite mobile app
|
||||||
|
share_live_stream: Share live stream with clients all over the the world
|
||||||
|
share_stream: Share live stream link with clients
|
||||||
|
stream_from_mobile_app: Stream from ME Suite Mobile app, or via a professional camera
|
||||||
|
stream_multiple_cameras: Stream multiple cameras at one time
|
||||||
bulk_taggings:
|
bulk_taggings:
|
||||||
new_bulk_tag_modal:
|
new_bulk_tag_modal:
|
||||||
submit: Add
|
submit: Add
|
||||||
@@ -324,11 +342,11 @@ en:
|
|||||||
notice: The release has been updated
|
notice: The release has been updated
|
||||||
helpers:
|
helpers:
|
||||||
help:
|
help:
|
||||||
task_request:
|
|
||||||
time_allowed: Minimum of 2 hours, no partial hours allowed
|
|
||||||
contract_template:
|
contract_template:
|
||||||
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
|
||||||
|
task_request:
|
||||||
|
time_allowed: Minimum of 2 hours, no partial hours allowed
|
||||||
video:
|
video:
|
||||||
audio_only_edl_file: If you do not upload an Audio Only EDL, the software will not generate a BiG Music Cue Sheet.
|
audio_only_edl_file: If you do not upload an Audio Only EDL, the software will not generate a BiG Music Cue Sheet.
|
||||||
edl_file: Please follow our directions on exporting the All Tracks EDL. Failure to do so could result in inaccurate and incomplete reporting.
|
edl_file: Please follow our directions on exporting the All Tracks EDL. Failure to do so could result in inaccurate and incomplete reporting.
|
||||||
|
|||||||
@@ -57,6 +57,25 @@ es:
|
|||||||
pdf:
|
pdf:
|
||||||
do_not_copy_warning: "Do not copy (ES)"
|
do_not_copy_warning: "Do not copy (ES)"
|
||||||
serial_number_label: "Serial Number (ES)"
|
serial_number_label: "Serial Number (ES)"
|
||||||
|
broadcasts:
|
||||||
|
splash:
|
||||||
|
actions:
|
||||||
|
book_demo: Schedule a Demo
|
||||||
|
create_stream: Create New Live Stream
|
||||||
|
headings:
|
||||||
|
benefits: Benefits
|
||||||
|
how_it_works: How It Works
|
||||||
|
subtitle: Remote directing and video village solution
|
||||||
|
welcome: Welcome to
|
||||||
|
list_items:
|
||||||
|
create_stream: Create a live stream
|
||||||
|
direct_shoots_anywhere: Direct shoots anywhere around the world
|
||||||
|
launch_video_conference: Launch Video Conference using plugin
|
||||||
|
share_files: Share files via the ME Suite mobile app
|
||||||
|
share_live_stream: Share live stream with clients all over the the world
|
||||||
|
share_stream: Share live stream link with clients
|
||||||
|
stream_from_mobile_app: Stream from ME Suite Mobile app, or via a professional camera
|
||||||
|
stream_multiple_cameras: Stream multiple cameras at one time
|
||||||
contract_templates:
|
contract_templates:
|
||||||
blank_contracts:
|
blank_contracts:
|
||||||
create:
|
create:
|
||||||
|
|||||||
@@ -9,20 +9,6 @@ SET xmloption = content;
|
|||||||
SET client_min_messages = warning;
|
SET client_min_messages = warning;
|
||||||
SET row_security = off;
|
SET row_security = off;
|
||||||
|
|
||||||
--
|
|
||||||
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: -
|
|
||||||
--
|
|
||||||
|
|
||||||
CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
|
|
||||||
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: -
|
|
||||||
--
|
|
||||||
|
|
||||||
COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
|
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Name: fuzzystrmatch; Type: EXTENSION; Schema: -; Owner: -
|
-- Name: fuzzystrmatch; Type: EXTENSION; Schema: -; Owner: -
|
||||||
--
|
--
|
||||||
@@ -331,8 +317,8 @@ CREATE TABLE public.appearance_releases (
|
|||||||
person_last_name character varying,
|
person_last_name character varying,
|
||||||
guardian_first_name character varying,
|
guardian_first_name character varying,
|
||||||
guardian_last_name character varying,
|
guardian_last_name character varying,
|
||||||
guardian_email character varying,
|
|
||||||
identifier character varying,
|
identifier character varying,
|
||||||
|
guardian_email character varying,
|
||||||
person_address_street2 character varying,
|
person_address_street2 character varying,
|
||||||
person_address_city character varying,
|
person_address_city character varying,
|
||||||
person_address_state character varying,
|
person_address_state character varying,
|
||||||
@@ -666,15 +652,6 @@ CREATE SEQUENCE public.contract_templates_id_seq
|
|||||||
ALTER SEQUENCE public.contract_templates_id_seq OWNED BY public.contract_templates.id;
|
ALTER SEQUENCE public.contract_templates_id_seq OWNED BY public.contract_templates.id;
|
||||||
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Name: data_migrations; Type: TABLE; Schema: public; Owner: -
|
|
||||||
--
|
|
||||||
|
|
||||||
CREATE TABLE public.data_migrations (
|
|
||||||
version character varying NOT NULL
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Name: directories; Type: TABLE; Schema: public; Owner: -
|
-- Name: directories; Type: TABLE; Schema: public; Owner: -
|
||||||
--
|
--
|
||||||
@@ -1401,6 +1378,7 @@ CREATE TABLE public.settings (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE SEQUENCE public.settings_id_seq
|
CREATE SEQUENCE public.settings_id_seq
|
||||||
|
AS integer
|
||||||
START WITH 1
|
START WITH 1
|
||||||
INCREMENT BY 1
|
INCREMENT BY 1
|
||||||
NO MINVALUE
|
NO MINVALUE
|
||||||
@@ -1436,6 +1414,7 @@ CREATE TABLE public.taggings (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE SEQUENCE public.taggings_id_seq
|
CREATE SEQUENCE public.taggings_id_seq
|
||||||
|
AS integer
|
||||||
START WITH 1
|
START WITH 1
|
||||||
INCREMENT BY 1
|
INCREMENT BY 1
|
||||||
NO MINVALUE
|
NO MINVALUE
|
||||||
@@ -1466,6 +1445,7 @@ CREATE TABLE public.tags (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE SEQUENCE public.tags_id_seq
|
CREATE SEQUENCE public.tags_id_seq
|
||||||
|
AS integer
|
||||||
START WITH 1
|
START WITH 1
|
||||||
INCREMENT BY 1
|
INCREMENT BY 1
|
||||||
NO MINVALUE
|
NO MINVALUE
|
||||||
@@ -1826,9 +1806,9 @@ CREATE TABLE public.zoom_meetings (
|
|||||||
api_meeting_id character varying,
|
api_meeting_id character varying,
|
||||||
created_at timestamp(6) without time zone NOT NULL,
|
created_at timestamp(6) without time zone NOT NULL,
|
||||||
updated_at timestamp(6) without time zone NOT NULL,
|
updated_at timestamp(6) without time zone NOT NULL,
|
||||||
status integer DEFAULT 0,
|
|
||||||
zoom_user_id bigint,
|
zoom_user_id bigint,
|
||||||
project_id bigint
|
project_id bigint,
|
||||||
|
status integer DEFAULT 0
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@@ -2305,14 +2285,6 @@ ALTER TABLE ONLY public.contract_templates
|
|||||||
ADD CONSTRAINT contract_templates_pkey PRIMARY KEY (id);
|
ADD CONSTRAINT contract_templates_pkey PRIMARY KEY (id);
|
||||||
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Name: data_migrations data_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
|
||||||
--
|
|
||||||
|
|
||||||
ALTER TABLE ONLY public.data_migrations
|
|
||||||
ADD CONSTRAINT data_migrations_pkey PRIMARY KEY (version);
|
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Name: directories directories_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
-- Name: directories directories_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||||||
--
|
--
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ RSpec.describe BroadcastsController, type: :controller do
|
|||||||
expect(response).to be_successful
|
expect(response).to be_successful
|
||||||
end
|
end
|
||||||
|
|
||||||
it "renders content" do
|
it "renders content if theere are existing broadcasts" do
|
||||||
create(:broadcast, project: project, name: "Another Broadcast")
|
create(:broadcast, project: project, name: "Another Broadcast")
|
||||||
|
|
||||||
get :index, params: { project_id: project }
|
get :index, params: { project_id: project }
|
||||||
@@ -34,12 +34,13 @@ RSpec.describe BroadcastsController, type: :controller do
|
|||||||
end
|
end
|
||||||
|
|
||||||
context "when there are no active broadcasts" do
|
context "when there are no active broadcasts" do
|
||||||
it "renders an empty message" do
|
it "renders splash screen" do
|
||||||
Broadcast.destroy_all
|
Broadcast.destroy_all
|
||||||
|
|
||||||
get :index, params: { project_id: project }
|
get :index, params: { project_id: project }
|
||||||
|
|
||||||
expect(response.body).to have_content("Live streams will appear here")
|
expect(response.body).to have_link create_stream
|
||||||
|
expect(response.body).to have_link schedule_demo
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -55,10 +56,8 @@ RSpec.describe BroadcastsController, type: :controller do
|
|||||||
|
|
||||||
context "for xhr request" do
|
context "for xhr request" do
|
||||||
it "filters the broadcasts by a query param" do
|
it "filters the broadcasts by a query param" do
|
||||||
appearance_releases = [
|
create(:broadcast, project: project, skip_create_callback: true, name: "Stream by Adam")
|
||||||
create(:broadcast, skip_create_callback: true, name: "Stream by Adam"),
|
create(:broadcast, project: project, skip_create_callback: true, name: "Stream by Zoe")
|
||||||
create(:broadcast, skip_create_callback: true, name: "Stream by Zoe"),
|
|
||||||
]
|
|
||||||
|
|
||||||
get :index, params: { project_id: project, query: "Zoe" }, xhr: true
|
get :index, params: { project_id: project, query: "Zoe" }, xhr: true
|
||||||
|
|
||||||
@@ -245,4 +244,12 @@ RSpec.describe BroadcastsController, type: :controller do
|
|||||||
|
|
||||||
{ files: [contract_file] }
|
{ files: [contract_file] }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def schedule_demo
|
||||||
|
t 'broadcasts.splash.actions.book_demo'
|
||||||
|
end
|
||||||
|
|
||||||
|
def create_stream
|
||||||
|
t 'broadcasts.splash.actions.create_stream'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -12,6 +12,13 @@ feature 'User managing broadcasts' do
|
|||||||
allow(MuxLiveStream).to receive(:new).and_return(double(id: 'id', key: 'key', playback_id: 'playback_id'))
|
allow(MuxLiveStream).to receive(:new).and_return(double(id: 'id', key: 'key', playback_id: 'playback_id'))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
scenario "splash page is shown if there are no existing streams" do
|
||||||
|
visit project_broadcasts_path(project)
|
||||||
|
|
||||||
|
expect(page).to have_content schedule_demo
|
||||||
|
expect(page).to have_content create_stream
|
||||||
|
end
|
||||||
|
|
||||||
scenario 'creating and deleting a broadcast', js: true do
|
scenario 'creating and deleting a broadcast', js: true do
|
||||||
visit new_project_broadcast_path(project)
|
visit new_project_broadcast_path(project)
|
||||||
|
|
||||||
@@ -131,6 +138,29 @@ feature 'User managing broadcasts' do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context 'When the user is associate' do
|
||||||
|
let(:current_user) { create(:user, :associate) }
|
||||||
|
|
||||||
|
it 'does not show button to create new live stream' do
|
||||||
|
visit project_broadcasts_path(project)
|
||||||
|
|
||||||
|
expect(page).to have_content schedule_demo
|
||||||
|
expect(page).not_to have_content create_stream
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
context 'When the user is account manager' do
|
||||||
|
let(:current_user) { create(:user, :account_manager) }
|
||||||
|
|
||||||
|
it 'does show button to create new live stream' do
|
||||||
|
visit project_broadcasts_path(project)
|
||||||
|
|
||||||
|
expect(page).to have_content schedule_demo
|
||||||
|
expect(page).to have_content create_stream
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
@@ -151,4 +181,12 @@ feature 'User managing broadcasts' do
|
|||||||
def switch_view_dropdown
|
def switch_view_dropdown
|
||||||
'Switch View'
|
'Switch View'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def schedule_demo
|
||||||
|
t 'broadcasts.splash.actions.book_demo'
|
||||||
|
end
|
||||||
|
|
||||||
|
def create_stream
|
||||||
|
t 'broadcasts.splash.actions.create_stream'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user