mirror of
https://gitee.com/gitea/gitea
synced 2025-11-03 16:10:25 +08:00
Show git-notes (#6984)
* Show git-notes * Make git-notes heading text localizable * Refactor git-notes data fetching to a separate function * Display the author and time of git notes * Move note bubble inside the commit bubble * Revert "Move note bubble inside the commit bubble" This reverts commit c0951fe0e3b4dea38064515546b1825c1bcf19e1. * Add test for git-notes * testing ui * Polish CSS * Apply suggestions from code review Co-Authored-By: Lauris BH <lauris@nix.lv>
This commit is contained in:
committed by
Lauris BH
parent
d5a98a2969
commit
a98e085031
@@ -65,6 +65,27 @@
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{if .Note}}
|
||||
<div class="ui top attached info segment message git-notes">
|
||||
<i class="sticky note icon"></i>
|
||||
{{.i18n.Tr "repo.diff.git-notes"}}:
|
||||
{{if .NoteAuthor}}
|
||||
<a href="{{.NoteAuthor.HomeLink}}">
|
||||
{{if .NoteAuthor.FullName}}
|
||||
<strong>{{.NoteAuthor.FullName}}</strong>
|
||||
{{else}}
|
||||
<strong>{{.NoteCommit.Author.Name}}</strong>
|
||||
{{end}}
|
||||
</a>
|
||||
{{else}}
|
||||
<strong>{{.NoteCommit.Author.Name}}</strong>
|
||||
{{end}}
|
||||
<span class="text grey" id="note-authored-time">{{TimeSince .NoteCommit.Author.When $.Lang}}</span>
|
||||
</div>
|
||||
<div class="ui bottom attached info segment git-notes">
|
||||
<pre class="commit-body">{{RenderNote .Note $.RepoLink $.Repository.ComposeMetas}}</pre>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
||||
{{template "repo/diff/box" .}}
|
||||
|
||||
Reference in New Issue
Block a user