treebird/templates/content_notifs.tt
nekobit 2609b8d54f Seperate notifications logic, fix perl modules
FossilOrigin-Name: 8dedd9a9e0ca9f982140de1e980be166d07e9d549eae5cb50115fc3a7a414ae6
2022-08-17 02:08:13 +00:00

25 lines
1 KiB
Text

<div class="notification-container">
<h1 class="text-header">Notifications</h1>
<div class="menubar">
[% IF notifs %]
<a class="btn btn-single btn-small" href="/notifications/clear">Clear notifications</a>
<form action="/notifications/read" method="post">
<input type="hidden" name="max_id" value="[% notifs.0.id %]">
<input type="submit" class="btn btn-single btn-small" value="Mark as read">
</form>
[% ELSE %]
<span class="btn btn-single btn-small btn-disabled">Clear notifications</span>
<span class="btn btn-single btn-small btn-disabled">Mark as read</span>
[% END %]
</div>
[% IF notifs %]
[% FOREACH notif IN notifs %]
[% notification(notif) %]
[% END %]
[% ELSE %]
<div class="fancy-error">
<span class="fancy-error-kaomoji">[% random_error_kaomoji() %]</span>
<span class="fancy-error-text">No notifications.</span>
</div>
[% END %]
</div>