allow to edit notification

This commit is contained in:
2021-12-29 15:24:52 +01:00
parent 478c3b3247
commit 9d638fe897
5 changed files with 70 additions and 6 deletions

View File

@@ -0,0 +1,25 @@
{% extends "@ChillMain/layout.html.twig" %}
{% block content %}
<div class="row">
<div class="col-md-10">
{% include handler.template(notification) with handler.templateData(notification) %}
{{ form_start(form, { 'attr': { 'id': 'notification' }}) }}
{{ form_row(form.addressees) }}
{{ form_row(form.message) }}
{{ form_end(form) }}
<ul class="record_actions sticky-form-buttons">
<li class="cancel">
<a href="{{ chill_return_path_or('chill_main_homepage') }}" class="btn btn-cancel">{{ 'Cancel'|trans|chill_return_path_label }}</a>
</li>
<li>
<button type="submit" form="notification" class="btn btn-save">{{ 'Save'|trans }}</button>
</li>
</ul>
</div>
</div>
{% endblock %}

View File

@@ -66,9 +66,16 @@
</div>
<div class="item-row">
<ul class="record_actions">
<li>
<a href="{{ chill_path_add_return_path('chill_main_notification_show', {'id': notification.id}) }}" class="btn btn-show"></a>
</li>
{% if is_granted('CHILL_MAIN_NOTIFICATION_UPDATE', notification) %}
<li>
<a href="{{ chill_path_add_return_path('chill_main_notification_edit', {'id': notification.id}) }}" class="btn btn-edit"></a>
</li>
{% endif %}
{% if is_granted('CHILL_MAIN_NOTIFICATION_SEE', notification) %}
<li>
<a href="{{ chill_path_add_return_path('chill_main_notification_show', {'id': notification.id}) }}" class="btn btn-show"></a>
</li>
{% endif %}
</ul>
</div>
</div>