diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2024-04-01 21:11:30 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-01 21:11:30 +0800 |
commit | 751997ad34fdd52b9f3956b14395560b059c9ac1 (patch) | |
tree | ed31804eaad6dd0d85593e7457da8974c7106b0f /templates/repo/blame.tmpl | |
parent | a008486f5c5acfe2d2acb009f41dc660ee8348eb (diff) | |
download | gitea-751997ad34fdd52b9f3956b14395560b059c9ac1.tar.gz gitea-751997ad34fdd52b9f3956b14395560b059c9ac1.zip |
Refactor file view & render (#30227)
The old code is inconsistent and fragile, and the UI isn't right.
Diffstat (limited to 'templates/repo/blame.tmpl')
-rw-r--r-- | templates/repo/blame.tmpl | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/templates/repo/blame.tmpl b/templates/repo/blame.tmpl index 1a148a2d1c..30d1a3d78d 100644 --- a/templates/repo/blame.tmpl +++ b/templates/repo/blame.tmpl @@ -30,6 +30,9 @@ </h4> <div class="ui attached table unstackable segment"> <div class="file-view code-view unicode-escaped"> + {{if .IsFileTooLarge}} + {{template "shared/filetoolarge" dict "RawFileLink" .RawFileLink}} + {{else}} <table> <tbody> {{range $row := .BlameRows}} @@ -75,6 +78,7 @@ {{end}} </tbody> </table> + {{end}}{{/* end if .IsFileTooLarge */}} <div class="code-line-menu tippy-target"> {{if $.Permission.CanRead $.UnitTypeIssues}} <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> |