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/base.twig | 223 +++++++++++++++++++ .../templates/old/components/alert_error.twig | 11 + .../templates/old/components/alert_info.twig | 11 + .../templates/old/components/alert_success.twig | 11 + src/application/templates/old/components/post.twig | 169 +++++++++++++++ .../templates/old/components/post_editor.twig | 37 ++++ .../templates/old/components/topic_log.twig | 60 ++++++ src/application/templates/old/delete_post.twig | 42 ++++ src/application/templates/old/delete_topic.twig | 36 ++++ src/application/templates/old/error_page.twig | 12 ++ src/application/templates/old/info_page.twig | 12 ++ src/application/templates/old/login.twig | 51 +++++ src/application/templates/old/new_password.twig | 40 ++++ src/application/templates/old/new_topic.twig | 32 +++ src/application/templates/old/password_reset.twig | 45 ++++ src/application/templates/old/register.twig | 77 +++++++ src/application/templates/old/search.twig | 77 +++++++ src/application/templates/old/view_topic.twig | 237 +++++++++++++++++++++ src/application/templates/old/view_topics.twig | 30 +++ src/application/templates/old/view_user.twig | 196 +++++++++++++++++ src/application/themes/old/theme.json | 11 + 21 files changed, 1420 insertions(+) create mode 100644 src/application/templates/old/base.twig create mode 100644 src/application/templates/old/components/alert_error.twig create mode 100644 src/application/templates/old/components/alert_info.twig create mode 100644 src/application/templates/old/components/alert_success.twig create mode 100644 src/application/templates/old/components/post.twig create mode 100644 src/application/templates/old/components/post_editor.twig create mode 100644 src/application/templates/old/components/topic_log.twig create mode 100644 src/application/templates/old/delete_post.twig create mode 100644 src/application/templates/old/delete_topic.twig create mode 100644 src/application/templates/old/error_page.twig create mode 100644 src/application/templates/old/info_page.twig create mode 100644 src/application/templates/old/login.twig create mode 100644 src/application/templates/old/new_password.twig create mode 100644 src/application/templates/old/new_topic.twig create mode 100644 src/application/templates/old/password_reset.twig create mode 100644 src/application/templates/old/register.twig create mode 100644 src/application/templates/old/search.twig create mode 100644 src/application/templates/old/view_topic.twig create mode 100644 src/application/templates/old/view_topics.twig create mode 100644 src/application/templates/old/view_user.twig create mode 100644 src/application/themes/old/theme.json (limited to 'src/application') diff --git a/src/application/templates/old/base.twig b/src/application/templates/old/base.twig new file mode 100644 index 0000000..7b358d0 --- /dev/null +++ b/src/application/templates/old/base.twig @@ -0,0 +1,223 @@ +{%- if title -%} + {%- set title = title ~ " | " -%} +{%- endif -%} +{%- set title = title ~ (g.env.MYSTIC_FORUM_TITLE|default("Forum")) -%} +{%- set nextParam = "" -%} +{%- if g.globals.action in ["login", "register"] -%} + {%- set nextParam = g.get.next|default("") -%} +{%- else -%} + {%- set nextParam = g.server.REQUEST_URI -%} +{%- endif -%} + + + + + + + + + {{ title }} + + + {% block head_after %}{% endblock %} + + + + +{% block nav %} + + + +{% endblock %} + +{% block main %} + +{% endblock %} + +{% block footer %} + + + +{% endblock %} + +{% block scripts %} + + +{% endblock %} + +
+ + + +
+ + +{% block navbar %} + {% if currentUser %} + + +  {{ __("Search") }} +  {{ __("View profile") }} + + {% else %} + +  {{ __("Search") }} +  {{ __("Log in") }} + {% if constant("REGISTRATION_ENABLED") %} +  {{ __("Register") }} + {% endif %} + {% endif %} +{% endblock %} + +
{{ __("Welcome, %user%!", { + user: currentUser.id == constant("mystic\\forum\\orm\\User::SUPERUSER_ID") ? ('' ~ (currentUser.displayName|e("html")) ~ '')|raw : ('' ~ (currentUser.displayName|e("html")) ~ '')|raw + }) }} {{ __("Start") }} {{ __("Log out") }} {{ __("Start") }}
+
+
+ {% block content %}{% endblock %} +
+ + + + + + +
+ + diff --git a/src/application/templates/old/components/alert_error.twig b/src/application/templates/old/components/alert_error.twig new file mode 100644 index 0000000..a45559c --- /dev/null +++ b/src/application/templates/old/components/alert_error.twig @@ -0,0 +1,11 @@ + + +
+   + {%- if message starts with "?!HTML::" -%} + {{- message|slice(8)|raw -}} + {%- else -%} + {{- message -}} + {%- endif -%} +
+
diff --git a/src/application/templates/old/components/alert_info.twig b/src/application/templates/old/components/alert_info.twig new file mode 100644 index 0000000..d45410c --- /dev/null +++ b/src/application/templates/old/components/alert_info.twig @@ -0,0 +1,11 @@ + + +
+   + {%- if message starts with "?!HTML::" -%} + {{- message|slice(8)|raw -}} + {%- else -%} + {{- message -}} + {%- endif -%} +
+
\ No newline at end of file diff --git a/src/application/templates/old/components/alert_success.twig b/src/application/templates/old/components/alert_success.twig new file mode 100644 index 0000000..2192358 --- /dev/null +++ b/src/application/templates/old/components/alert_success.twig @@ -0,0 +1,11 @@ + + +
+   + {%- if message starts with "?!HTML::" -%} + {{- message|slice(8)|raw -}} + {%- else -%} + {{- message -}} + {%- endif -%} +
+
diff --git a/src/application/templates/old/components/post.twig b/src/application/templates/old/components/post.twig new file mode 100644 index 0000000..6b04bca --- /dev/null +++ b/src/application/templates/old/components/post.twig @@ -0,0 +1,169 @@ +{%- set fileAttachments = attachments|filter(a => not (a.mimeType starts with "image/" or a.mimeType starts with "video/")) -%} +{%- set imageAttachments = attachments|filter(a => a.mimeType starts with "image/" or a.mimeType starts with "video/") -%} + +{%- set canReply = + not post.deleted + and not topic.isLocked + and currentUser is not null + and currentUser.hasPermission(permission("CREATE_OWN_POST")) +-%} + +{%- set canEdit = + not post.deleted + and not topic.isLocked + and currentUser is not null + and ( + ( + postAuthor is not null + and postAuthor.id == currentUser.id + and postAuthor.hasPermission(permission("EDIT_OWN_POST")) + ) + or currentUser.hasPermission(permission("EDIT_OTHER_POST")) + ) -%} + +{%- set canDelete = + not post.deleted + and currentUser is not null + and ( + ( + postAuthor is not null + and postAuthor.id == currentUser.id + and postAuthor.hasPermission(permission("DELETE_OWN_POST")) + ) + or currentUser.hasPermission(permission("DELETE_OTHER_POST")) + ) -%} + +{%- set canViewAttachments = currentUser is not null -%} + +{%- set your_are_the_author = + currentUser is not null + and postAuthor is not null + and currentUser.id == postAuthor.id +-%} + +{%- set is_op = + topicAuthor is not null + and postAuthor is not null + and postAuthor.id == topicAuthor.id +-%} + +{%- set hasOtherAttachments = (fileAttachments|length > 0) -%} + +{% if post.deleted %} + + + + + + +
+  {# + #}{{ __("This post has been deleted") }} +
+ + +{% else %} + + + {% if not hide_pfp %} + {% if postAuthor %} + {% if hide_actions %} + {{ __( + {% else %} + + {{ __( + + {% endif %} + {% else %} +
+ {% endif %} + {% endif %} + + + + {% if not hide_actions %} +
{# + #}{{ __( + {%- if canReply -%} + + {%- endif -%} + {%- if canEdit -%} +
{# + #}{# + #}{# + #}
+ {%- endif -%} + {%- if canDelete -%} +
{# + #}{# + #}{# + #}
+ {%- endif -%} +
+ {% endif %} + {% if postAuthor %} + {% if hide_actions %} + {{ postAuthor.displayName }} + {% else %} + {{ postAuthor.displayName }} + {% endif %} + {% if your_are_the_author %} + [{{ __("You") }}] + {% endif %} + {% if is_op %} + {{ __( + {% endif %} + {% else %} + {{ __("(deleted)") }} + {% endif %} +
+ {{ post.postDate.format("c") }} + {% if post.edited %} + {{ __("(edited)") }} + {% endif %} + + + + + {{ renderPost(post.content) }} + {% if imageAttachments|length > 0 %} +
+ {% for attachment in imageAttachments %} + {% if hide_actions %} + + + + {% else %} + + + {% if canViewAttachments %} + + {% else %} + + {% endif %} + + {% endif %} + {% endfor %} +
+ {% endif %} + + + {% if hasOtherAttachments %} + + + {% for attachment in fileAttachments %} + {% if hide_actions %} + {{ attachment.name }} + {% else %} + + {% if not canViewAttachments %} + + {% endif %} + {{ attachment.name }} + + {% endif %} + {% endfor %} + + + {% endif %} +{% endif %} diff --git a/src/application/templates/old/components/post_editor.twig b/src/application/templates/old/components/post_editor.twig new file mode 100644 index 0000000..b9d688e --- /dev/null +++ b/src/application/templates/old/components/post_editor.twig @@ -0,0 +1,37 @@ + + + + + + + +
+ + + + +   + + +   + + +
+ +
diff --git a/src/application/templates/old/components/topic_log.twig b/src/application/templates/old/components/topic_log.twig new file mode 100644 index 0000000..b03024c --- /dev/null +++ b/src/application/templates/old/components/topic_log.twig @@ -0,0 +1,60 @@ +{%- set user = "" -%} +{%- if postAuthor is null -%} + {%- set user = __("(deleted)")|e("html") -%} +{%- else -%} + {%- set user = + '' + ~ postAuthor.displayName|e("html") + ~ '' + -%} +{%- endif -%} + + + + + {% if postAuthor %} + {% if hideActions %} + {{ __( + {% else %} + + {{ __( + + {% endif %} + {% else %} +
+ {% endif %} + +{% if logMessage.type == constant("mystic\\forum\\orm\\TopicLogMessage::LOCKED") %} + + + {{ __("%user% locked this topic", { + "user": user, + }) }} +
+ {{ logMessage.postDate.format("c") }} +{% elseif logMessage.type == constant("mystic\\forum\\orm\\TopicLogMessage::UNLOCKED") %} + + + {{ __("%user% unlocked this topic", { + "user": user, + }) }} +
+ {{ logMessage.postDate.format("c") }} +{% elseif logMessage.type == constant("mystic\\forum\\orm\\TopicLogMessage::TITLE_CHANGED") %} + + + {{ __("%user% changed the title of this topic from %old_title% to %new_title%", { + "user": user, + "old_title": '' ~ logMessage.params.old_value|default(__("unknown"))|e("html") ~ '', + "new_title": '' ~ logMessage.params.new_value|default(__("unknown"))|e("html") ~ '', + }) }} +
+ {{ logMessage.postDate.format("c") }} +{% else %} + + {{ __("unknown") }} +{% endif %} + + diff --git a/src/application/templates/old/delete_post.twig b/src/application/templates/old/delete_post.twig new file mode 100644 index 0000000..62c25fe --- /dev/null +++ b/src/application/templates/old/delete_post.twig @@ -0,0 +1,42 @@ +{% set title = __("Delete post") %} + +{% extends "base.twig" %} + +{% block content %} + + + + + + + + + + + +
+

{{ __("Do you want to delete this post?") }}

+
+ {{ __("Are you sure you want to delete the following post:") }}

+ + {% include "components/post.twig" with { + post: ctx.post, + postAuthor: ctx.postAuthor, + attachments: ctx.attachments, + hide_actions: true, + } %} +
+
+
+ + + +
+
+ + + +
+
+ +{% endblock %} diff --git a/src/application/templates/old/delete_topic.twig b/src/application/templates/old/delete_topic.twig new file mode 100644 index 0000000..59d2a02 --- /dev/null +++ b/src/application/templates/old/delete_topic.twig @@ -0,0 +1,36 @@ +{% set title = __("Delete topic") %} + +{% extends "base.twig" %} + +{% block content %} + + + + + + + + + + + +
+

{{ __("Do you want to delete this topic?") }}

+
+ {{ __("Are you sure you want to delete the topic %topic% including all posts and attachments?", { + "topic": ctx.topic.title|e("html"), + }) }} +
+
+ + + +
+
+ + + +
+
+ +{% endblock %} diff --git a/src/application/templates/old/error_page.twig b/src/application/templates/old/error_page.twig new file mode 100644 index 0000000..dde4057 --- /dev/null +++ b/src/application/templates/old/error_page.twig @@ -0,0 +1,12 @@ +{% set title = __("Error") %} +{% extends "base.twig" %} + +{% block navbar %} + {% if not ctx.skipLoginCheck %} + {{ parent() }} + {% endif %} +{% endblock %} + +{% block content %} + {% include "components/alert_error.twig" with { message: ctx.message } %} +{% endblock %} diff --git a/src/application/templates/old/info_page.twig b/src/application/templates/old/info_page.twig new file mode 100644 index 0000000..e243b36 --- /dev/null +++ b/src/application/templates/old/info_page.twig @@ -0,0 +1,12 @@ +{% set title = __("Information") %} +{% extends "base.twig" %} + +{% block navbar %} + {% if not ctx.skipLoginCheck %} + {{ parent() }} + {% endif %} +{% endblock %} + +{% block content %} + {% include "components/alert_info.twig" with { message: ctx.message } %} +{% endblock %} diff --git a/src/application/templates/old/login.twig b/src/application/templates/old/login.twig new file mode 100644 index 0000000..cbbb929 --- /dev/null +++ b/src/application/templates/old/login.twig @@ -0,0 +1,51 @@ +{% set title = __("Log in") %} +{% set formId = "login" %} +{% set formError = getAndClearFormError(formId) %} + +{% extends "base.twig" %} + +{% block content %} + +
+

{{ __("Log in") }}

+ +{% if formError %} + {% include "components/alert_error.twig" with { message: formError } %} +{% endif %} +
+ + +
+
+
+
+
+
+ + {{ __("I forgot my password") }} + + {% if constant("REGISTRATION_ENABLED") %} +

+ + + + +
+ {{ __("Don't have an account? %link%Register now%/link%", { + "link": '', + "/link": '', + }) }} +
+ {% endif %} +
+ +{% endblock %} + +{% block scripts %} +{{ parent() }} + +{% endblock %} diff --git a/src/application/templates/old/new_password.twig b/src/application/templates/old/new_password.twig new file mode 100644 index 0000000..02d6037 --- /dev/null +++ b/src/application/templates/old/new_password.twig @@ -0,0 +1,40 @@ +{% set title = __("Reset password") %} +{% set formId = "pwnew" %} +{% set formError = getAndClearFormError(formId) %} + +{% extends "base.twig" %} + +{% block content %} + +
+

{{ __("Reset password") }}

+ +{% if formError %} + {% include "components/alert_error.twig" with { message: formError } %} +{% endif %} +
+ + + + +
+
+
+ +
+
+
+ + +
+ +{% endblock %} + +{% block scripts %} +{{ parent() }} + +{% endblock %} diff --git a/src/application/templates/old/new_topic.twig b/src/application/templates/old/new_topic.twig new file mode 100644 index 0000000..5063db1 --- /dev/null +++ b/src/application/templates/old/new_topic.twig @@ -0,0 +1,32 @@ +{% set title = __("New topic") %} +{% set formId = "newtopic" %} +{% set formError = getAndClearFormError(formId) %} + +{% extends "base.twig" %} + +{% block content %} +
+ +

{{ __("New topic") }}

+ +{% if formError %} + {% include "components/alert_error.twig" with { message: formError } %} +{% endif %} +
+ +
+
+
+
+ {% include "components/post_editor.twig" with { name: "message", id: "i_message", value: lastFormField(formId, "message") } %} +
+
+
+
+ +
+ +{% endblock %} diff --git a/src/application/templates/old/password_reset.twig b/src/application/templates/old/password_reset.twig new file mode 100644 index 0000000..c6e98c2 --- /dev/null +++ b/src/application/templates/old/password_reset.twig @@ -0,0 +1,45 @@ +{% set title = __("Reset password") %} +{% set formId = "pwreset" %} +{% set formError = getAndClearFormError(formId) %} + +{% extends "base.twig" %} + +{% block content %} + +
+

{{ __("Reset password") }}

+ +{% if formError %} + {% include "components/alert_error.twig" with { message: formError } %} +{% endif %} +
+ + +
+
+
+
+
+ + + + +
+ {{ __("I know my password and I want to %link%log in%/link%!", { + "link": '', + "/link": '', + }) }} +
+
+ +{% endblock %} + +{% block scripts %} +{{ parent() }} + +{% endblock %} + diff --git a/src/application/templates/old/register.twig b/src/application/templates/old/register.twig new file mode 100644 index 0000000..02e2bd0 --- /dev/null +++ b/src/application/templates/old/register.twig @@ -0,0 +1,77 @@ +{% set title = __("Register") %} +{% set formId = "register" %} +{% set formError = getAndClearFormError(formId) %} + +{% extends "base.twig" %} + +{% block content %} + +
+

{{ __("Register") }}

+ + + {% if formError %} + {% include "components/alert_error.twig" with { message: formError } %} + {% endif %} +
+ + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CAPTCHA + + + +
+ + +   +
+
+ + + +

+ + + + +
+ {{ __("Already have an account? %link%Sign in now%/link%", { + "link": '', + "/link": '', + }) }} +
+
+{% endblock %} + +{% block scripts %} +{{ parent() }} + + +{% endblock %} + diff --git a/src/application/templates/old/search.twig b/src/application/templates/old/search.twig new file mode 100644 index 0000000..0bdd497 --- /dev/null +++ b/src/application/templates/old/search.twig @@ -0,0 +1,77 @@ +{% set title = __("Search") %} +{% set formId = "search" %} +{% set formError = getAndClearFormError(formId) %} + +{% extends "base.twig" %} + +{% block content %} + +
+

{{ __("Search") }}

+ +{% if formError %} + {% include "components/alert_error.twig" with { message: formError } %} +{% endif %} + +
+ + + + + + + +
+ + + + + +
+
+ +{% if g.get.query is defined and g.get.query is not null and g.get.query != "" %} + {% if ctx.posts|length > 0 %} +

{{ __("%result_count% result(s) in %search_duration% second(s)", { + "result_count": ctx.posts|length, + "search_duration": ctx.search_duration|number_format(2, __(".", context: "Number formatting"), __(",", context: "Number formatting")), + }) }}

+ + {% for post in ctx.posts|filter(p => not p.deleted) %} + {% set hasAttachments = ctx.attachments[post.id]|length > 0 %} + {% set postAuthor = ctx.users[post.authorId] %} + {{ renderPostSummary(post.content) }}
+ {{ __("posted by %author% on %post_date% in %topic%", { + "author": '' ~ (postAuthor ? postAuthor.displayName : __("unknown"))|e("html") ~ '', + "post_date": '
' ~ post.postDate.format("c")|e("html") ~ '', + "topic": '
' + ~ (ctx.topics[post.topicId].isLocked ? ('' ~ __( ') : '') + ~ (ctx.topics[post.topicId] ? ctx.topics[post.topicId].title : null)|default(__("unknown"))|e("html") ~ '', + }) }} +

+ {% endfor %} + {% else %} +
+ + +
+  {# + #}{{ __("No results for this search") }} +
+
+ {% endif %} +{% endif %} + +{% endblock %} + + +{% block scripts %} +{{ parent() }} +{% if not (g.get.query is defined and g.get.query is not null and g.get.query != "") %} + +{% endif %} +{% endblock %} diff --git a/src/application/templates/old/view_topic.twig b/src/application/templates/old/view_topic.twig new file mode 100644 index 0000000..613de49 --- /dev/null +++ b/src/application/templates/old/view_topic.twig @@ -0,0 +1,237 @@ +{% set canReply = + not ctx.topic.isLocked + and currentUser is not null + and currentUser.hasPermission(permission("CREATE_OWN_POST")) %} + +{% set canEdit = + currentUser is not null and ( + ( + ctx.topicAuthor is not null + and currentUser.id == ctx.topicAuthor.id + and ctx.topicAuthor.hasPermission(permission("EDIT_OWN_TOPIC")) + ) + or currentUser.hasPermission(permission("EDIT_OTHER_TOPIC")) + ) %} + +{% set couldEditPost = + currentUser is not null + and ( + currentUser.hasPermission(permission("EDIT_OWN_POST")) + or currentUser.hasPermission(permission("EDIT_OTHER_POST")) + ) %} + +{% set canDelete = + currentUser is not null and ( + ( + ctx.topicAuthor is not null + and currentUser.id == ctx.topicAuthor.id + and ctx.topicAuthor.hasPermission(permission("DELETE_OWN_TOPIC")) + ) + or currentUser.hasPermission(permission("DELETE_OTHER_TOPIC")) + ) %} + +{% set title = ctx.topic.title %} +{% extends "base.twig" %} + +{% block content %} + +{% set formError = getAndClearFormError("updateTopic") %} +{% if formError %} + {% include "components/alert_error.twig" with { message: formError } %} +{% endif %} +{% set formError = getAndClearFormError("lockTopic") %} +{% if formError %} + {% include "components/alert_error.twig" with { message: formError } %} +{% endif %} +{% set formError = null %} + +
+ + + +{% if couldEditPost %} + + + +{% for item in ctx.allItems %} + {% if item.type == "post" %} + {% include "components/post.twig" with { + post: item.post, + postAuthor: item.postAuthor, + topicAuthor: item.topicAuthor, + topic: item.topic, + attachments: item.attachments, + hide_actions: false, + hide_pfp: false, + } %} + {% elseif item.type == "logMessage" %} + {% include "components/topic_log.twig" with { + type: item.type, + logMessage: item.logMessage, + postAuthor: item.postAuthor, + topicAuthor: item.topicAuthor, + topic: item.topic, + hide_actions: false, + hide_pfp: false, + } %} + {% endif %} +{% endfor %} +
+ +{% if ctx.topic.isLocked %} +
+ + +
+
+ {{ __("This topic has been locked") }} +
+
+{% elseif currentUser is not null %} + {% set formId = "addpost" %} +

{{ __("Reply to this topic") }}

+ {% set formError = getAndClearFormError(formId) %} + {% if formError %} + {% include "components/alert_error.twig" with { message: formError } %} + {% endif %} +
+ + +
+ {% include "components/post_editor.twig" with { value: "", name: "message", id: "i_message" } %} +
+
+
+
+ +
+{% else %} +
+ + +
+

{{ __("Log in to reply to this topic") }}

+
+ + + +
+
+
+{% endif %} + + +{% endblock %} diff --git a/src/application/templates/old/view_topics.twig b/src/application/templates/old/view_topics.twig new file mode 100644 index 0000000..e6e69b7 --- /dev/null +++ b/src/application/templates/old/view_topics.twig @@ -0,0 +1,30 @@ +{% extends "base.twig" %} + +{% block content %} + +{% if currentUser.hasPermission(permission("CREATE_OWN_TOPIC")) %} +

+  {# + #}{{ __("New topic") }} +

+
+{% endif %} + + +{% for topic in ctx.topics %} + + + +{% endfor %} +
+ + {% if topic.isLocked -%} + + {%- endif -%} + {{ topic.title }} +
+ {{ topic.creationDate.format("c") }} +
+
+ +{% endblock %} 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 %} + +
+ {{ __( + {{ ctx.user.displayName }} + {% if isOwnProfile %} + [{{ __("You") }}] + {% endif %}
+ @{{ ctx.user.name }}
+ {{ __("Member since %join_date%", { + "join_date": '' ~ (ctx.dateJoined.format("c")|e("html")) ~ '', + }) }} +
+
+ +{% if canEdit %} + + + + + +
+{% endif %} + +

{{ __(sUserPossessive, { + "display_name": ctx.user.displayName|e("html"), +}) }}

+ +{% if ctx.posts|length > 0 %} + + {% for post in ctx.posts %} + + + + {% endfor %} +
+ {% set hasAttachments = ctx.attachments[post.id] is defined and ctx.attachments[post.id]|length > 0 %} + {% if hasAttachments %} + + {% endif %} + {{ renderPostSummary(post.content) }} +
+ {{ __("posted on %post_date% in %topic%", { + "post_date": '' ~ post.postDate.format("c")|e("html") ~ '', + "topic": '
' + ~ (ctx.topics[post.topicId].isLocked ? ('' ~ __( ') : '') + ~ (ctx.topics[post.topicId] ? ctx.topics[post.topicId].title : null)|default(__("unknown"))|e("html") ~ '', + }) }} +
+{% else %} + {% include "components/alert_info.twig" with { message: __("This user has not posted anything yet") } %} +{% endif %} + +{% if canEdit %} +
+

{{ __("Edit profile") }}

+ {% set formId = "update_profile" %} + {% set formError = getAndClearFormError(formId) %} + {% if formError %} + {% include "components/alert_error.twig" with { message: formError } %} + {% endif %} +
+ + +
+
+
+ +
+ {% if ctx.lastNameChangeTooRecent %} +
+ {{ __("You can only change your username every 30 days!") }}
+ {% else %} +
+ {% endif %} +
+ +
+ {% if emailPending %} +
+ {% else %} +
+ {% 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 %} +
+{% endif %} + + + +{% endblock %} diff --git a/src/application/themes/old/theme.json b/src/application/themes/old/theme.json new file mode 100644 index 0000000..2afa968 --- /dev/null +++ b/src/application/themes/old/theme.json @@ -0,0 +1,11 @@ +{ + "$format": 1, + "version": "1.0.0", + "id": "old", + "name": "Classic", + "author": "Jonas Kohl", + "template": "old", + "files": [ + "../../../ui/theme-files/old/theme.css" + ] +} -- cgit v1.2.3