diff options
author | Sasha Varlamov <sasha@sashavarlamov.com> | 2017-12-07 12:52:57 +0700 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2017-12-07 13:52:57 +0800 |
commit | 7ec6cddd27f36f50f06669b208674feb0dc19535 (patch) | |
tree | d29dbb6b7fc8f956a9745d5610a9228231759d66 /templates/user | |
parent | 1ed7f1881589b3831b2fe36fa9228f82c1b9b83e (diff) | |
download | gitea-7ec6cddd27f36f50f06669b208674feb0dc19535.tar.gz gitea-7ec6cddd27f36f50f06669b208674feb0dc19535.zip |
Add 'mark all read' option to notifications (#3097)
* Add 'mark all read' option to notifications
Signed-off-by: Sasha Varlamov <sasha@sashavarlamov.com>
* Fix exported comment
Signed-off-by: Sasha Varlamov <sasha@sashavarlamov.com>
* Format method comments
Signed-off-by: Sasha Varlamov <sasha@sashavarlamov.com>
* Fix exported comment
Signed-off-by: Sasha Varlamov <sasha@sashavarlamov.com>
Format method comments
Signed-off-by: Sasha Varlamov <sasha@sashavarlamov.com>
Tests for reactions (#3083)
* Unit tests for reactions
* Fix import order
Signed-off-by: Lauris Bukšis-Haberkorns <lauris@nix.lv>
Fix reaction possition when there is attachments (#3099)
Refactor notifications swap function
* Accept change to drop beforeupdate call
* Update purge notifications error message for consistency
* Drop unnecessary check for mark all as read button
* Remove debugging comment
Diffstat (limited to 'templates/user')
-rw-r--r-- | templates/user/notification/notification.tmpl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/templates/user/notification/notification.tmpl b/templates/user/notification/notification.tmpl index da6bd07d2a..3c30bbe305 100644 --- a/templates/user/notification/notification.tmpl +++ b/templates/user/notification/notification.tmpl @@ -14,6 +14,14 @@ <a href="{{AppSubUrl}}/notifications?q=read" class="{{if eq .Status 2}}active{{end}} item"> {{.i18n.Tr "notification.read"}} </a> + {{if and (eq .Status 1) (.NotificationUnreadCount)}} + <form action="{{AppSubUrl}}/notifications/purge" method="POST" style="margin-left: auto;"> + {{$.CsrfTokenHtml}} + <button class="ui mini button primary" title='{{$.i18n.Tr "notification.mark_all_as_read"}}'> + <i class="octicon octicon-checklist"></i> + </button> + </form> + {{end}} </div> <div class="ui bottom attached active tab segment"> {{if eq (len .Notifications) 0}} |