Skip to content

Commit

Permalink
[notifications] Added no-notifications message #1126
Browse files Browse the repository at this point in the history
  • Loading branch information
jfresco committed Dec 11, 2015
1 parent 3d4b888 commit 29b72aa
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 19 deletions.
42 changes: 23 additions & 19 deletions lib/notifications-page/template.jade
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,26 @@ mixin message (notification)
.notifications-page
h1=t('notifications.title')
table.table.table-hover
- each notification in notifications
- var glyphicon = ''
case notification.type
when 'reply'
- glyphicon = 'glyphicon-comment'
when 'topic'
- glyphicon = 'glyphicon-exclamation-sign'
when 'upvote'
- glyphicon = 'glyphicon-chevron-up'
when 'downvote'
- glyphicon = 'glyphicon-chevron-down'
tr(data-url=notification.url)
td.text-center
i.glyphicon(class=glyphicon)
td(colspan=notification.relatedUser ? 1 : 2)
+message(notification)
p.small.ago(data-time=notification.createdAt.toString())
- if (notification.relatedUser)
td: img(src=notification.relatedUser.avatar)
- if (notifications.length)
- each notification in notifications
- var glyphicon = ''
case notification.type
when 'reply'
- glyphicon = 'glyphicon-comment'
when 'topic'
- glyphicon = 'glyphicon-exclamation-sign'
when 'upvote'
- glyphicon = 'glyphicon-chevron-up'
when 'downvote'
- glyphicon = 'glyphicon-chevron-down'
tr(data-url=notification.url)
td.text-center
i.glyphicon(class=glyphicon)
td(colspan=notification.relatedUser ? 1 : 2)
+message(notification)
p.small.ago(data-time=notification.createdAt.toString())
- if (notification.relatedUser)
td: img(src=notification.relatedUser.avatar)
- else
.notifications-empty
p=t('notifications.empty')
1 change: 1 addition & 0 deletions lib/translations/lib/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@
"notifications.upvote.verb": "upvoted your comment",
"notifications.downvote.verb": "downvoted your comment",
"notifications.on": "on",
"notifications.empty": "You don't have notifications",
"password": "Password",
"password.new": "New Password",
"password.repeat": "Repeat Password",
Expand Down
1 change: 1 addition & 0 deletions lib/translations/lib/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@
"notifications.upvote.verb": "votó a favor tu argumento",
"notifications.downvote.verb": "votó en contra tu argumento",
"notifications.on": "en",
"notifications.empty": "No hay notificaciones",
"password": "Contraseña",
"password.new": "Nueva contraseña",
"password.repeat": "Repetir contraseña",
Expand Down

0 comments on commit 29b72aa

Please sign in to comment.