Compare commits
3 Commits
add-second
...
directme-b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6a2fb533cb | ||
|
|
8951667e61 | ||
|
|
fe131491cd |
@@ -33,7 +33,7 @@
|
|||||||
<%= link_to "Switch View", "#", class: "btn btn-light border dropdown-toggle", role: "button", id: "dropdownMenuLink", data: { toggle: "dropdown" }, aria: { haspopup: "true", expanded: "false" } %>
|
<%= link_to "Switch View", "#", class: "btn btn-light border dropdown-toggle", role: "button", id: "dropdownMenuLink", data: { toggle: "dropdown" }, aria: { haspopup: "true", expanded: "false" } %>
|
||||||
<div class="dropdown-menu" aria-labelledby="dropdownMenuLink">
|
<div class="dropdown-menu" aria-labelledby="dropdownMenuLink">
|
||||||
<h5 class="dropdown-header">Live Streams</h5>
|
<h5 class="dropdown-header">Live Streams</h5>
|
||||||
<span class="dropdown-item active"><%= fa_icon("check", text: @broadcast.name.titleize) %></span>
|
<%= link_to fa_icon("check", text: @broadcast.name.titleize), "#", class: "dropdown-item active" %>
|
||||||
<% @multi_view_broadcasts.each do |broadcast| %>
|
<% @multi_view_broadcasts.each do |broadcast| %>
|
||||||
<% if broadcast.id != @broadcast.id %>
|
<% if broadcast.id != @broadcast.id %>
|
||||||
<%= link_to broadcast.name.titleize, broadcast.url, class: class_string("dropdown-item", "active" => @broadcast.id == broadcast.id) %>
|
<%= link_to broadcast.name.titleize, broadcast.url, class: class_string("dropdown-item", "active" => @broadcast.id == broadcast.id) %>
|
||||||
@@ -159,4 +159,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
</div>
|
||||||
|
|||||||
8
app/views/contracts/_medical_questionnaire.html.erb
Normal file
8
app/views/contracts/_medical_questionnaire.html.erb
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<p class="heading"><strong><u><%= t ".heading" %></u></strong></p>
|
||||||
|
|
||||||
|
<% (1..MedicalRelease::NUMBER_OF_CUSTOM_FIELDS).each do |n| %>
|
||||||
|
<% if contract_template.public_send("question_#{n}_text").present? %>
|
||||||
|
<p><strong><%= contract_template.public_send("question_#{n}_text") %></strong></p>
|
||||||
|
<p><%= releasable.public_send("question_#{n}_answer") %></p>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
@@ -39,15 +39,6 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<% if releasable.model_name == "MedicalRelease" %>
|
|
||||||
<% (1..MedicalRelease::NUMBER_OF_CUSTOM_FIELDS).each do |n| %>
|
|
||||||
<% if contract_template.public_send("question_#{n}_text").present? %>
|
|
||||||
<p><strong><%= contract_template.public_send("question_#{n}_text") %></strong></p>
|
|
||||||
<p><%= releasable.public_send("question_#{n}_answer") %></p>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% if releasable.minor? %>
|
<% if releasable.minor? %>
|
||||||
<br/>
|
<br/>
|
||||||
<p class="text-left"><strong>Guardian Information</strong></p>
|
<p class="text-left"><strong>Guardian Information</strong></p>
|
||||||
|
|||||||
@@ -15,6 +15,13 @@
|
|||||||
<p class="text-left"><strong>Guardian Clause</strong></p>
|
<p class="text-left"><strong>Guardian Clause</strong></p>
|
||||||
<%= contract_template.guardian_clause %>
|
<%= contract_template.guardian_clause %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
<% if releasable.model_name == "MedicalRelease" %>
|
||||||
|
<div class="page">
|
||||||
|
<%= render "contracts/medical_questionnaire", releasable: releasable, contract_template: contract_template, preview: preview %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<div class="page">
|
<div class="page">
|
||||||
<%= render "contracts/signature_page", releasable: releasable, contract_template: contract_template, preview: preview %>
|
<%= render "contracts/signature_page", releasable: releasable, contract_template: contract_template, preview: preview %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -246,6 +246,8 @@ en:
|
|||||||
new:
|
new:
|
||||||
heading: New Release Template
|
heading: New Release Template
|
||||||
contracts:
|
contracts:
|
||||||
|
medical_questionnaire:
|
||||||
|
heading: Medical Questionnaire
|
||||||
photos:
|
photos:
|
||||||
guardian_2_photo_heading: Second guardian photo
|
guardian_2_photo_heading: Second guardian photo
|
||||||
guardian_photo_heading: Guardian photo
|
guardian_photo_heading: Guardian photo
|
||||||
|
|||||||
@@ -9,6 +9,20 @@ 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: -
|
||||||
--
|
--
|
||||||
@@ -290,7 +304,7 @@ ALTER SEQUENCE public.active_storage_blobs_id_seq OWNED BY public.active_storage
|
|||||||
CREATE TABLE public.appearance_releases (
|
CREATE TABLE public.appearance_releases (
|
||||||
id bigint NOT NULL,
|
id bigint NOT NULL,
|
||||||
person_name_old character varying,
|
person_name_old character varying,
|
||||||
person_address_street1 character varying,
|
person_address_old character varying,
|
||||||
person_phone character varying,
|
person_phone character varying,
|
||||||
project_id bigint,
|
project_id bigint,
|
||||||
created_at timestamp without time zone NOT NULL,
|
created_at timestamp without time zone NOT NULL,
|
||||||
@@ -319,6 +333,7 @@ CREATE TABLE public.appearance_releases (
|
|||||||
guardian_last_name character varying,
|
guardian_last_name character varying,
|
||||||
identifier character varying,
|
identifier character varying,
|
||||||
guardian_email character varying,
|
guardian_email character varying,
|
||||||
|
person_address_street1 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,
|
||||||
@@ -1378,7 +1393,6 @@ 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
|
||||||
@@ -1414,7 +1428,6 @@ 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
|
||||||
@@ -1445,7 +1458,6 @@ 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
|
||||||
@@ -3808,6 +3820,7 @@ INSERT INTO "schema_migrations" (version) VALUES
|
|||||||
('20200612121539'),
|
('20200612121539'),
|
||||||
('20200615131722'),
|
('20200615131722'),
|
||||||
('20200615133602'),
|
('20200615133602'),
|
||||||
|
('20200615140920'),
|
||||||
('20200616124214'),
|
('20200616124214'),
|
||||||
('20200619081446'),
|
('20200619081446'),
|
||||||
('20200619085823'),
|
('20200619085823'),
|
||||||
|
|||||||
@@ -54,6 +54,46 @@ feature "User managing broadcasts" do
|
|||||||
expect(page).to have_content(recording.download_file_name)
|
expect(page).to have_content(recording.download_file_name)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
scenario "user can go back and forth between live session and previous sessions", js: true do
|
||||||
|
broadcast = create(:broadcast, :with_stream, :with_files, project: project)
|
||||||
|
recording = create(:broadcast_recording, broadcast: broadcast)
|
||||||
|
|
||||||
|
visit project_broadcast_path(project, broadcast)
|
||||||
|
|
||||||
|
expect(page).to have_content broadcast.name.titleize, count: 1
|
||||||
|
expect(page).to have_content recording.download_file_name, count: 0
|
||||||
|
|
||||||
|
click_on switch_view_dropdown
|
||||||
|
expect(page).to have_content broadcast.name.titleize, count: 2
|
||||||
|
expect(page).to have_content recording.download_file_name, count: 1
|
||||||
|
|
||||||
|
live_stream_nav_item = page.find(".dropdown-item", text: broadcast.name.titleize)
|
||||||
|
recording_nav_item = page.find(".dropdown-item", text: recording.download_file_name)
|
||||||
|
|
||||||
|
expect(live_stream_nav_item[:class].include?("active")).to eq true
|
||||||
|
expect(recording_nav_item[:class].include?("active")).to eq false
|
||||||
|
|
||||||
|
click_on recording.download_file_name
|
||||||
|
|
||||||
|
expect(page).to have_content broadcast.name.titleize, count: 1
|
||||||
|
expect(page).to have_content recording.download_file_name, count: 0
|
||||||
|
expect(live_stream_nav_item[:class].include?("active")).to eq false
|
||||||
|
expect(recording_nav_item[:class].include?("active")).to eq true
|
||||||
|
|
||||||
|
click_on switch_view_dropdown
|
||||||
|
click_on broadcast.name.titleize
|
||||||
|
|
||||||
|
expect(page).to have_content broadcast.name.titleize, count: 1
|
||||||
|
expect(page).to have_content recording.download_file_name, count: 0
|
||||||
|
|
||||||
|
# Page is reloaded, we need to get dropdown items again
|
||||||
|
live_stream_nav_item = page.find(".dropdown-item", text: broadcast.name.titleize, visible: :all)
|
||||||
|
recording_nav_item = page.find(".dropdown-item", text: recording.download_file_name, visible: :all)
|
||||||
|
|
||||||
|
expect(live_stream_nav_item[:class].include?("active")).to eq true
|
||||||
|
expect(recording_nav_item[:class].include?("active")).to eq false
|
||||||
|
end
|
||||||
|
|
||||||
scenario "form will not submit if user clicks Add files without selected files", js: true do
|
scenario "form will not submit if user clicks Add files without selected files", js: true do
|
||||||
broadcast = create(:broadcast, :with_stream, :with_files, project: project)
|
broadcast = create(:broadcast, :with_stream, :with_files, project: project)
|
||||||
|
|
||||||
@@ -74,9 +114,9 @@ feature "User managing broadcasts" do
|
|||||||
|
|
||||||
new_window = window_opened_by { click_link "Multi-View" }
|
new_window = window_opened_by { click_link "Multi-View" }
|
||||||
within_window new_window do
|
within_window new_window do
|
||||||
expect(page).to have_content("Switch View")
|
expect(page).to have_content switch_view_dropdown
|
||||||
|
|
||||||
click_on "Switch View"
|
click_on switch_view_dropdown
|
||||||
expect(page).to have_link("Broadcast 1")
|
expect(page).to have_link("Broadcast 1")
|
||||||
expect(page).to have_link("Broadcast 2")
|
expect(page).to have_link("Broadcast 2")
|
||||||
|
|
||||||
@@ -106,4 +146,8 @@ feature "User managing broadcasts" do
|
|||||||
all('input[type="checkbox"]')[0].click
|
all('input[type="checkbox"]')[0].click
|
||||||
all('input[type="checkbox"]')[1].click
|
all('input[type="checkbox"]')[1].click
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def switch_view_dropdown
|
||||||
|
"Switch View"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user