mirror of
https://github.com/go-gitea/gitea.git
synced 2026-05-14 13:08:11 +02:00
add repo name
This commit is contained in:
parent
b2e3bbf19d
commit
8d0e112111
@ -110,6 +110,7 @@ func renderRepoFileCodePreview(ctx context.Context, opts markup.RenderCodePrevie
|
|||||||
"FilePath": opts.FilePath,
|
"FilePath": opts.FilePath,
|
||||||
"LineStart": opts.LineStart,
|
"LineStart": opts.LineStart,
|
||||||
"LineStop": realLineStop,
|
"LineStop": realLineStop,
|
||||||
|
"RepoName": opts.RepoName,
|
||||||
"RepoLink": dbRepo.Link(),
|
"RepoLink": dbRepo.Link(),
|
||||||
"CommitID": opts.CommitID,
|
"CommitID": opts.CommitID,
|
||||||
"HighlightLines": highlightLines,
|
"HighlightLines": highlightLines,
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<div class="code-preview-container file-content">
|
<div class="code-preview-container file-content">
|
||||||
<div class="code-preview-header">
|
<div class="code-preview-header">
|
||||||
<a href="{{.FullURL}}" rel="nofollow" class="tw-font-semibold">{{.FilePath}}</a>
|
<a href="{{.FullURL}}" rel="nofollow" class="tw-font-semibold">{{.RepoName}}/{{.FilePath}}</a>
|
||||||
{{$link := HTMLFormat `<a href="%s/commit/%s" class="muted tw-font-mono tw-text-text">%s</a>` .RepoLink .CommitID (.CommitID | ShortSha) -}}
|
{{$link := HTMLFormat `<a href="%s/commit/%s" class="muted tw-font-mono tw-text-text">%s</a>` .RepoLink .CommitID (.CommitID | ShortSha) -}}
|
||||||
{{- if eq .LineStart .LineStop -}}
|
{{- if eq .LineStart .LineStop -}}
|
||||||
{{ctx.Locale.Tr "repo.code_preview_line_in" .LineStart $link}}
|
{{ctx.Locale.Tr "repo.code_preview_line_in" .LineStart $link}}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user