Skip to content

Commit

Permalink
[notifications] Populate notifications page. Closes #1126
Browse files Browse the repository at this point in the history
  • Loading branch information
jfresco committed Dec 9, 2015
1 parent 1de8a1c commit 51b58ef
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 5 deletions.
37 changes: 35 additions & 2 deletions lib/notifications-page/template.jade
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
mixin message (notification)
case notification.type
when 'upvote'
strong=notification.relatedUser.fullName
span  
span=t('notifications.upvote.verb')
span  
strong=notification.comment.text
span  
span=t('notifications.on')
span  
strong=notification.topic.mediaTitle
when 'downvote'
strong=notification.relatedUser.fullName
span  
span=t('notifications.downvote.verb')
span  
strong=notification.comment.text
span  
span=t('notifications.on')
span  
strong=notification.topic.mediaTitle
when 'reply'
strong=notification.relatedUser.fullName
span  
span=t('notifications.reply.verb')
span  
strong=notification.comment.text
span  
span=t('notifications.on')
span  
strong=notification.topic.mediaTitle

.notifications-page
h1=t('notifications.title')
table.table.table-hover
Expand All @@ -16,7 +49,7 @@
td.text-center
i.glyphicon(class=glyphicon)
td(colspan=notification.relatedUser ? 1 : 2)
| #{notification.text}
+message(notification)
p.small.ago(data-time=notification.createdAt.toString())
- if (notification.relatedUser)
td: img(src=notification.relatedUser.avatar)
td: img(src=notification.relatedUser.avatar)
7 changes: 4 additions & 3 deletions lib/translations/lib/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,10 @@
"notifications.error.connection-refused": "Unable to connect to notifications engine",
"notifications.title": "Notifications",
"notifications.topic.text": "There's a new topic \"{title}\"",
"notifications.reply.text": "{ userReferenceName } replied your comment",
"notifications.upvote.text": "{ userReferenceName } upvoted your comment",
"notifications.downvote.text": "{ userReferenceName } downvoted your comment",
"notifications.reply.verb": "replied your comment",
"notifications.upvote.verb": "upvoted your comment",
"notifications.downvote.verb": "downvoted your comment",
"notifications.on": "on",
"password": "Password",
"password.new": "New Password",
"password.repeat": "Repeat Password",
Expand Down
4 changes: 4 additions & 0 deletions lib/translations/lib/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,10 @@
"notifications.error": "No es posible conectarse al motor de notificaciones",
"notifications.error.connection-refused": "No es posible conectarse al motor de notificaciones",
"notifications.title": "Notificaciones",
"notifications.reply.verb": "respondió tu argumento",
"notifications.upvote.verb": "votó a favor tu argumento",
"notifications.downvote.verb": "votó en contra tu argumento",
"notifications.on": "en",
"password": "Contraseña",
"password.new": "Nueva contraseña",
"password.repeat": "Repetir contraseña",
Expand Down

0 comments on commit 51b58ef

Please sign in to comment.