feat: admin editable email templates
addresses #869eg7ptr
This commit is contained in:
@@ -0,0 +1,77 @@
|
||||
{% extends 'admin/layout.html.twig' %}
|
||||
|
||||
{% block title %}Einstellungen - E-Mail-Texte{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1 class="text-2xl font-bold pb-2">
|
||||
E-Mail-Texte
|
||||
</h1>
|
||||
<div class="data-table-wrapper">
|
||||
<div class="data-table-wrapper__inner">
|
||||
<table class="data-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
E-Mail
|
||||
</th>
|
||||
<th>
|
||||
Betreff
|
||||
</th>
|
||||
<th>
|
||||
Status
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for key, definition in definitions %}
|
||||
{% set emailText = emailTexts[key]|default(null) %}
|
||||
<tr>
|
||||
<td>
|
||||
{{ definition.label }}
|
||||
</td>
|
||||
<td>
|
||||
{{ emailText ? emailText.subject : definition.defaultSubject }}
|
||||
</td>
|
||||
<td>
|
||||
{% if emailText %}
|
||||
Angepasst
|
||||
{% else %}
|
||||
Standard
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<div class="flex items-center space-x-2 justify-end">
|
||||
{% if emailText %}
|
||||
<button type="button"
|
||||
class="text-red-500"
|
||||
title="Auf Standardtext zurücksetzen"
|
||||
hx-get="{{ path('app_admin_system_email_text_reset', { 'key': key }) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
{{ icon('refresh') }}
|
||||
</button>
|
||||
{% endif %}
|
||||
<button type="button"
|
||||
title="Vorschau anzeigen"
|
||||
hx-get="{{ path('app_admin_system_email_text_preview', { 'key': key }) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
{{ icon('eye') }}
|
||||
</button>
|
||||
<button type="button"
|
||||
title="E-Mail-Text bearbeiten"
|
||||
hx-get="{{ path('app_admin_system_email_text_edit', { 'key': key }) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
{{ icon('edit') }}
|
||||
</button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user