2019-10-28 14:31:55 -04:00
|
|
|
{{template "base/head" .}}
|
2020-11-30 23:00:14 -05:00
|
|
|
<div class="page-content repository settings lfs">
|
2019-10-28 14:31:55 -04:00
|
|
|
{{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}}">{{.i18n.Tr "repo.settings.lfs"}}</a> / <span class="truncate sha">{{.LFSFile.Oid}}</span>
|
|
|
|
<div class="ui right">
|
2022-01-06 20:18:52 -05:00
|
|
|
{{if .EscapeStatus.Escaped}}
|
|
|
|
<a class="ui mini basic button unescape-button" style="display: none;">{{.i18n.Tr "repo.unescape_control_characters"}}</a>
|
|
|
|
<a class="ui mini basic button escape-button">{{.i18n.Tr "repo.escape_control_characters"}}</a>
|
|
|
|
{{end}}
|
2022-05-19 18:08:08 -04:00
|
|
|
<a class="ui primary show-panel button" href="{{.LFSFilesLink}}/find?oid={{.LFSFile.Oid}}&size={{.LFSFile.Size}}">{{$.i18n.Tr "repo.settings.lfs_findcommits"}}</a>
|
2019-10-28 14:31:55 -04:00
|
|
|
</div>
|
|
|
|
</h4>
|
|
|
|
<div class="ui attached table unstackable segment">
|
2022-01-06 20:18:52 -05:00
|
|
|
{{template "repo/unicode_escape_prompt" dict "EscapeStatus" .EscapeStatus "root" $}}
|
2021-05-07 04:43:41 -04:00
|
|
|
<div class="file-view{{if .IsMarkup}} markup {{.MarkupType}}{{else if .IsRenderedHTML}} plain-text{{else if .IsTextFile}} code-view{{end}}">
|
2019-10-28 14:31:55 -04:00
|
|
|
{{if .IsMarkup}}
|
|
|
|
{{if .FileContent}}{{.FileContent | Safe}}{{end}}
|
|
|
|
{{else if .IsRenderedHTML}}
|
|
|
|
<pre>{{if .FileContent}}{{.FileContent | Str2html}}{{end}}</pre>
|
|
|
|
{{else if not .IsTextFile}}
|
|
|
|
<div class="view-raw ui center">
|
|
|
|
{{if .IsImageFile}}
|
2021-11-16 13:18:25 -05:00
|
|
|
<img src="{{$.RawFileLink}}">
|
2019-10-28 14:31:55 -04:00
|
|
|
{{else if .IsVideoFile}}
|
2021-11-16 13:18:25 -05:00
|
|
|
<video controls src="{{$.RawFileLink}}">
|
2019-10-28 14:31:55 -04:00
|
|
|
<strong>{{.i18n.Tr "repo.video_not_supported_in_browser"}}</strong>
|
|
|
|
</video>
|
|
|
|
{{else if .IsAudioFile}}
|
2021-11-16 13:18:25 -05:00
|
|
|
<audio controls src="{{$.RawFileLink}}">
|
2019-10-28 14:31:55 -04:00
|
|
|
<strong>{{.i18n.Tr "repo.audio_not_supported_in_browser"}}</strong>
|
|
|
|
</audio>
|
|
|
|
{{else if .IsPDFFile}}
|
2021-11-16 13:18:25 -05:00
|
|
|
<iframe width="100%" height="600px" src="{{AppSubUrl}}/vendor/plugins/pdfjs/web/viewer.html?file={{$.RawFileLink}}"></iframe>
|
2019-10-28 14:31:55 -04:00
|
|
|
{{else}}
|
2021-11-16 13:18:25 -05:00
|
|
|
<a href="{{$.RawFileLink}}" rel="nofollow" class="btn btn-gray btn-radius">{{.i18n.Tr "repo.file_view_raw"}}</a>
|
2019-10-28 14:31:55 -04:00
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
{{else if .FileSize}}
|
|
|
|
<table>
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
{{if .IsFileTooLarge}}
|
|
|
|
<td><strong>{{.i18n.Tr "repo.file_too_large"}}</strong></td>
|
|
|
|
{{else}}
|
|
|
|
<td class="lines-num">{{.LineNums}}</td>
|
|
|
|
<td class="lines-code"><pre><code class="{{.HighlightClass}}"><ol class="linenums">{{.FileContent}}</ol></code></pre></td>
|
|
|
|
{{end}}
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{template "base/footer" .}}
|