forked from MarseyWorld/MarseyWorld
fsdfds
parent
3490ad533f
commit
de21363ca6
|
@ -377,6 +377,10 @@ class User(Base):
|
|||
def post_notifications_count(self):
|
||||
return g.db.query(Notification.id).join(Comment).filter(Notification.user_id == self.id, Notification.read == False, Comment.author_id == AUTOJANNY_ID).count()
|
||||
|
||||
@property
|
||||
@lazy
|
||||
def not_post_notifications_count(self):
|
||||
return self.notifications_count - self.post_notifications_count
|
||||
|
||||
@property
|
||||
@lazy
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
<div class="col p-0 w-100">
|
||||
<ul class="nav settings-nav" style="padding:0 30px;">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link py-3{% if not '=true' in request.full_path %} active{% endif %}" href="/notifications">
|
||||
All
|
||||
<a class="nav-link py-3{% if not '=true' in request.full_path %} active{% endif %}" href="/notifications?posts=true">
|
||||
All{% if v.not_post_notifications_count %} <span class="text-primary font-weight-bold">({{v.not_post_notifications_count}})</span>{% endif %}
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
|
|
Loading…
Reference in New Issue