diff --git a/app/assets/stylesheets/base.css.scss b/app/assets/stylesheets/base.css.scss
index d542cfc0..ff240cc2 100644
--- a/app/assets/stylesheets/base.css.scss
+++ b/app/assets/stylesheets/base.css.scss
@@ -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: "";
+ }
+ }
+}
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 60366b3c..602ea9d3 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -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]
diff --git a/app/views/application/help.html.slim b/app/views/application/help.html.slim
index 22c3f955..e784d05b 100644
--- a/app/views/application/help.html.slim
+++ b/app/views/application/help.html.slim
@@ -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')
diff --git a/app/views/shared/_modal.html.slim b/app/views/shared/_modal.html.slim
index 97d6fb1c..0733b314 100644
--- a/app/views/shared/_modal.html.slim
+++ b/app/views/shared/_modal.html.slim
@@ -11,3 +11,4 @@
- else
= render(layout: false, locals: (local_assigns[:template_variables] || {}).merge(modal: true), template: template)
.modal-footer
+ = yield(:modal_footer)
diff --git a/config/code_ocean.yml.example b/config/code_ocean.yml.example
index e170c07f..89e96c0a 100644
--- a/config/code_ocean.yml.example
+++ b/config/code_ocean.yml.example
@@ -1,4 +1,9 @@
default: &default
+ # The following legal URLs are displayed in the help modal of the application.
+ # legal:
+ # imprint_url: https://open.hpi.de/pages/imprint
+ # privacy_policy_url: https://open.hpi.de/pages/data-protection
+
# A public-facing host to be used for the render_file function of the SubmissionsController.
# User content will be served from this host. If not set, the default host is used (less secure!).
# render_host: codeoceanusercontent.com
diff --git a/config/locales/de.yml b/config/locales/de.yml
index 894b2008..b9f1f7ac 100644
--- a/config/locales/de.yml
+++ b/config/locales/de.yml
@@ -870,6 +870,8 @@ de:
general_help: Allgemeine Hilfe
headline: Hilfe
link: Hilfe
+ imprint: Impressum
+ privacy_policy: Datenschutzerklärung
index: Index
message_failure: Leider ist ein Fehler auf unserer Plattform aufgetreten. Bitte probieren Sie es später noch einmal.
websocket_failure: Leider ist ein Verbindungsproblem aufgetreten. Bitte überprüfen Sie Websocket-Verbindungen mit diesem Tool und versuchen Sie es erneut.
diff --git a/config/locales/en.yml b/config/locales/en.yml
index f1538534..fdb4937e 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -870,6 +870,8 @@ en:
general_help: General Help
headline: Help
link: Help
+ imprint: Imprint
+ privacy_policy: Privacy Policy
index: Index
message_failure: 'Sorry, something went wrong.'
websocket_failure: Sorry, a connection issue occoured. Please check WebSocket connections with this tool and try again.