Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 15 additions & 16 deletions templates/repo/commit_page.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -141,20 +141,20 @@
</div>
<div class="ui attached segment gt-df gt-ac gt-sb gt-py-2 commit-header-row gt-fw {{$class}}">
<div class="gt-df gt-ac author">
{{/* .Author: User model */}}
{{/* .Commit.Author: Author information stored in commit, see modules/git/Commit, modules/git/Signature */}}
{{/* .Verification.SigningUser: User model, see modules/git/CommitVerification */}}
{{- /* .Author: User model (might be nil) */ -}}
{{- /* .Commit: modules/git/Commit */ -}}
{{- /* .Commit.Author: modules/git/Signature{Name, Email, When}, commit information stored in commit */ -}}
{{- /* .Commit.Committer: modules/git/Signature{Name, Email, When}, commit information stored in commit */ -}}
{{- /* .Verification: modules/git/CommitVerification */ -}}
{{- /* .Verification.SigningUser: User model */ -}}
{{- /* .Verification.CommittingUser: User model */ -}}
{{if .Author}}
{{avatar $.Context .Author 28 "gt-mr-3"}}
{{if .Author.Name}}
{{if eq .Commit.Author.Name .Author.Name}}
<a href="{{.Author.HomeLink}}"><strong>{{.Commit.Author.Name}}</strong></a>
{{else}}
{{/* If the account name and username don't match, use an alternative "also known as" format */}}
<a href="{{.Author.HomeLink}}"><strong>{{.Commit.Author.Name}} ({{.Author.Name}})</strong></a>
{{end}}
{{if eq .Commit.Author.Name .Author.Name}}
<a href="{{.Author.HomeLink}}"><strong>{{.Commit.Author.Name}}{{if and DefaultShowFullName .Author.FullName}} ({{.Author.FullName}}{{end}})</strong></a>
{{else}}
<a href="{{.Author.HomeLink}}"><strong>{{.Commit.Author.Name}}</strong></a>
{{/* If the account name and username don't match, use an alternative "also known as" format */}}
<a href="{{.Author.HomeLink}}"><strong>{{.Commit.Author.Name}} ({{.Author.Name}}{{if and DefaultShowFullName .Author.FullName}} / {{.Author.FullName}}{{end}})</strong></a>
{{end}}
{{else}}
{{avatarByEmail $.Context .Commit.Author.Email .Commit.Author.Email 28 "gt-mr-3"}}
Expand All @@ -166,7 +166,7 @@
{{if ne .Verification.CommittingUser.ID 0}}
{{avatar $.Context .Verification.CommittingUser 28 "gt-mx-3"}}
{{if eq .Commit.Committer.Name .Verification.CommittingUser.Name}}
<a href="{{.Verification.CommittingUser.HomeLink}}"><strong>{{.Commit.Committer.Name}} ({{.Verification.CommittingUser.Name}})</strong></a>
<a href="{{.Verification.CommittingUser.HomeLink}}"><strong>{{.Commit.Committer.Name}} ({{.Verification.CommittingUser.Name}}{{if and DefaultShowFullName .Verification.CommittingUser.FullName}} / {{.Verification.CommittingUser.FullName}}{{end}})</strong></a>
{{else}}
<a href="{{.Verification.CommittingUser.HomeLink}}"><strong>{{.Commit.Committer.Name}}</strong></a>
{{end}}
Expand Down Expand Up @@ -199,7 +199,6 @@
<div class="ui bottom attached message gt-text-left gt-df gt-ac gt-sb commit-header-row gt-fw {{$class}}">
<div class="gt-df gt-ac">
{{if .Verification.Verified}}
{{/* .Verification.SigningUser: User model, see modules/git/CommitVerification */}}
{{if ne .Verification.SigningUser.ID 0}}
{{svg "gitea-lock" 16 "gt-mr-3"}}
{{if eq .Verification.TrustStatus "trusted"}}
Expand All @@ -210,11 +209,11 @@
<span class="ui text gt-mr-3">{{.locale.Tr "repo.commits.signed_by_untrusted_user_unmatched"}}:</span>
{{end}}
{{avatar $.Context .Verification.SigningUser 28 "gt-mr-3"}}
{{if .Verification.SigningUser.FullName}}
{{if and DefaultShowFullName .Verification.SigningUser.FullName}}
{{/* Use the same scheme as the one used in commits. */}}
<a href="{{.Verification.SigningUser.HomeLink}}"><strong> {{.Verification.SigningUser.Name}} ({{.Verification.SigningUser.FullName}})</strong></a>
<a href="{{.Verification.SigningUser.HomeLink}}"><strong>{{.Verification.SigningUser.Name}} ({{.Verification.SigningUser.FullName}})</strong></a>
{{else}}
<a href="{{.Verification.SigningUser.HomeLink}}"><strong> ({{.Verification.SigningUser.GetDisplayName}})</strong></a>
<a href="{{.Verification.SigningUser.HomeLink}}"><strong>{{.Verification.SigningUser.Name}}</strong></a>
{{end}}
{{else}}
<span title="{{.locale.Tr "gpg.default_key"}}">{{svg "gitea-lock-cog" 16 "gt-mr-3"}}</span>
Expand Down