This repository has been archived on 2024-06-26. You can view files and clone it, but cannot push or open issues or pull requests.
sakura/templates/yuuno/settings/notifications.history.twig

50 lines
1.7 KiB
Twig
Raw Normal View History

2016-03-26 16:36:58 +00:00
{% set alerts = user.notifications(0, false)|batch(10) %}
{% set paginationPages = alerts %}
{% set paginationUrl %}{{ urls.format('SETTING_MODE', ['notifications', 'history']) }}{% endset %}
{% block css %}
<style type="text/css">
.pagination {
float: right;
}
</style>
{% endblock %}
{% if alerts %}
2015-08-21 22:07:45 +00:00
<div class="notification-history">
{% for alert in alerts[get.page|default(1) - 1] %}
2016-03-26 16:36:58 +00:00
<a id="notif-hist-{{ alert.id }}" class="clean {% if alert.read %}read{% endif %}"{% if alert.link %} href="{{ alert.link }}"{% endif %}>
2015-08-21 22:07:45 +00:00
<div class="notif-hist-icon">
2016-03-26 16:36:58 +00:00
{% if 'FONT:' in alert.image %}
<div class="font-icon fa {{ alert.image|replace({'FONT:': ''}) }} fa-4x"></div>
2015-08-21 22:07:45 +00:00
{% else %}
2016-03-26 16:36:58 +00:00
<img src="{{ alert.image }}" alt="Notification" />
2015-08-21 22:07:45 +00:00
{% endif %}
</div>
<div class="notif-hist-content">
<div class="notif-hist-inside">
<div class="notif-hist-title">
2016-03-26 16:36:58 +00:00
{{ alert.title }}
2015-08-21 22:07:45 +00:00
</div>
<div class="notif-hist-text">
2016-03-26 16:36:58 +00:00
{{ alert.title }}
2015-08-21 22:07:45 +00:00
</div>
2015-08-10 20:04:22 +00:00
</div>
2015-08-21 22:07:45 +00:00
<div class="notif-hist-time">
2016-03-26 16:36:58 +00:00
<time>{{ alert.time|date(sakura.dateFormat) }}</time>
2015-08-10 20:04:22 +00:00
</div>
2015-06-19 16:12:44 +00:00
</div>
2015-08-21 22:07:45 +00:00
<div class="clear"></div>
</a>
{% endfor %}
</div>
{% if alerts|length > 1 %}
2015-08-21 22:07:45 +00:00
<div>
2016-01-04 20:14:09 +00:00
{% include 'elements/pagination.twig' %}
2015-08-10 20:04:22 +00:00
</div>
2015-08-21 22:07:45 +00:00
{% endif %}
{% else %}
<h1 class="stylised" style="margin: 2em auto; text-align: center;">You don't have any notifications in your history!</h1>
2015-08-10 20:04:22 +00:00
{% endif %}