diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index deb76f5a1413ac3fb4704cd8c31d9917575e389e..57a3d06967b4c4616b2a2c32ddb4134a152f0548 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -75,7 +75,7 @@ tests: MYSQL_PASSWORD: "castopod" script: - - apt-get install -y mariadb-client libmariadb-dev + - apt-get update && apt-get install -y mariadb-client libmariadb-dev - echo "SHOW DATABASES;" | mysql --user=root --password="$MYSQL_ROOT_PASSWORD" --host=mariadb "$MYSQL_DATABASE" diff --git a/app/Config/App.php b/app/Config/App.php index cf921c7c6e54afd874aaf335b06f0b02b5e56ef6..61b9a511e57988641e8997d730fec53033f543c0 100644 --- a/app/Config/App.php +++ b/app/Config/App.php @@ -456,4 +456,6 @@ class App extends BaseConfig * Storage limit in Gigabytes */ public ?int $storageLimit = null; + + public ?string $legalNoticeURL = null; } diff --git a/app/Helpers/page_helper.php b/app/Helpers/page_helper.php index b0c20929cbe024af5084589b316256110b817c38..43bc5978a1aa3cb2c8b4719d53fae3486eeeb6dc 100644 --- a/app/Helpers/page_helper.php +++ b/app/Helpers/page_helper.php @@ -34,6 +34,15 @@ if (! function_exists('render_page_links')) { ]); } + // if set in .env, add legal notice link at the end of page links + if (config('App')->legalNoticeURL !== null) { + $links .= anchor(config('App')->legalNoticeURL, lang('Common.legal_notice'), [ + 'class' => 'px-2 py-1 underline hover:no-underline focus:ring-accent', + 'target' => '_blank', + 'rel' => 'noopener noreferrer', + ]); + } + return '<nav class="' . $class . '">' . $links . '</nav>'; } } diff --git a/app/Language/en/Common.php b/app/Language/en/Common.php index aff8136b83076d86f2d1ace1dffbeeaca050f7ac..1258afcc192b87891ee510d9b358df436da353dc 100644 --- a/app/Language/en/Common.php +++ b/app/Language/en/Common.php @@ -26,4 +26,5 @@ return [ 'read_less' => 'Read less', 'see_more' => 'See more', 'see_less' => 'See less', + 'legal_notice' => 'Legal notice', ];