Skip to content
Snippets Groups Projects
Commit 711843a0 authored by Yassine Doghri's avatar Yassine Doghri
Browse files

feat: add legalNoticeURL to app config for setting an external url to legal notice

parent 98a8a480
No related branches found
No related tags found
1 merge request!230feat: add legalNoticeURL to app config for setting an external url to legal notice
Pipeline #6716 passed
Pipeline: Castopod

#6717

    ......@@ -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"
    ......
    ......@@ -456,4 +456,6 @@ class App extends BaseConfig
    * Storage limit in Gigabytes
    */
    public ?int $storageLimit = null;
    public ?string $legalNoticeURL = null;
    }
    ......@@ -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>';
    }
    }
    ......@@ -26,4 +26,5 @@ return [
    'read_less' => 'Read less',
    'see_more' => 'See more',
    'see_less' => 'See less',
    'legal_notice' => 'Legal notice',
    ];
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment