1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Improve notification (#8835)

* Improve notifications

* batch load user

* Update notification only when read

* Fix reorder

* fix lint

* fix test

* fix lint

* make function meaningful

* fix comment
This commit is contained in:
Lunny Xiao
2019-11-12 16:33:34 +08:00
committed by GitHub
parent 555b1f6581
commit bb6879d339
7 changed files with 299 additions and 36 deletions

View File

@@ -34,11 +34,11 @@
<table class="ui unstackable striped very compact small selectable table">
<tbody>
{{range $notification := .Notifications}}
{{$issue := $notification.GetIssue}}
{{$repo := $notification.GetRepo}}
{{$issue := $notification.Issue}}
{{$repo := $notification.Repository}}
{{$repoOwner := $repo.MustOwner}}
<tr data-href="{{AppSubUrl}}/{{$repoOwner.Name}}/{{$repo.Name}}/issues/{{$issue.Index}}">
<tr data-href="{{$notification.HTMLURL}}">
<td class="collapsing">
{{if eq $notification.Status 3}}
<i class="blue octicon octicon-pin"></i>
@@ -61,7 +61,7 @@
{{end}}
</td>
<td class="eleven wide">
<a class="item" href="{{AppSubUrl}}/{{$repoOwner.Name}}/{{$repo.Name}}/issues/{{$issue.Index}}">
<a class="item" href="{{$notification.HTMLURL}}">
#{{$issue.Index}} - {{$issue.Title}}
</a>
</td>