From 7d685c5e64149e20c7dc8977f645e050be53ddfd Mon Sep 17 00:00:00 2001 From: Jonas Kohl Date: Tue, 10 Dec 2024 17:15:10 +0100 Subject: Add classic theme --- src/application/templates/old/view_user.twig | 196 +++++++++++++++++++++++++++ 1 file changed, 196 insertions(+) create mode 100644 src/application/templates/old/view_user.twig (limited to 'src/application/templates/old/view_user.twig') diff --git a/src/application/templates/old/view_user.twig b/src/application/templates/old/view_user.twig new file mode 100644 index 0000000..311dfb1 --- /dev/null +++ b/src/application/templates/old/view_user.twig @@ -0,0 +1,196 @@ +{% set canEdit = + currentUser is not null + and ( + ( + ctx.user.id == currentUser.id + and currentUser.hasPermission(permission("EDIT_OWN_USER")) + ) + or currentUser.hasPermission(permission("EDIT_OTHER_USER")) + ) %} + +{% set isOwnProfile = + currentUser is not null + and currentUser.id == ctx.user.id %} + +{% set sUserPossessive = isOwnProfile ? "Your posts" : "%display_name%'s posts" %} + +{% set emailPending = isOwnProfile and ctx.user.pendingEmail is not null %} + +{% set title = ctx.user.displayName %} + +{% extends "base.twig" %} + +{% block content %} + +
+{% endif %}
+
+{{ __(sUserPossessive, { + "display_name": ctx.user.displayName|e("html"), +}) }}+ +{% if ctx.posts|length > 0 %} +
|
+
+ {{ __("Edit profile") }}+ {% set formId = "update_profile" %} + {% set formError = getAndClearFormError(formId) %} + {% if formError %} + {% include "components/alert_error.twig" with { message: formError } %} + {% endif %} + + {% if isOwnProfile %} ++ {{ __("Change password") }}+ {% set formId = "update_password" %} + {% set formError = getAndClearFormError(formId) %} + {% if formError %} + {% include "components/alert_error.twig" with { message: formError } %} + {% endif %} + + {% endif %} + |
+