Add legal links to Help modal
This commit is contained in:
@ -153,3 +153,26 @@ span.caret {
|
||||
padding-inline-start: 0;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.modal-footer {
|
||||
ul.horizontal {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
display: inline;
|
||||
|
||||
li {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
&.dash {
|
||||
li:after {
|
||||
// \00a0 is for , \2013 for –
|
||||
content: "\00a0\2013\00a0";
|
||||
}
|
||||
}
|
||||
|
||||
li:last-child:after {
|
||||
content: "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ class ApplicationController < ActionController::Base
|
||||
|
||||
MEMBER_ACTIONS = %i[destroy edit show update].freeze
|
||||
RENDER_HOST = CodeOcean::Config.new(:code_ocean).read[:render_host]
|
||||
LEGAL_SETTINGS = CodeOcean::Config.new(:code_ocean).read[:legal] || {}
|
||||
|
||||
before_action :deny_access_from_render_host
|
||||
after_action :verify_authorized, except: %i[welcome]
|
||||
|
@ -4,3 +4,10 @@
|
||||
- if local_assigns.has_key?(:execution_environment)
|
||||
h2 = t('shared.help.execution_environment_specific_help', execution_environment: execution_environment)
|
||||
= render_markdown(execution_environment.help)
|
||||
|
||||
- content_for :modal_footer do
|
||||
- if ApplicationController::LEGAL_SETTINGS.present?
|
||||
ul.horizontal.dash.pull-start
|
||||
- ApplicationController::LEGAL_SETTINGS.each do |name, link|
|
||||
li
|
||||
= link_to(t("shared.help.#{name.delete_suffix('_url')}"), link, target: '_blank', rel: 'noopener')
|
||||
|
@ -11,3 +11,4 @@
|
||||
- else
|
||||
= render(layout: false, locals: (local_assigns[:template_variables] || {}).merge(modal: true), template: template)
|
||||
.modal-footer
|
||||
= yield(:modal_footer)
|
||||
|
Reference in New Issue
Block a user