mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
refund extension_list_notification template: change place and content
This commit is contained in:
parent
1a2e1eaf2a
commit
ab23290599
@ -181,6 +181,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="notification notification-list">
|
||||||
|
{% set notifications = chill_list_notifications('Chill\\ActivityBundle\\Entity\\Activity', entity.id) %}
|
||||||
|
{% if notifications is not empty %}
|
||||||
|
{{ notifications|raw }}
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
{% set person_id = null %}
|
{% set person_id = null %}
|
||||||
{% if person %}
|
{% if person %}
|
||||||
{% set person_id = person.id %}
|
{% set person_id = person.id %}
|
||||||
@ -197,18 +205,22 @@
|
|||||||
{{ 'Back to the list'|trans }}
|
{{ 'Back to the list'|trans }}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{% if is_granted('CHILL_ACTIVITY_UPDATE', entity) %}
|
<li>
|
||||||
<li>
|
<a class="btn btn-primary" href="{{ chill_path_add_return_path('chill_main_notification_create', {'entityClass': 'Chill\\ActivityBundle\\Entity\\Activity', 'entityId': entity.id}) }}">
|
||||||
<a class="btn btn-update" href="{{ path('chill_activity_activity_edit', { 'id': entity.id, 'person_id': person_id, 'accompanying_period_id': accompanying_course_id }) }}">
|
<i class="fa fa-paper-plane fa-fw"></i>
|
||||||
{{ 'Edit'|trans }}
|
{{ 'notification.Notify'|trans }}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
{% if is_granted('CHILL_ACTIVITY_UPDATE', entity) %}
|
||||||
|
<li>
|
||||||
|
<a href="{{ path('chill_activity_activity_edit', { 'id': entity.id, 'person_id': person_id, 'accompanying_period_id': accompanying_course_id }) }}"
|
||||||
|
class="btn btn-update" title="{{ 'Edit'|trans }}"></a>
|
||||||
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if is_granted('CHILL_ACTIVITY_DELETE', entity) %}
|
{% if is_granted('CHILL_ACTIVITY_DELETE', entity) %}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ path('chill_activity_activity_delete', { 'id': entity.id, 'person_id' : person_id, 'accompanying_period_id': accompanying_course_id } ) }}" class="btn btn-delete">
|
<a href="{{ path('chill_activity_activity_delete', { 'id': entity.id, 'person_id' : person_id, 'accompanying_period_id': accompanying_course_id } ) }}"
|
||||||
{{ 'Delete'|trans }}
|
class="btn btn-delete" title="{{ 'Delete'|trans }}"></a>
|
||||||
</a>
|
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -25,19 +25,5 @@
|
|||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
|
||||||
{% block block_post_menu %}
|
{% block block_post_menu %}
|
||||||
<div class="post-menu pt-4">
|
<div class="post-menu pt-4"></div>
|
||||||
|
|
||||||
<div class="d-grid gap-2">
|
|
||||||
<a class="btn btn-primary" href="{{ chill_path_add_return_path('chill_main_notification_create', {'entityClass': 'Chill\\ActivityBundle\\Entity\\Activity', 'entityId': entity.id}) }}">
|
|
||||||
<i class="fa fa-paper-plane fa-fw"></i>
|
|
||||||
{{ 'notification.Notify'|trans }}
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% set notifications = chill_list_notifications('Chill\\ActivityBundle\\Entity\\Activity', entity.id) %}
|
|
||||||
{% if notifications is not empty %}
|
|
||||||
{{ notifications|raw }}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -52,9 +52,11 @@
|
|||||||
|
|
||||||
{% macro content(c) %}
|
{% macro content(c) %}
|
||||||
<div class="item-row separator">
|
<div class="item-row separator">
|
||||||
<div class="mx-3 flex-grow-1">
|
{% if c.data is defined %}
|
||||||
{% include c.data.template with c.data.template_data %}
|
<div class="mx-3 flex-grow-1">
|
||||||
</div>
|
{% include c.data.template with c.data.template_data %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="item-row">
|
<div class="item-row">
|
||||||
<div class="notification-content">
|
<div class="notification-content">
|
||||||
@ -107,15 +109,25 @@
|
|||||||
<button type="button" class="accordion-button collapsed"
|
<button type="button" class="accordion-button collapsed"
|
||||||
data-bs-toggle="collapse" data-bs-target="#flush-collapse-{{ notification.id }}"
|
data-bs-toggle="collapse" data-bs-target="#flush-collapse-{{ notification.id }}"
|
||||||
aria-expanded="false" aria-controls="flush-collapse-{{ notification.id }}">
|
aria-expanded="false" aria-controls="flush-collapse-{{ notification.id }}">
|
||||||
|
|
||||||
{{ _self.title(_context) }}
|
{{ _self.title(_context) }}
|
||||||
</button>
|
</button>
|
||||||
{{ _self.header(_context) }}
|
{{ _self.header(_context) }}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div id="flush-collapse-{{ notification.id }}"
|
<div id="flush-collapse-{{ notification.id }}"
|
||||||
class="accordion-collapse collapse"
|
class="accordion-collapse collapse"
|
||||||
aria-labelledby="flush-heading-{{ notification.id }}"
|
aria-labelledby="flush-heading-{{ notification.id }}"
|
||||||
data-bs-parent="#notification-fold">
|
data-bs-parent="#notification-fold">
|
||||||
|
|
||||||
{{ _self.content(_context) }}
|
{{ _self.content(_context) }}
|
||||||
|
|
||||||
|
{% if with_folded_comments is defined and with_folded_comments != false %}
|
||||||
|
</div>{# close previous flex-table and reopen it after #}
|
||||||
|
{% include 'ChillMainBundle:Notification:_item_comments.html.twig' %}
|
||||||
|
<div class="flex-table">
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ _self.title(_context) }}
|
{{ _self.title(_context) }}
|
||||||
|
@ -1,8 +1,24 @@
|
|||||||
|
<h2>{{ 'notification.Notification'|trans }}</h2>
|
||||||
|
|
||||||
|
<div class="flex-table accordion accordion-flush" id="notification-fold">
|
||||||
|
{% for notification in notifications %}
|
||||||
|
{% include 'ChillMainBundle:Notification:_list_item.html.twig' with {
|
||||||
|
'action_button': false,
|
||||||
|
'full_content': true,
|
||||||
|
'fold_item': true,
|
||||||
|
} %}{#
|
||||||
|
DISABLED
|
||||||
|
'with_folded_comments': true
|
||||||
|
#}
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{#
|
||||||
<div class="list-group my-2 notification notification-box">
|
<div class="list-group my-2 notification notification-box">
|
||||||
<div class="list-group-item">
|
<div class="list-group-item">
|
||||||
<h4>{{ 'notification.Sent'|trans }}</h4>
|
<h4>{{ 'notification.Sent'|trans }}</h4>
|
||||||
</div>
|
</div>
|
||||||
{# TODO pagination or limit #}
|
|
||||||
{% for notification in notifications %}
|
{% for notification in notifications %}
|
||||||
<div class="list-group-item notification-status {% if notification.isReadBy(app.user) %}read{% else %}unread{% endif %}">
|
<div class="list-group-item notification-status {% if notification.isReadBy(app.user) %}read{% else %}unread{% endif %}">
|
||||||
|
|
||||||
@ -13,7 +29,7 @@
|
|||||||
<abbr title="{{ 'Le ' ~ notification.date|format_date('long') ~ '\n' ~ notification.title }}">
|
<abbr title="{{ 'Le ' ~ notification.date|format_date('long') ~ '\n' ~ notification.title }}">
|
||||||
{{ notification.date|format_datetime('short','short') }}
|
{{ notification.date|format_datetime('short','short') }}
|
||||||
</abbr>
|
</abbr>
|
||||||
{# Vue component #}
|
|
||||||
<span class="notification_toggle_read_status"
|
<span class="notification_toggle_read_status"
|
||||||
data-notification-id="{{ notification.id }}"
|
data-notification-id="{{ notification.id }}"
|
||||||
data-notification-current-is-read="{{ notification.isReadBy(app.user) }}"
|
data-notification-current-is-read="{{ notification.isReadBy(app.user) }}"
|
||||||
@ -44,3 +60,4 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
#}
|
||||||
|
@ -26,7 +26,8 @@
|
|||||||
'template_data': handler.getTemplateData(notification)
|
'template_data': handler.getTemplateData(notification)
|
||||||
},
|
},
|
||||||
'action_button': false,
|
'action_button': false,
|
||||||
'full_content': true
|
'full_content': true,
|
||||||
|
'fold_item': false
|
||||||
} %}
|
} %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user