diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 7ea227b8c..9b9e25ba8 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -1275,3 +1275,6 @@ unread = Unread read = Read no_unread = You have no unread notifications. no_read = You have no read notifications. +pin = Pin +mark_as_read = Mark as read +mark_as_unread = Mark as unread diff --git a/options/locale/locale_pt-BR.ini b/options/locale/locale_pt-BR.ini index 4893a7644..0623fbb13 100644 --- a/options/locale/locale_pt-BR.ini +++ b/options/locale/locale_pt-BR.ini @@ -1205,3 +1205,6 @@ unread = Não lidas read = Lidas no_unread = Você não possui notificações não lidas. no_read = Você não possui notificações lidas. +pin = Fixar +mark_as_read = Marcar como lida +mark_as_unread = Marcar como não lida diff --git a/public/css/index.css b/public/css/index.css index c569209e4..7c84cf851 100644 --- a/public/css/index.css +++ b/public/css/index.css @@ -2712,12 +2712,15 @@ footer .ui.language .menu { float: left; margin-left: 7px; } -.user.notification .buttons-panel button { - padding: 3px; -} -.user.notification .buttons-panel form { +.user.notification table form { display: inline-block; } +.user.notification table button { + padding: 3px 3px 3px 5px; +} +.user.notification table tr { + cursor: pointer; +} .user.notification .octicon-issue-opened, .user.notification .octicon-git-pull-request { color: #21ba45; diff --git a/public/js/index.js b/public/js/index.js index bd22442e5..867499326 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -1243,6 +1243,11 @@ $(document).ready(function () { $($(this).data('target')).slideToggle(100); }); + // make table element clickable like a link + $('tr[data-href]').click(function(event) { + window.location = $(this).data('href'); + }); + // Highlight JS if (typeof hljs != 'undefined') { hljs.initHighlightingOnLoad(); diff --git a/public/less/_user.less b/public/less/_user.less index 38b73f785..d63b9b3de 100644 --- a/public/less/_user.less +++ b/public/less/_user.less @@ -85,13 +85,17 @@ margin-left: 7px; } - .buttons-panel { + table { + form { + display: inline-block; + } + button { - padding: 3px; + padding: 3px 3px 3px 5px; } - form { - display: inline-block; + tr { + cursor: pointer; } } diff --git a/routers/user/notification.go b/routers/user/notification.go index 74a33f7e2..7bc2da18d 100644 --- a/routers/user/notification.go +++ b/routers/user/notification.go @@ -73,8 +73,8 @@ func Notifications(c *context.Context) { } title := c.Tr("notifications") - if count := len(notifications); count > 0 { - title = fmt.Sprintf("(%d) %s", count, title) + if status == models.NotificationStatusUnread && total > 0 { + title = fmt.Sprintf("(%d) %s", total, title) } c.Data["Title"] = title c.Data["Keyword"] = keyword diff --git a/templates/base/head.tmpl b/templates/base/head.tmpl index e23043620..176dd51cc 100644 --- a/templates/base/head.tmpl +++ b/templates/base/head.tmpl @@ -82,7 +82,7 @@ {{if .IsSigned}}