Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
66805404
authored
Jul 16, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: update notification view
parent
55773d3c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
8 deletions
+5
-8
circle/dashboard/templates/dashboard/_notifications-timeline.html
+4
-4
circle/dashboard/views.py
+1
-4
No files found.
circle/dashboard/templates/dashboard/_notifications-timeline.html
View file @
66805404
{% load i18n %}
{% load i18n %}
{% for n in notifications %}
{% for n in notifications %}
<li
class=
"notification-message"
>
<li
class=
"notification-message"
id=
"msg-{{n.id}}"
>
<span
class=
"notification-message-subject"
>
<span
class=
"notification-message-subject"
>
{% if n.status == "new" %}
<i
class=
"icon-envelope-alt"
></i>
{% endif %}
{% if n.status == "new" %}
<i
class=
"icon-envelope-alt"
></i>
{% endif %}
{{ n.subject }}
{{ n.subject
.get_user_text
}}
</span>
</span>
<span
class=
"notification-message-date pull-right"
>
<span
class=
"notification-message-date pull-right"
title=
"{{n.created}}"
>
{{ n.created|timesince }}
{{ n.created|timesince }}
</span>
</span>
<div
style=
"clear: both;"
></div>
<div
style=
"clear: both;"
></div>
<div
class=
"notification-message-text"
>
<div
class=
"notification-message-text"
>
{{ n.message|safe }}
{{ n.message
.get_user_text
|safe }}
</div>
</div>
</li>
</li>
{% empty %}
{% empty %}
...
...
circle/dashboard/views.py
View file @
66805404
...
@@ -2626,12 +2626,9 @@ class NotificationView(LoginRequiredMixin, TemplateView):
...
@@ -2626,12 +2626,9 @@ class NotificationView(LoginRequiredMixin, TemplateView):
def
get_context_data
(
self
,
*
args
,
**
kwargs
):
def
get_context_data
(
self
,
*
args
,
**
kwargs
):
context
=
super
(
NotificationView
,
self
)
.
get_context_data
(
context
=
super
(
NotificationView
,
self
)
.
get_context_data
(
*
args
,
**
kwargs
)
*
args
,
**
kwargs
)
# we need to convert it to list, otherwise it's gonna be
# similar to a QuerySet and update everything to
# read status after get
n
=
10
if
self
.
request
.
is_ajax
()
else
1000
n
=
10
if
self
.
request
.
is_ajax
()
else
1000
context
[
'notifications'
]
=
list
(
context
[
'notifications'
]
=
list
(
self
.
request
.
user
.
notification_set
.
values
()[:
n
])
self
.
request
.
user
.
notification_set
.
all
()[:
n
])
return
context
return
context
def
get
(
self
,
*
args
,
**
kwargs
):
def
get
(
self
,
*
args
,
**
kwargs
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment