##// END OF EJS Templates
follow Python conventions for boolean values...
follow Python conventions for boolean values True and False might be singletons and the "default" values for "boolean" expressions, but "all" values in Python has a boolean value and should be evaluated as such. Checking with 'is True' and 'is False' is thus confusing, error prone and unnessarily complex. If we anywhere rely and nullable boolean fields from the database layer and don't want the null value to be treated as False then we should check explicitly for null with 'is None'.

File last commit:

r2732:c25cc1c7 beta
r3625:260a7a01 beta
Show More
notifications_data.html
40 lines | 1.4 KiB | text/html | HtmlLexer
mark all read button for notifications
r1791
- fixed issue with mark all read button for notifications and listeners on delete buttons...
r1817 %if c.notifications:
mark all read button for notifications
r1791 <%
unread = lambda n:{False:'unread'}.get(n)
%>
removed top pagination from notifications as it's breaking the UI
r2516
notification inbox improvements...
r2190
<div class="notification-list notification-table">
%for notification in c.notifications:
<div id="notification_${notification.notification.notification_id}" class="container ${unread(notification.read)}">
<div class="notification-header">
<div class="gravatar">
again #531 forgot to replace other occurences of h.email call
r2732 <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(notification.notification.created_by_user.email),24)}"/>
notification inbox improvements...
r2190 </div>
<div class="desc ${unread(notification.read)}">
<a href="${url('notification', notification_id=notification.notification.notification_id)}">${notification.notification.description}</a>
</div>
<div class="delete-notifications">
<span id="${notification.notification.notification_id}" class="delete-notification delete_icon action"></span>
</div>
added mark as read for single notifications
r2610 %if not notification.read:
<div class="read-notifications">
<span id="${notification.notification.notification_id}" class="read-notification accept_icon action"></span>
white space cleanup
r2673 </div>
added mark as read for single notifications
r2610 %endif
notification inbox improvements...
r2190 </div>
<div class="notification-subject">${h.literal(notification.notification.subject)}</div>
</div>
%endfor
</div>
<div class="notification-paginator">
<div class="pagination-wh pagination-left">
Remember filtering on notifications filters
r2518 ${c.notifications.pager('$link_previous ~2~ $link_next',**request.GET.mixed())}
notification inbox improvements...
r2190 </div>
</div>
mark all read button for notifications
r1791 %else:
<div class="table">${_('No notifications here yet')}</div>
White-space cleanup
r1888 %endif