From 44927e2d07c7df6e6ded3427d26a38c9af23686b Mon Sep 17 00:00:00 2001 From: ghost Date: Mon, 9 Oct 2023 21:05:30 +0300 Subject: [PATCH] add profile settings link --- src/Controller/UserController.php | 3 ++- templates/default/user/info.html.twig | 17 ++++++++++++++--- templates/default/user/profile.html.twig | 4 +++- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/Controller/UserController.php b/src/Controller/UserController.php index da71b25..ac5a1ee 100644 --- a/src/Controller/UserController.php +++ b/src/Controller/UserController.php @@ -240,7 +240,8 @@ class UserController extends AbstractController $userTarget->getAddress(), 48 ), - 'star' => + 'owner' => $user->getId() === $userTarget->getId(), + 'star' => [ 'exist' => (bool) $userService->findUserStar( $user->getId(), diff --git a/templates/default/user/info.html.twig b/templates/default/user/info.html.twig index f112700..70897e1 100644 --- a/templates/default/user/info.html.twig +++ b/templates/default/user/info.html.twig @@ -119,12 +119,23 @@ - {{ 'Settings'|trans }} + + {% if user.owner %} + + + + + + {% endif %} + {{ 'Settings' | trans }} + - {{ 'Interface'|trans }} - {{ user.locale|locale_name(user.locale)|u.title }} + {{ 'Interface' | trans }} + + + {{ user.locale | locale_name(user.locale) | u.title }} diff --git a/templates/default/user/profile.html.twig b/templates/default/user/profile.html.twig index ed208dd..fedd7fc 100644 --- a/templates/default/user/profile.html.twig +++ b/templates/default/user/profile.html.twig @@ -66,7 +66,9 @@ - {{ 'Settings'|trans }} + + {{ 'Settings' |trans }} + {{ 'Interface'|trans }}