diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2023-07-10 02:42:31 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-09 18:42:31 +0000 |
commit | 84c78650cc2d7c6480f397d59e1d4e33a5f71d19 (patch) | |
tree | 17b535c6c4a49a1260fa09467157e43f8522aacb /templates/user | |
parent | 321383db22b19e302aafe59194f0b6539257d90f (diff) | |
download | gitea-84c78650cc2d7c6480f397d59e1d4e33a5f71d19.tar.gz gitea-84c78650cc2d7c6480f397d59e1d4e33a5f71d19.zip |
Fix notification list bugs (#25781)
Fix #25627
1. `ctx.Data["Link"]` should use relative URL but not AppURL
2. The `data-params` is incorrect because it doesn't contain "page". JS
can simply use "window.location.search" to construct the AJAX URL
3. The `data-xxx` and `id` in notification_subscriptions.tmpl were
copied&pasted, they don't have affect.
Diffstat (limited to 'templates/user')
-rw-r--r-- | templates/user/notification/notification_div.tmpl | 2 | ||||
-rw-r--r-- | templates/user/notification/notification_subscriptions.tmpl | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/templates/user/notification/notification_div.tmpl b/templates/user/notification/notification_div.tmpl index a8c070d764..3cc9d31d52 100644 --- a/templates/user/notification/notification_div.tmpl +++ b/templates/user/notification/notification_div.tmpl @@ -1,4 +1,4 @@ -<div role="main" aria-label="{{.Title}}" class="page-content user notification" id="notification_div" data-params="{{.Page.GetParams}}" data-sequence-number="{{.SequenceNumber}}"> +<div role="main" aria-label="{{.Title}}" class="page-content user notification" id="notification_div" data-sequence-number="{{.SequenceNumber}}"> <div class="ui container"> {{$notificationUnreadCount := call .NotificationUnreadCount}} <div class="gt-df gt-ac gt-sb gt-mb-4"> diff --git a/templates/user/notification/notification_subscriptions.tmpl b/templates/user/notification/notification_subscriptions.tmpl index 40586595bb..b511939447 100644 --- a/templates/user/notification/notification_subscriptions.tmpl +++ b/templates/user/notification/notification_subscriptions.tmpl @@ -1,5 +1,5 @@ {{template "base/head" .}} -<div role="main" aria-label="{{.Title}}" class="page-content user notification" id="notification_subscriptions" data-params="{{.Page.GetParams}}" data-sequence-number="{{.SequenceNumber}}"> +<div role="main" aria-label="{{.Title}}" class="page-content user notification"> <div class="ui container"> <div class="ui top attached tabular menu"> <a href="{{AppSubUrl}}/notifications/subscriptions" class="{{if eq .Status 1}}active {{end}}item"> |