From ad5b075878a4843b9670a09867528c013d3bf1f4 Mon Sep 17 00:00:00 2001 From: ghost Date: Fri, 3 Nov 2023 14:54:12 +0200 Subject: [PATCH] add poster settings to the user profile page --- src/Controller/UserController.php | 1 + templates/default/user/info.html.twig | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/src/Controller/UserController.php b/src/Controller/UserController.php index d6dea1f..a408a11 100644 --- a/src/Controller/UserController.php +++ b/src/Controller/UserController.php @@ -222,6 +222,7 @@ class UserController extends AbstractController 'moderator' => $userTarget->isModerator(), 'approved' => $userTarget->isApproved(), 'status' => $userTarget->isStatus(), + 'posters' => $userTarget->isPosters(), 'sensitive' => $userTarget->isSensitive(), 'yggdrasil' => $userTarget->isYggdrasil(), 'locale' => $userTarget->getLocale(), diff --git a/templates/default/user/info.html.twig b/templates/default/user/info.html.twig index a3632ab..8d660d2 100644 --- a/templates/default/user/info.html.twig +++ b/templates/default/user/info.html.twig @@ -175,6 +175,18 @@ {% for i, locale in user.locales %}{% if i > 0 %},{% endif %} {{ locale|locale_name(locale)|u.title }}{% endfor %} + + + {{ 'Posters' | trans }} + + + {% if user.posters %} + {{ 'Yes' | trans }} + {% else %} + {{ 'No' | trans }} + {% endif %} + + {{ 'Sensitive' | trans }}