mirror of
https://github.com/go-gitea/gitea.git
synced 2024-11-24 09:11:11 +08:00
4de80392bc
This branch continues the work of #23092 and attempts to rid the codebase of any `nil` contexts when using a `RenderContext`. Anything that renders markdown or does post processing may call `markup.sha1CurrentPatternProcessor()`, and this runs `git.OpenRepository()`, which needs a context. It will panic if the context is `nil`. This branch attempts to _always_ include a context when creating a `RenderContext` to prevent future crashes. Co-authored-by: Kyle D <kdumontnu@gmail.com>
53 lines
1.8 KiB
Handlebars
53 lines
1.8 KiB
Handlebars
{{template "base/head" .}}
|
|
<div role="main" aria-label="{{.Title}}" class="page-content repository settings lfs">
|
|
{{template "repo/header" .}}
|
|
{{template "repo/settings/navbar" .}}
|
|
<div class="ui container repository file list">
|
|
{{template "base/alert" .}}
|
|
<div class="tab-size-8 non-diff-file-content">
|
|
<h4 class="ui top attached header">
|
|
<a href="{{.LFSFilesLink}}">{{.locale.Tr "repo.settings.lfs"}}</a> / <span class="truncate sha">{{.Oid}}</span>
|
|
</h4>
|
|
<table id="lfs-files-find-table" class="ui attached segment single line table">
|
|
<tbody>
|
|
{{range .Results}}
|
|
<tr>
|
|
<td>
|
|
{{svg "octicon-file"}}
|
|
<a href="{{$.RepoLink}}/src/commit/{{.SHA}}/{{PathEscapeSegments .Name}}" title="{{.Name}}">{{.Name}}</a>
|
|
</td>
|
|
<td class="message">
|
|
<span class="truncate">
|
|
<a href="{{$.RepoLink}}/commit/{{.SHA}}" title="{{.Summary | RenderEmojiPlain}}">
|
|
{{.Summary | RenderEmoji $.Context}}
|
|
</a>
|
|
</span>
|
|
</td>
|
|
<td>
|
|
<span class="text grey">{{svg "octicon-git-branch"}}{{.BranchName}}</span>
|
|
</td>
|
|
<td>
|
|
{{if .ParentHashes}}
|
|
{{$.locale.Tr "repo.diff.parent"}}
|
|
{{range .ParentHashes}}
|
|
<a class="ui primary sha label" href="{{$.RepoLink}}/commit/{{.String}}">{{ShortSha .String}}</a>
|
|
{{end}}
|
|
{{end}}
|
|
<div class="mobile-only"></div>
|
|
{{$.locale.Tr "repo.diff.commit"}}
|
|
<a class="ui primary sha label" href="{{$.RepoLink}}/commit/{{.SHA}}">{{ShortSha .SHA}}</a>
|
|
</td>
|
|
<td>{{TimeSince .When $.locale}}</td>
|
|
</tr>
|
|
{{else}}
|
|
<tr>
|
|
<td colspan="5">{{.locale.Tr "repo.settings.lfs_lfs_file_no_commits"}}</td>
|
|
</tr>
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{template "base/footer" .}}
|