Files
vision/templates/_cells/notificationTable.html.twig
Xbird 9f22f5b1ee V-Beta-1.0.0
Vision is out of alpha !
2022-02-02 17:46:29 +01:00

33 lines
1.4 KiB
Twig

{% if notifications|length > 0 %}
<div class="table-responsive">
<table class="table table-dark table-striped">
<thead>
<tr>
<th scope="col">{% if nosender is not defined %}{% trans %}title_sender{% endtrans %} / {% endif %}{% trans %}title_date{% endtrans %}</th>
<th scope="col">{% trans %}title_notification{% endtrans %}</th>
{% if noaction is not defined %}<th>{% trans %}title_actions{% endtrans %}</th>{% endif %}
</tr>
</thead>
<tbody>
{% for i in notifications %}
<tr>
<th scope="row">
{% if nosender is not defined %}
<a href="{{ path('user_view', {'id': i.sender.id }) }}" >{{i.sender.firstname | u.truncate(2, '.')}} {{i.sender.lastname}}, {{i.sender.mainGroup ? i.sender.mainGroup.shortname : 'value_no_group'|trans}}</a><br />
{% endif %}
{{i.createdAt |date('_datetime.format'|trans)}}
</th>
<td>{{ i.content|raw }}</td>
{% if noaction is not defined %}
<td>
{% include '_cells/notificationActions.html.twig' with {'notification': i} %}
</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% else %}
<p>{% trans %}no_data{% endtrans %}</p>
{% endif %}