summaryrefslogtreecommitdiff
path: root/src/application/templates/old/components
diff options
context:
space:
mode:
authorJonas Kohl2024-12-10 17:15:10 +0100
committerJonas Kohl2024-12-10 17:15:10 +0100
commit7d685c5e64149e20c7dc8977f645e050be53ddfd (patch)
tree44a931c23979aaa2e22b079f8af9232f490eb4d3 /src/application/templates/old/components
parent7c9f91333da983da37d3dc837fa61ef0bff64549 (diff)
Add classic theme
Diffstat (limited to 'src/application/templates/old/components')
-rw-r--r--src/application/templates/old/components/alert_error.twig11
-rw-r--r--src/application/templates/old/components/alert_info.twig11
-rw-r--r--src/application/templates/old/components/alert_success.twig11
-rw-r--r--src/application/templates/old/components/post.twig169
-rw-r--r--src/application/templates/old/components/post_editor.twig37
-rw-r--r--src/application/templates/old/components/topic_log.twig60
6 files changed, 299 insertions, 0 deletions
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 @@
+<table cellspacing="0" cellpadding="4" bgcolor="pink" border="1" bordercolor="red">
+<tr><td>
+ <img src="/ui/theme-files/old/delete.gif" border="0" alt="" width="16" height="16" draggable="false" class="inline-icon">&nbsp;
+ {%- if message starts with "?!HTML::" -%}
+ {{- message|slice(8)|raw -}}
+ {%- else -%}
+ {{- message -}}
+ {%- endif -%}
+</td></tr>
+</table>
+<br>
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 @@
+<table cellspacing="0" cellpadding="4" bgcolor="lightskyblue" border="1" bordercolor="skyblue">
+<tr><td>
+ <img src="/ui/theme-files/old/information.gif" border="0" alt="" width="16" height="16" draggable="false" class="inline-icon">&nbsp;
+ {%- if message starts with "?!HTML::" -%}
+ {{- message|slice(8)|raw -}}
+ {%- else -%}
+ {{- message -}}
+ {%- endif -%}
+</td></tr>
+</table>
+<br> \ 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 @@
+<table cellspacing="0" cellpadding="4" bgcolor="#99FF99" border="1" bordercolor="green">
+<tr><td>
+ <img src="/ui/theme-files/old/check.gif" border="0" alt="" width="16" height="16" draggable="false" class="inline-icon">&nbsp;
+ {%- if message starts with "?!HTML::" -%}
+ {{- message|slice(8)|raw -}}
+ {%- else -%}
+ {{- message -}}
+ {%- endif -%}
+</td></tr>
+</table>
+<br>
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 %}
+ <tr>
+ <td width="64"></td>
+ <td>
+ <a id="post-{{ post.id }}"></a>
+ <table cellspacing="0" cellpadding="4" bgcolor="pink" border="1" bordercolor="red">
+ <tr><td>
+ <img src="/ui/theme-files/old/delete.gif" border="0" alt="" width="16" height="16" draggable="false" class="inline-icon">&nbsp;{#
+ #}{{ __("This post has been deleted") }}
+ </td></tr>
+ </table>
+ </td>
+ </tr>
+{% else %}
+ <tr>
+ <td width="64" rowspan="{{ hasOtherAttachments ? "3" : "2" }}" valign="top">
+ {% if not hide_pfp %}
+ {% if postAuthor %}
+ {% if hide_actions %}
+ <img class="media-object" alt="{{ __("Profile picture") }}" src="?_action=profilepicture&amp;user={{ postAuthor.id|url_encode }}" width="64" height="64">
+ {% else %}
+ <a href="?_action=viewuser&amp;user={{ postAuthor.id|url_encode }}">
+ <img border="0" class="media-object" alt="{{ __("Profile picture") }}" src="?_action=profilepicture&amp;user={{ postAuthor.id|url_encode }}" width="64" height="64">
+ </a>
+ {% endif %}
+ {% else %}
+ <div class="media-object" style="width:64px;height:64px"></div>
+ {% endif %}
+ {% endif %}
+ </td>
+ <th align="left" height="1" class="no-bold">
+ <a id="post-{{ post.id }}" data-text="{{ post.content }}"></a>
+ {% if not hide_actions %}
+ <div class="pull-right">{#
+ #}<a href="#post-{{ post.id }}" class="seamless m-r"><img class="inline-icon" src="/ui/theme-files/old/link.gif" alt="{{ __("Permalink") }}" width="16" height="16" border="0" draggable="false"></a>
+ {%- if canReply -%}
+ <button data-post-id="{{ post.id }}" class="seamless m-r js-only _reply-post"><img class="inline-icon" src="/ui/theme-files/old/message.gif" alt="{{ __("Reply to post") }}" width="16" height="16" border="0" draggable="false"></button>
+ {%- endif -%}
+ {%- if canEdit -%}
+ <form action="?_action=editpost" method="post" class="inline">{#
+ #}<input type="hidden" name="post" value="{{ post.id }}">{#
+ #}<button type="submit" class="seamless m-r"><img class="inline-icon" src="/ui/theme-files/old/message_edit.gif" alt="{{ __("Edit post") }}" width="16" height="16" border="0" draggable="false"></button>{#
+ #}</form>
+ {%- endif -%}
+ {%- if canDelete -%}
+ <form action="?_action=deletepost" method="post" class="inline">{#
+ #}<input type="hidden" name="post" value="{{ post.id }}">{#
+ #}<button type="submit" class="seamless m-r"><img class="inline-icon" src="/ui/theme-files/old/message_delete.gif" alt="{{ __("Delete post") }}" width="16" height="16" border="0" draggable="false"></button>{#
+ #}</form>
+ {%- endif -%}
+ </div>
+ {% endif %}
+ {% if postAuthor %}
+ {% if hide_actions %}
+ <b>{{ postAuthor.displayName }}</b>
+ {% else %}
+ <a href="?_action=viewuser&amp;user={{ postAuthor.id|url_encode }}"><b>{{ postAuthor.displayName }}</b></a>
+ {% endif %}
+ {% if your_are_the_author %}
+ <font color="red"><small>[{{ __("You") }}]</small></font>
+ {% endif %}
+ {% if is_op %}
+ <img alt="{{ __("Created this topic") }}" title="{{ __("Created this topic") }}" class="m-l inline-icon" width="16" height="16" draggable="false" src="/ui/theme-files/old/microphone.gif">
+ {% endif %}
+ {% else %}
+ <font color="gray"><i>{{ __("(deleted)") }}</i></font>
+ {% endif %}
+ <br>
+ <span class="_time">{{ post.postDate.format("c") }}</span>
+ {% if post.edited %}
+ <font color="gray"><i>{{ __("(edited)") }}</i></font>
+ {% endif %}
+ </th>
+ </tr>
+ <tr>
+ <td>
+ {{ renderPost(post.content) }}
+ {% if imageAttachments|length > 0 %}
+ <div class="post-images clearfix">
+ {% for attachment in imageAttachments %}
+ {% if hide_actions %}
+ <span class="image-attachment" title="{{ attachment.name }}">
+ <img border="0" class="image-attachment-image" src="?_action=thumb&amp;attachment={{ attachment.id|url_encode }}" alt="" width="100">
+ </span>
+ {% else %}
+ <a class="image-attachment attachment" href="?_action=attachment&amp;attachment={{ attachment.id|url_encode }}" title="{{ attachment.name }}">
+ <img border="0" class="image-attachment-image" src="?_action=thumb&amp;attachment={{ attachment.id|url_encode }}" alt="" width="100">
+ {% if canViewAttachments %}
+ <img alt="" border="0" class="attachment-icon" width="18" height="18" draggable="false" src="/ui/theme-files/old/{{ attachment.mimeType starts with "video/" ? "film" : "photo" }}.gif">
+ {% else %}
+ <img alt="" border="0" class="attachment-icon" width="18" height="18" draggable="false" src="/ui/theme-files/old/attachment_forbidden.gif">
+ {% endif %}
+ </a>
+ {% endif %}
+ {% endfor %}
+ </div>
+ {% endif %}
+ </td>
+ </tr>
+ {% if hasOtherAttachments %}
+ <tr>
+ <td>
+ {% for attachment in fileAttachments %}
+ {% if hide_actions %}
+ <u>{{ attachment.name }}</u>
+ {% else %}
+ <a class="attachment" href="?_action=attachment&amp;attachment={{ attachment.id|url_encode }}">
+ {% if not canViewAttachments %}
+ <img alt="" class="inline-icon" width="16" height="16" border="0" draggable="false" src="/ui/theme-files/old/forbidden.gif">
+ {% endif %}
+ {{ attachment.name }}
+ </a>
+ {% endif %}
+ {% endfor %}
+ </td>
+ </tr>
+ {% 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 @@
+<table border="1" bordercolor="silver" cellpadding="0" cellspacing="0" width="100%">
+<tr>
+<td style="line-height:1">
+ <button data-area="#{{ id }}" title="{{ __("Bold") }}" data-editor-command="bold" type="button" class="seamless editor-tool">{#
+ #}<img src="/ui/theme-files/old/text_bold.gif" width="16" height="16" border="0" draggable="false" alt="">{#
+ #}</button>
+ <button data-area="#{{ id }}" title="{{ __("Italic") }}" data-editor-command="italic" type="button" class="seamless editor-tool">{#
+ #}<img src="/ui/theme-files/old/text_italics.gif" width="16" height="16" border="0" draggable="false" alt="">{#
+ #}</button>
+ <button data-area="#{{ id }}" title="{{ __("Underlined") }}" data-editor-command="underline" type="button" class="seamless editor-tool">{#
+ #}<img src="/ui/theme-files/old/text_underlined.gif" width="16" height="16" border="0" draggable="false" alt="">{#
+ #}</button>
+ <button data-area="#{{ id }}" title="{{ __("Strikethrough") }}" data-editor-command="strikethrough" type="button" class="seamless editor-tool">{#
+ #}<img src="/ui/theme-files/old/text_strikethrough.gif" width="16" height="16" border="0" draggable="false" alt="">{#
+ #}</button>
+ &nbsp;
+ <button data-area="#{{ id }}" title="{{ __("Superscript") }}" data-editor-command="sup" type="button" class="seamless editor-tool">{#
+ #}<img src="/ui/theme-files/old/text_superscript.gif" width="16" height="16" border="0" draggable="false" alt="">{#
+ #}</button>
+ <button data-area="#{{ id }}" title="{{ __("Subscript") }}" data-editor-command="sub" type="button" class="seamless editor-tool">{#
+ #}<img src="/ui/theme-files/old/text_subscript.gif" width="16" height="16" border="0" draggable="false" alt="">{#
+ #}</button>
+ &nbsp;
+ <button data-area="#{{ id }}" title="{{ __("Quote") }}" data-editor-command="quote" type="button" class="seamless editor-tool">{#
+ #}<img src="/ui/theme-files/old/message.gif" width="16" height="16" border="0" draggable="false" alt="">{#
+ #}</button>
+ <button data-area="#{{ id }}" title="{{ __("Spoiler") }}" data-editor-command="spoiler" type="button" class="seamless editor-tool">{#
+ #}<img src="/ui/theme-files/old/eye.gif" width="16" height="16" border="0" draggable="false" alt="">{#
+ #}</button>
+</td>
+</tr>
+<tr>
+<td>
+ <textarea class="post-editor" id="{{ id }}" name="{{ name }}" required rows="12" cols="60">{{ value }}</textarea>
+</td>
+</tr>
+</table>
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 =
+ '<a href="?_action=viewuser&amp;user='
+ ~ postAuthor.id|url_encode|e("html")
+ ~ '">'
+ ~ postAuthor.displayName|e("html")
+ ~ '</a>'
+ -%}
+{%- endif -%}
+
+<tr>
+<td width="64">
+ <a id="post-{{ logMessage.id }}"></a>
+ {% if postAuthor %}
+ {% if hideActions %}
+ <img class="media-object" alt="{{ __("Profile picture") }}" src="?_action=profilepicture&amp;user={{ postAuthor.id|url_encode }}" width="64" height="64">
+ {% else %}
+ <a href="?_action=viewuser&amp;user={{ postAuthor.id|url_encode }}">
+ <img border="0" class="media-object" alt="{{ __("Profile picture") }}" src="?_action=profilepicture&amp;user={{ postAuthor.id|url_encode }}" width="64" height="64">
+ </a>
+ {% endif %}
+ {% else %}
+ <div class="media-object" style="width:64px;height:64px"></div>
+ {% endif %}
+</td>
+{% if logMessage.type == constant("mystic\\forum\\orm\\TopicLogMessage::LOCKED") %}
+ <td bgcolor="#FFCC99" align="center">
+ <span class="fa fa-lock text-info" aria-hidden="true"></span>
+ <em>{{ __("%user% locked this topic", {
+ "user": user,
+ }) }}</em>
+ <br>
+ <small class="_time">{{ logMessage.postDate.format("c") }}</small>
+{% elseif logMessage.type == constant("mystic\\forum\\orm\\TopicLogMessage::UNLOCKED") %}
+ <td bgcolor="#CCFFCC" align="center">
+ <span class="fa fa-unlock text-success" aria-hidden="true"></span>
+ <em>{{ __("%user% unlocked this topic", {
+ "user": user,
+ }) }}</em>
+ <br>
+ <small class="_time">{{ logMessage.postDate.format("c") }}</small>
+{% elseif logMessage.type == constant("mystic\\forum\\orm\\TopicLogMessage::TITLE_CHANGED") %}
+ <td bgcolor="#99CCFF" align="center">
+ <span class="fa fa-pencil text-info" aria-hidden="true"></span>
+ <em>{{ __("%user% changed the title of this topic from %old_title% to %new_title%", {
+ "user": user,
+ "old_title": '<strong>' ~ logMessage.params.old_value|default(__("unknown"))|e("html") ~ '</strong>',
+ "new_title": '<strong>' ~ logMessage.params.new_value|default(__("unknown"))|e("html") ~ '</strong>',
+ }) }}</em>
+ <br>
+ <small class="_time">{{ logMessage.postDate.format("c") }}</small>
+{% else %}
+ <td>
+ {{ __("unknown") }}
+{% endif %}
+</td>
+</tr>