@ -17,115 +17,124 @@
{{ $ class = ( printf "%s%s" $ class " isWarning" ) }}
{{ $ class = ( printf "%s%s" $ class " isWarning" ) }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
<div class="ui top attached info clearing segment {{ $ class }} ">
<div class="ui top attached header clearing segment pr {{ $ class }} ">
{{ if not $ .PageIsWiki }}
{{ if not $ .PageIsWiki }}
<a class="ui floated right blue tiny button" href=" {{ .SourcePath }} ">
<a class="ui blue tiny button browse- button" href=" {{ .SourcePath }} ">
{{ .i18n .Tr "repo.diff.browse_source" }}
{{ .i18n .Tr "repo.diff.browse_source" }}
</a>
</a>
{{ end }}
{{ end }}
<h3><span class="message-wrapper"><span class="commit-summary" title=" {{ .Commit .Summary }} "> {{ RenderCommitMessage .Commit .Message $ .RepoLink $ .Repository .ComposeMetas }} </span></span> {{ template "repo/commit_statuses" dict "Status" .CommitStatus "Statuses" .CommitStatuses "root" $ }} </h3>
<h3 class="mt-0" ><span class="message-wrapper"><span class="commit-summary" title=" {{ .Commit .Summary }} "> {{ RenderCommitMessage .Commit .Message $ .RepoLink $ .Repository .ComposeMetas }} </span></span> {{ template "repo/commit_statuses" dict "Status" .CommitStatus "Statuses" .CommitStatuses "root" $ }} </h3>
{{ if IsMultilineCommitMessage .Commit .Message }}
{{ if IsMultilineCommitMessage .Commit .Message }}
<pre class="commit-body"> {{ RenderCommitBody .Commit .Message $ .RepoLink $ .Repository .ComposeMetas }} </pre>
<pre class="commit-body"> {{ RenderCommitBody .Commit .Message $ .RepoLink $ .Repository .ComposeMetas }} </pre>
{{ end }}
{{ end }}
{{ if .BranchName }}
{{ if .BranchName }}
<span class="text grey"> {{ svg "octicon-git-branch" }} {{ .BranchName }} </span>
<span class="text grey mr-3 "> {{ svg "octicon-git-branch" 1 6 "mr-2 " }} {{ .BranchName }} </span>
{{ end }}
{{ end }}
{{ if .TagName }}
{{ if .TagName }}
<span class="text grey"> {{ svg "octicon-tag" }} {{ .TagName }} </span>
<span class="text grey mr-3 "> {{ svg "octicon-tag" 1 6 "mr-2 " }} {{ .TagName }} </span>
{{ end }}
{{ end }}
</div>
</div>
<div class="ui attached info segment {{ $ class }} ">
<div class="ui attached segment df ac sb py-2 commit-header-row {{ $ class }} ">
<div class="ui stackable grid">
<div class="df ac">
<div class="nine wide column">
{{ if .Author }}
{{ if .Author }}
{{ avatar .Author }}
{{ avatar .Author 2 8 "mr-3" }}
{{ if .Author .FullName }}
{{ if .Author .FullName }}
<a href=" {{ .Author .HomeLink }} "><strong> {{ .Author .FullName }} </strong></a>
<a href=" {{ .Author .HomeLink }} "><strong> {{ .Author .FullName }} </strong></a>
{{ else }}
{{ else }}
<a href=" {{ .Author .HomeLink }} "><strong> {{ .Commit .Author .Name }} </strong></a>
<a href=" {{ .Author .HomeLink }} "><strong> {{ .Commit .Author .Name }} </strong></a>
{{ end }}
{{ end }}
{{ else }}
{{ else }}
{{ avatarByEmail .Commit .Author .Email .Commit .Author .Email 1 2 }}
{{ avatarByEmail .Commit .Author .Email .Commit .Author .Email 2 8 "mr-3" }}
<strong> {{ .Commit .Author .Name }} </strong>
<strong> {{ .Commit .Author .Name }} </strong>
{{ end }}
{{ end }}
<span class="text grey" id="authored-time"> {{ TimeSince .Commit .Author .When $ .Lang }} </span>
<span class="text grey ml-3 " id="authored-time"> {{ TimeSince .Commit .Author .When $ .Lang }} </span>
{{ if or ( ne .Commit .Committer .Name .Commit .Author .Name ) ( ne .Commit .Committer .Email .Commit .Author .Email ) }}
{{ if or ( ne .Commit .Committer .Name .Commit .Author .Name ) ( ne .Commit .Committer .Email .Commit .Author .Email ) }}
<div class="committed-by">
<span class="text grey mx-3"> {{ .i18n .Tr "repo.diff.committed_by" }} </span>
<span class="text grey"> {{ svg "octicon-git-commit" }} {{ .i18n .Tr "repo.diff.committed_by" }} </span>
{{ if ne .Verification .CommittingUser .ID 0 }}
{{ if ne .Verification .CommittingUser .ID 0 }}
{{ avatar .Verification .CommittingUser 2 8 "mx-3" }}
{{ avatar .Verification .CommittingUser }}
<a href=" {{ .Verification .CommittingUser .HomeLink }} "><strong> {{ .Commit .Committer .Name }} </strong></a>
<a href=" {{ .Verification .CommittingUser .HomeLink }} "><strong> {{ .Commit .Committer .Name }} </strong></a>
{{ else }}
{{ else }}
{{ avatarByEmail .Commit .Committer .Email .Commit .Committer .Name 2 8 "mr-3" }}
{{ avatarByEmail .Commit .Committer .Email .Commit .Committer .Name }}
<strong> {{ .Commit .Committer .Name }} </strong>
<strong> {{ .Commit .Committer .Name }} </strong>
{{ end }}
{{ end }}
</div>
<div class="ui horizontal list df ac">
{{ if .Parents }}
<div class="item">
{{ .i18n .Tr "repo.diff.parent" }}
</div>
<div class="item">
{{ range .Parents }}
{{ if $ .PageIsWiki }}
<a class="ui blue sha label" href=" {{ $ .RepoLink }} /wiki/commit/ {{ PathEscape . }} "> {{ ShortSha . }} </a>
{{ else }}
<a class="ui blue sha label" href=" {{ $ .RepoLink }} /commit/ {{ PathEscape . }} "> {{ ShortSha . }} </a>
{{ end }}
{{ end }}
{{ end }}
</div>
</div>
{{ end }}
{{ end }}
<div class="mobile-only"></div>
<div class="item"> {{ .i18n .Tr "repo.diff.commit" }} </div>
<div class="item"><span class="ui blue sha label"> {{ ShortSha .CommitID }} </span></div>
</div>
</div>
<div class="seven wide right aligned column">
<div class="ui horizontal list">
{{ if .Parents }}
<div class="item">
{{ .i18n .Tr "repo.diff.parent" }}
</div>
<div class="item">
{{ range .Parents }}
{{ if $ .PageIsWiki }}
<a class="ui blue sha label" href=" {{ $ .RepoLink }} /wiki/commit/ {{ PathEscape . }} "> {{ ShortSha . }} </a>
{{ else }}
<a class="ui blue sha label" href=" {{ $ .RepoLink }} /commit/ {{ PathEscape . }} "> {{ ShortSha . }} </a>
{{ end }}
{{ end }}
</div>
{{ end }}
<div class="mobile-only"></div>
<div class="item"> {{ .i18n .Tr "repo.diff.commit" }} </div>
<div class="item"><span class="ui blue sha label"> {{ ShortSha .CommitID }} </span></div>
</div>
</div><!-- end column -->
</div><!-- end grid -->
</div>
</div>
{{ if .Commit .Signature }}
{{ if .Commit .Signature }}
<div class="ui bottom attached message {{ $ class }} ">
<div class="ui bottom attached message tl df ac sb commit-header-row {{ $ class }} ">
{{ if .Verification .Verified }}
<div class="df ac">
{{ if ne .Verification .SigningUser .ID 0 }}
{{ if .Verification .Verified }}
{{ svg "gitea-lock" }}
{{ if ne .Verification .SigningUser .ID 0 }}
{{ if eq .Verification .TrustStatus "trusted" }}
{{ svg "gitea-lock" 1 6 "mr-3" }}
<span class="ui text"> {{ .i18n .Tr "repo.commits.signed_by" }} :</span>
{{ if eq .Verification .TrustStatus "trusted" }}
{{ else if eq .Verification .TrustStatus "untrusted" }}
<span class="ui text mr-3"> {{ .i18n .Tr "repo.commits.signed_by" }} :</span>
<span class="ui text"> {{ .i18n .Tr "repo.commits.signed_by_untrusted_user" }} :</span>
{{ else if eq .Verification .TrustStatus "untrusted" }}
<span class="ui text mr-3"> {{ .i18n .Tr "repo.commits.signed_by_untrusted_user" }} :</span>
{{ else }}
<span class="ui text mr-3"> {{ .i18n .Tr "repo.commits.signed_by_untrusted_user_unmatched" }} :</span>
{{ end }}
{{ avatar .Verification .SigningUser 2 8 }}
<a href=" {{ .Verification .SigningUser .HomeLink }} "><strong> {{ .Verification .SigningUser .Name }} </strong></a>
{{ else }}
{{ else }}
<span class="ui text"> {{ .i18n .Tr "repo.commits.signed_by_untrusted_user_unmatched" }} :</span>
<span title=" {{ .i18n .Tr "gpg.default_key" }} "> {{ svg "gitea-lock-cog" }} </span>
<span class="ui text"> {{ .i18n .Tr "repo.commits.signed_by" }} :</span>
{{ avatarByEmail .Verification .SigningEmail "" 2 8 }}
<strong> {{ .Verification .SigningUser .Name }} </strong>
{{ end }}
{{ end }}
{{ avatar .Verification .SigningUser }}
<a href=" {{ .Verification .SigningUser .HomeLink }} "><strong> {{ .Verification .SigningUser .Name }} </strong></a>
<span class="pull-right"><span class="ui text"> {{ .i18n .Tr "repo.commits.gpg_key_id" }} :</span> {{ .Verification .SigningKey .KeyID }} </span>
{{ else }}
{{ else }}
<span title=" {{ .i18n .Tr "gpg.default_key" }} "> {{ svg "gitea-lock-cog" }} </span>
{{ svg "gitea-unlock" 1 6 "mr-3" }}
<span class="ui text"> {{ .i18n .Tr "repo.commits.signed_by" }} :</span>
<span class="ui text"> {{ .i18n .Tr .Verification .Reason }} </span>
{{ avatarByEmail .Verification .SigningEmail "" }}
<strong> {{ .Verification .SigningUser .Name }} </strong>
<span class="pull-right"><span class="ui text"> {{ .i18n .Tr "repo.commits.gpg_key_id" }} :</span> <i class="cogs icon" title=" {{ .i18n .Tr "gpg.default_key" }} "></i> {{ .Verification .SigningKey .KeyID }} </span>
{{ end }}
{{ end }}
{{ else if .Verification .Warning }}
</div>
{{ svg "gitea-unlock" }}
<div class="df ac">
<span class="ui text"> {{ .i18n .Tr .Verification .Reason }} </span>
{{ if .Verification .Verified }}
<span class="pull-right"><span class="ui text"> {{ .i18n .Tr "repo.commits.gpg_key_id" }} :</span> <i class="warning icon"></i> {{ .Verification .SigningKey .KeyID }} </span>
{{ if ne .Verification .SigningUser .ID 0 }}
{{ else }}
{{ svg "octicon-shield-check" 1 6 "mr-3" }}
<i class="unlock icon"></i>
<span class="ui text mr-3"> {{ .i18n .Tr "repo.commits.gpg_key_id" }} :</span>
{{ .i18n .Tr .Verification .Reason }}
{{ .Verification .SigningKey .KeyID }}
{{ if .Verification .SigningKey }}
{{ else }}
{{ if ne .Verification .SigningKey .KeyID "" }}
{{ svg "octicon-shield-lock" 1 6 "mr-3" }}
<span class="pull-right"><span class="ui text"> {{ .i18n .Tr "repo.commits.gpg_key_id" }} :</span> <i class="warning icon"></i> {{ .Verification .SigningKey .KeyID }} </span>
<span class="ui text mr-3 tooltip" data-content=" {{ .i18n .Tr "gpg.default_key" }} "> {{ .i18n .Tr "repo.commits.gpg_key_id" }} :</span>
{{ .Verification .SigningKey .KeyID }}
{{ end }}
{{ else if .Verification .Warning }}
{{ svg "octicon-shield" 1 6 "mr-3" }}
<span class="ui text mr-3"> {{ .i18n .Tr "repo.commits.gpg_key_id" }} :</span>
{{ .Verification .SigningKey .KeyID }}
{{ else }}
{{ if .Verification .SigningKey }}
{{ if ne .Verification .SigningKey .KeyID "" }}
{{ svg "octicon-shield" 1 6 "mr-3" }}
<span class="ui text mr-3"> {{ .i18n .Tr "repo.commits.gpg_key_id" }} :</span>
{{ .Verification .SigningKey .KeyID }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
</div>
</div>
</div>
{{ end }}
{{ end }}
{{ if .Note }}
{{ if .Note }}
<div class="ui top attached info segment message git-notes">
<div class="ui top attached header segment git-notes">
<i class="sticky note icon"></i>
{{ svg "octicon-note" 1 6 "mr-3" }}
{{ .i18n .Tr "repo.diff.git-notes" }} :
{{ .i18n .Tr "repo.diff.git-notes" }} :
{{ if .NoteAuthor }}
{{ if .NoteAuthor }}
<a href=" {{ .NoteAuthor .HomeLink }} ">
<a href=" {{ .NoteAuthor .HomeLink }} ">