gitea
Зеркало из https://github.com/go-gitea/gitea
1{{if or .UsesIgnoreRevs .FaultyIgnoreRevsFile}}
2{{$revsFileLink := URLJoin .RepoLink "src" .BranchNameSubURL "/.git-blame-ignore-revs"}}
3{{if .UsesIgnoreRevs}}
4<div class="ui info message">
5<p>{{ctx.Locale.Tr "repo.blame.ignore_revs" $revsFileLink "?bypass-blame-ignore=true"}}</p>
6</div>
7{{else}}
8<div class="ui error message">
9<p>{{ctx.Locale.Tr "repo.blame.ignore_revs.failed" $revsFileLink}}</p>
10</div>
11{{end}}
12{{end}}
13<div class="{{TabSizeClass .Editorconfig .FileName}} non-diff-file-content">
14<h4 class="file-header ui top attached header tw-flex tw-items-center tw-justify-between tw-flex-wrap">
15<div class="file-header-left tw-flex tw-items-center tw-py-2 tw-pr-4">
16{{template "repo/file_info" .}}
17</div>
18<div class="file-header-right file-actions tw-flex tw-items-center tw-flex-wrap">
19<div class="ui buttons">
20<a class="ui tiny button" href="{{$.RawFileLink}}">{{ctx.Locale.Tr "repo.file_raw"}}</a>
21{{if not .IsViewCommit}}
22<a class="ui tiny button" href="{{.RepoLink}}/src/commit/{{.CommitID | PathEscape}}/{{.TreePath | PathEscapeSegments}}">{{ctx.Locale.Tr "repo.file_permalink"}}</a>
23{{end}}
24<a class="ui tiny button" href="{{.RepoLink}}/src/{{.BranchNameSubURL}}/{{.TreePath | PathEscapeSegments}}">{{ctx.Locale.Tr "repo.normal_view"}}</a>
25<a class="ui tiny button" href="{{.RepoLink}}/commits/{{.BranchNameSubURL}}/{{.TreePath | PathEscapeSegments}}">{{ctx.Locale.Tr "repo.file_history"}}</a>
26<button class="ui tiny button unescape-button">{{ctx.Locale.Tr "repo.unescape_control_characters"}}</button>
27<button class="ui tiny button escape-button tw-hidden">{{ctx.Locale.Tr "repo.escape_control_characters"}}</button>
28</div>
29</div>
30</h4>
31<div class="ui bottom attached table unstackable segment">
32<div class="file-view code-view unicode-escaped">
33{{if .IsFileTooLarge}}
34{{template "shared/filetoolarge" dict "RawFileLink" .RawFileLink}}
35{{else if not .FileSize}}
36{{template "shared/fileisempty"}}
37{{else}}
38<table>
39<tbody>
40{{range $row := .BlameRows}}
41<tr class="{{if and (gt $.CommitCnt 1) ($row.CommitMessage)}}top-line-blame{{end}}">
42<td class="lines-commit">
43<div class="blame-info">
44<div class="blame-data">
45<div class="blame-avatar">
46{{$row.Avatar}}
47</div>
48<div class="blame-message">
49<a class="suppressed tw-text-text" href="{{$row.CommitURL}}" title="{{$row.CommitMessage}}">
50{{$row.CommitMessage}}
51</a>
52</div>
53<div class="blame-time not-mobile">
54{{$row.CommitSince}}
55</div>
56</div>
57</div>
58</td>
59<td class="lines-blame-btn">
60{{if $row.PreviousSha}}
61<a role="button" class="muted" href="{{$row.PreviousShaURL}}" data-tooltip-content='{{ctx.Locale.Tr "repo.blame_prior"}}'>
62{{svg "octicon-versions"}}
63</a>
64{{end}}
65</td>
66<td class="lines-num">
67<span id="L{{$row.RowNumber}}" data-line-number="{{$row.RowNumber}}"></span>
68</td>
69{{if $.EscapeStatus.Escaped}}
70<td class="lines-escape">
71{{if $row.EscapeStatus.Escaped}}
72<button class="toggle-escape-button btn interact-bg" title="{{template "repo/diff/escape_title" dict "diff" $row}}"></button>
73{{end}}
74</td>
75{{end}}
76<td rel="L{{$row.RowNumber}}" class="lines-code blame-code chroma">
77<code class="code-inner tw-pl-2">{{$row.Code}}</code>
78</td>
79</tr>
80{{end}}
81</tbody>
82</table>
83{{end}}{{/* end if .IsFileTooLarge */}}
84<div class="code-line-menu tippy-target">
85{{if $.Permission.CanRead ctx.Consts.RepoUnitTypeIssues}}
86<a class="item ref-in-new-issue" role="menuitem" data-url-issue-new="{{.RepoLink}}/issues/new" data-url-param-body-link="{{.Repository.Link}}/src/commit/{{PathEscape .CommitID}}/{{PathEscapeSegments .TreePath}}{{if $.HasSourceRenderedToggle}}?display=source{{end}}" rel="nofollow noindex">{{ctx.Locale.Tr "repo.issues.context.reference_issue"}}</a>
87{{end}}
88<a class="item copy-line-permalink" role="menuitem" data-url="{{.Repository.Link}}/src/commit/{{PathEscape .CommitID}}/{{PathEscapeSegments .TreePath}}{{if $.HasSourceRenderedToggle}}?display=source{{end}}">{{ctx.Locale.Tr "repo.file_copy_permalink"}}</a>
89</div>
90</div>
91</div>
92</div>
93