mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 13:54:23 +00:00
notification list: use bootstrap accordion to fold/unfold notification content
This commit is contained in:
parent
22022e5143
commit
120ce40dbe
@ -66,3 +66,15 @@ div.notification-show {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Override bootstrap accordion
|
||||||
|
div#notification-fold {
|
||||||
|
.accordion-button {
|
||||||
|
padding: 0;
|
||||||
|
background-color: unset;
|
||||||
|
&:not(.collapsed) {
|
||||||
|
background-color: unset;
|
||||||
|
box-shadow: unset;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -1,4 +1,15 @@
|
|||||||
<div class="item-bloc notification-status {% if notification.isReadBy(app.user) %}read{% else %}unread{% endif %}">
|
<div class="item-bloc notification-status {% if notification.isReadBy(app.user) %}read{% else %}unread{% endif %}">
|
||||||
|
|
||||||
|
{% if fold_item is defined and fold_item != 'false' %}
|
||||||
|
<div class="accordion-header" id="flush-heading-{{ notification.id }}">
|
||||||
|
<button class="accordion-button collapsed"
|
||||||
|
type="button"
|
||||||
|
data-bs-toggle="collapse"
|
||||||
|
data-bs-target="#flush-collapse-{{ notification.id }}"
|
||||||
|
aria-expanded="false"
|
||||||
|
aria-controls="flush-collapse-{{ notification.id }}">
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<div class="item-row title">
|
<div class="item-row title">
|
||||||
<h2 class="notification-title">
|
<h2 class="notification-title">
|
||||||
<a href="{{ chill_path_add_return_path('chill_main_notification_show', {'id': notification.id}) }}">
|
<a href="{{ chill_path_add_return_path('chill_main_notification_show', {'id': notification.id}) }}">
|
||||||
@ -6,8 +17,12 @@
|
|||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="item-row mt-2 notification-header">
|
|
||||||
|
|
||||||
|
{% if fold_item is defined and fold_item != 'false' %}
|
||||||
|
</button>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<div class="item-row notification-header mt-2">
|
||||||
<div class="item-col">
|
<div class="item-col">
|
||||||
<ul class="small_in_title">
|
<ul class="small_in_title">
|
||||||
{% if step is not defined or step == 'inbox' %}
|
{% if step is not defined or step == 'inbox' %}
|
||||||
@ -42,12 +57,19 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="item-col">
|
<div class="item-col">
|
||||||
{{ notification.date|format_datetime('long', 'short') }}
|
{{ notification.date|format_datetime('long', 'short') }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{% if fold_item is defined and fold_item != 'false' %}
|
||||||
|
</div>
|
||||||
|
<div id="flush-collapse-{{ notification.id }}"
|
||||||
|
class="accordion-collapse collapse"
|
||||||
|
aria-labelledby="flush-heading-{{ notification.id }}"
|
||||||
|
data-bs-parent="#notification-fold">
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<div class="item-row separator">
|
<div class="item-row separator">
|
||||||
<div class="mx-3 flex-grow-1">
|
<div class="mx-3 flex-grow-1">
|
||||||
{% include data.template with data.template_data %}
|
{% include data.template with data.template_data %}
|
||||||
@ -88,4 +110,9 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if fold_item is defined and fold_item != 'false' %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -46,10 +46,12 @@
|
|||||||
<p class="chill-no-data-statement">{{ 'notification.Any notification sent'|trans }}</p>
|
<p class="chill-no-data-statement">{{ 'notification.Any notification sent'|trans }}</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="flex-table">
|
<div class="flex-table accordion accordion-flush" id="notification-fold">
|
||||||
{% for data in datas %}
|
{% for data in datas %}
|
||||||
{% set notification = data.notification %}
|
{% set notification = data.notification %}
|
||||||
{% include 'ChillMainBundle:Notification:_list_item.html.twig' %}
|
{% include 'ChillMainBundle:Notification:_list_item.html.twig' with {
|
||||||
|
'fold_item': 'true'
|
||||||
|
} %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user