generated from dxw/rails-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
99a8bc9
commit 08e3ab7
Showing
5 changed files
with
135 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,17 @@ | ||
module Evaluation | ||
class ApplicationController < ::ApplicationController | ||
protected | ||
|
||
def authenticate_user! | ||
return unless current_user.guest? | ||
|
||
session.delete(:dfe_sign_in_uid) | ||
|
||
if params[:controller] == "evaluation/tasks" && params[:action] == "edit" | ||
session[:email_evaluator_link] = evaluation_task_path(id: params[:id], host: request.host) | ||
end | ||
|
||
redirect_to root_path, notice: I18n.t("banner.session.visitor") | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<%= content_for :title, I18n.t("specifying.start_page.page_title") %> | ||
|
||
<h1 class="govuk-heading-xl"> | ||
<%= I18n.t("specifying.start_page.page_title") %> | ||
</h1> | ||
|
||
<p class="govuk-body"> | ||
<%= I18n.t("specifying.start_page.overview_purpose") %> | ||
</p> | ||
|
||
<ul class="govuk-list govuk-list--bullet"> | ||
<% I18n.t("specifying.start_page.overview_supported_category_list").each do |list_item| %> | ||
<li><%= list_item %></li> | ||
<% end %> | ||
</ul> | ||
|
||
<p class="govuk-body"> | ||
<%= I18n.t("specifying.start_page.overview_download") %> | ||
</p> | ||
|
||
<p class="govuk-body"><%= I18n.t("specifying.start_page.who_can_use_body") %></p> | ||
<ul class="govuk-list govuk-list--bullet"> | ||
<% I18n.t("specifying.start_page.who_can_use_list").each do |list_item| %> | ||
<li><%= list_item %></li> | ||
<% end %> | ||
</ul> | ||
|
||
<% if PagesController.bypass_dsi? %> | ||
<%= button_to "/auth/developer", class: "govuk-button govuk-!-margin-top-2 govuk-!-margin-bottom-8 govuk-button--start" do %> | ||
<%= "#{I18n.t("generic.button.start")} (bypass DSI)" %> | ||
<svg class="govuk-button__start-icon" xmlns="http://www.w3.org/2000/svg" width="17.5" height="19" viewBox="0 0 33 40" aria-hidden="true" focusable="false"> | ||
<path fill="currentColor" d="M0 0h13l20 20-20 20H0l20-20z" /> | ||
</svg> | ||
<% end %> | ||
<% else %> | ||
<%= button_to @start_now_button_route, | ||
:method => @start_now_button_method, | ||
class: "govuk-button govuk-!-margin-top-2 govuk-!-margin-bottom-8 govuk-button--start" do %> | ||
<%= I18n.t("generic.button.start") %> | ||
<svg class="govuk-button__start-icon" xmlns="http://www.w3.org/2000/svg" width="17.5" height="19" viewBox="0 0 33 40" aria-hidden="true" focusable="false"> | ||
<path fill="currentColor" d="M0 0h13l20 20-20 20H0l20-20z" /> | ||
</svg> | ||
<% end %> | ||
<% end %> | ||
|
||
<h2 class="govuk-heading-m"> | ||
<%= I18n.t("specifying.start_page.before_you_start_title") %> | ||
</h2> | ||
|
||
<% I18n.t("specifying.start_page.before_you_start_body").each do |paragraph| %> | ||
<p class="govuk-body"><%= paragraph %></p> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<%= content_for :title, I18n.t("specifying.start_page.page_title") %> | ||
|
||
<h1 class="govuk-heading-xl"> | ||
<%= I18n.t("specifying.evaluation_page.page_title")%> | ||
</h1> | ||
|
||
<p class="govuk-body"> | ||
<%= I18n.t("specifying.evaluation_page.overview_purpose") %> | ||
</p> | ||
|
||
<ul class="govuk-list govuk-list--bullet"> | ||
<% I18n.t("specifying.evaluation_page.overview_supported_category_list").each do |list_item| %> | ||
<li><%= list_item %></li> | ||
<% end %> | ||
</ul> | ||
|
||
<p class="govuk-body"> | ||
<%= I18n.t("specifying.evaluation_page.overview_declaration") %> | ||
</p> | ||
|
||
<p class="govuk-body"> | ||
<%= I18n.t("specifying.evaluation_page.watch_video") %> | ||
<%= govuk_link_to I18n.t("specifying.evaluation_page.watch_video_link"), "https://www.youtube.com/watch?v=cbL65QlOas4", no_visited_state: true, target: "_blank" %> | ||
</p> | ||
<p class="govuk-body"><%= I18n.t("specifying.evaluation_page.evaluate_independently") %></p> | ||
<p class="govuk-body"><%= I18n.t("specifying.evaluation_page.justification") %></p> | ||
|
||
|
||
<% if PagesController.bypass_dsi? %> | ||
<%= button_to "/auth/developer", class: "govuk-button govuk-!-margin-top-2 govuk-!-margin-bottom-8 govuk-button--start" do %> | ||
<%= "#{I18n.t("generic.button.start")} (bypass DSI)" %> | ||
<svg class="govuk-button__start-icon" xmlns="http://www.w3.org/2000/svg" width="17.5" height="19" viewBox="0 0 33 40" aria-hidden="true" focusable="false"> | ||
<path fill="currentColor" d="M0 0h13l20 20-20 20H0l20-20z" /> | ||
</svg> | ||
<% end %> | ||
<% else %> | ||
<%= button_to @start_now_button_route, | ||
:method => @start_now_button_method, | ||
class: "govuk-button govuk-!-margin-top-2 govuk-!-margin-bottom-8 govuk-button--start" do %> | ||
<%= I18n.t("generic.button.start") %> | ||
<svg class="govuk-button__start-icon" xmlns="http://www.w3.org/2000/svg" width="17.5" height="19" viewBox="0 0 33 40" aria-hidden="true" focusable="false"> | ||
<path fill="currentColor" d="M0 0h13l20 20-20 20H0l20-20z" /> | ||
</svg> | ||
<% end %> | ||
<% end %> | ||
|
||
<h2 class="govuk-heading-m"> | ||
<%= I18n.t("specifying.start_page.before_you_start_title") %> | ||
</h2> | ||
|
||
<% I18n.t("specifying.evaluation_page.before_you_start_body").each do |paragraph| %> | ||
<p class="govuk-body"><%= paragraph %></p> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,7 @@ | ||
<%= content_for :title, I18n.t("specifying.start_page.page_title") %> | ||
|
||
<h1 class="govuk-heading-xl"> | ||
<%= I18n.t("specifying.start_page.page_title") %> | ||
</h1> | ||
|
||
<p class="govuk-body"> | ||
<%= I18n.t("specifying.start_page.overview_purpose") %> | ||
</p> | ||
|
||
<ul class="govuk-list govuk-list--bullet"> | ||
<% I18n.t("specifying.start_page.overview_supported_category_list").each do |list_item| %> | ||
<li><%= list_item %></li> | ||
<% end %> | ||
</ul> | ||
|
||
<p class="govuk-body"> | ||
<%= I18n.t("specifying.start_page.overview_download") %> | ||
</p> | ||
|
||
<p class="govuk-body"><%= I18n.t("specifying.start_page.who_can_use_body") %></p> | ||
<ul class="govuk-list govuk-list--bullet"> | ||
<% I18n.t("specifying.start_page.who_can_use_list").each do |list_item| %> | ||
<li><%= list_item %></li> | ||
<% end %> | ||
</ul> | ||
|
||
<% if PagesController.bypass_dsi? %> | ||
<%= button_to "/auth/developer", class: "govuk-button govuk-!-margin-top-2 govuk-!-margin-bottom-8 govuk-button--start" do %> | ||
<%= "#{I18n.t("generic.button.start")} (bypass DSI)" %> | ||
<svg class="govuk-button__start-icon" xmlns="http://www.w3.org/2000/svg" width="17.5" height="19" viewBox="0 0 33 40" aria-hidden="true" focusable="false"> | ||
<path fill="currentColor" d="M0 0h13l20 20-20 20H0l20-20z" /> | ||
</svg> | ||
<% end %> | ||
<% if session[:email_evaluator_link].present? %> | ||
<%= render 'evaluation'%> | ||
<% else %> | ||
<%= button_to @start_now_button_route, | ||
:method => @start_now_button_method, | ||
class: "govuk-button govuk-!-margin-top-2 govuk-!-margin-bottom-8 govuk-button--start" do %> | ||
<%= I18n.t("generic.button.start") %> | ||
<svg class="govuk-button__start-icon" xmlns="http://www.w3.org/2000/svg" width="17.5" height="19" viewBox="0 0 33 40" aria-hidden="true" focusable="false"> | ||
<path fill="currentColor" d="M0 0h13l20 20-20 20H0l20-20z" /> | ||
</svg> | ||
<% end %> | ||
<% end %> | ||
|
||
<h2 class="govuk-heading-m"> | ||
<%= I18n.t("specifying.start_page.before_you_start_title") %> | ||
</h2> | ||
|
||
<% I18n.t("specifying.start_page.before_you_start_body").each do |paragraph| %> | ||
<p class="govuk-body"><%= paragraph %></p> | ||
<%= render 'default'%> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters