Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Milan
diaspora
Commits
029520a3
Commit
029520a3
authored
Mar 20, 2014
by
Jonne Haß
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4867 from svbergerem/polish-notifications-view
Add separator between days, don't display grey zero
parents
23a91eb6
d9857a3a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
8 deletions
+11
-8
app/assets/javascripts/app/views/notifications_view.js
app/assets/javascripts/app/views/notifications_view.js
+4
-4
app/assets/stylesheets/notifications.css.scss
app/assets/stylesheets/notifications.css.scss
+5
-2
app/views/notifications/index.html.haml
app/views/notifications/index.html.haml
+2
-2
No files found.
app/assets/javascripts/app/views/notifications_view.js
View file @
029520a3
...
...
@@ -68,14 +68,14 @@ app.views.Notifications = Backbone.View.extend({
type_notes
.
text
(
function
(
i
,
text
)
{
return
parseInt
(
text
)
+
change
});
header_badge
.
text
(
function
(
i
,
text
)
{
return
parseInt
(
text
)
+
change
});
if
(
all_notes
.
text
()
>
0
){
all_notes
.
addClass
(
'
badge-important
'
);
all_notes
.
addClass
(
'
badge-important
'
)
.
removeClass
(
'
badge-default
'
)
;
}
else
{
all_notes
.
removeClass
(
'
badge-important
'
);
all_notes
.
removeClass
(
'
badge-important
'
)
.
addClass
(
'
badge-default
'
)
;
}
if
(
type_notes
.
text
()
>
0
){
type_notes
.
addClass
(
'
badge-important
'
);
type_notes
.
addClass
(
'
badge-important
'
)
.
removeClass
(
'
badge-default
'
)
;
}
else
{
type_notes
.
removeClass
(
'
badge-important
'
);
type_notes
.
removeClass
(
'
badge-important
'
)
.
addClass
(
'
badge-default
'
)
;
}
if
(
header_badge
.
text
()
>
0
){
header_badge
.
removeClass
(
'
hidden
'
);
...
...
app/assets/stylesheets/notifications.css.scss
View file @
029520a3
...
...
@@ -8,6 +8,7 @@
color
:
$text-dark-grey
;
margin-right
:
5px
;
}
.badge.badge-default
{
display
:
none
;
}
}
li
.active
>
a
{
background-color
:
$background-grey
;
...
...
@@ -27,11 +28,13 @@
}
.day_group
{
margin-bottom
:
20px
;
margin-bottom
:
10px
;
padding-bottom
:
10px
;
border-bottom
:
1px
dashed
$border-grey
;
&
:last-child
{
border-bottom
:
none
;
}
.date
{
text-align
:
center
;
color
:
$light-grey
;
margin-bottom
:
5px
;
.day
{
font-size
:
40px
;
line-height
:
40px
;
...
...
app/views/notifications/index.html.haml
View file @
029520a3
...
...
@@ -6,13 +6,13 @@
%ul
.nav.nav-tabs.nav-stacked
%li
{
:class
=>
(
'active'
unless
params
[
:type
]
&&
@grouped_unread_notification_counts
.
has_key?
(
params
[
:type
]))
}
%a
{
:href
=>
'/notifications'
+
(
params
[
:show
]
==
'unread'
?
'?show=unread'
:
''
)
}
%span
.pull-right.badge
{
:class
=>
(
'badge-important'
if
@unread_notification_count
>
0
)}
%span
.pull-right.badge
{
:class
=>
(
@unread_notification_count
>
0
?
'badge-important'
:
'badge-default'
)}
=
@unread_notification_count
=
t
(
'.all_notifications'
)
-
@grouped_unread_notification_counts
.
each
do
|
key
,
count
|
%li
{
:class
=>
(
'active'
if
params
[
:type
]
==
key
),
:data
=>
{
:type
=>
key
}
}
%a
{
:href
=>
'/notifications?type='
+
key
+
(
params
[
:show
]
==
'unread'
?
'&show=unread'
:
''
)
}
%span
.pull-right.badge
{
:class
=>
(
'badge-important'
if
count
>
0
)
}
%span
.pull-right.badge
{
:class
=>
(
count
>
0
?
'badge-important'
:
'badge-default'
)
}
=
count
-
case
key
-
when
'also_commented'
,
'comment_on_post'
...
...
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