2019-10-29 00:01:55 +05:30
|
|
|
{{template "base/head" .}}
|
2023-02-02 04:26:10 +05:30
|
|
|
<div role="main" aria-label="{{.Title}}" class="page-content repository settings lfs">
|
2019-10-29 00:01:55 +05:30
|
|
|
{{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">
|
2022-06-28 02:28:46 +05:30
|
|
|
<a href="{{.LFSFilesLink}}">{{.locale.Tr "repo.settings.lfs"}}</a> / <span class="truncate sha">{{.LFSFile.Oid}}</span>
|
2019-10-29 00:01:55 +05:30
|
|
|
<div class="ui right">
|
2022-01-07 06:48:52 +05:30
|
|
|
{{if .EscapeStatus.Escaped}}
|
2023-02-19 09:36:14 +05:30
|
|
|
<a class="ui mini basic button unescape-button gt-hidden">{{.locale.Tr "repo.unescape_control_characters"}}</a>
|
2022-06-28 02:28:46 +05:30
|
|
|
<a class="ui mini basic button escape-button">{{.locale.Tr "repo.escape_control_characters"}}</a>
|
2022-01-07 06:48:52 +05:30
|
|
|
{{end}}
|
2022-06-28 02:28:46 +05:30
|
|
|
<a class="ui primary show-panel button" href="{{.LFSFilesLink}}/find?oid={{.LFSFile.Oid}}&size={{.LFSFile.Size}}">{{$.locale.Tr "repo.settings.lfs_findcommits"}}</a>
|
2019-10-29 00:01:55 +05:30
|
|
|
</div>
|
|
|
|
</h4>
|
|
|
|
<div class="ui attached table unstackable segment">
|
2022-01-07 06:48:52 +05:30
|
|
|
{{template "repo/unicode_escape_prompt" dict "EscapeStatus" .EscapeStatus "root" $}}
|
2022-12-18 01:52:25 +05:30
|
|
|
<div class="file-view{{if .IsMarkup}} markup {{.MarkupType}}{{else if .IsPlainText}} plain-text{{else if .IsTextFile}} code-view{{end}}">
|
2019-10-29 00:01:55 +05:30
|
|
|
{{if .IsMarkup}}
|
|
|
|
{{if .FileContent}}{{.FileContent | Safe}}{{end}}
|
2022-12-18 01:52:25 +05:30
|
|
|
{{else if .IsPlainText}}
|
|
|
|
<pre>{{if .FileContent}}{{.FileContent | Safe}}{{end}}</pre>
|
2019-10-29 00:01:55 +05:30
|
|
|
{{else if not .IsTextFile}}
|
|
|
|
<div class="view-raw ui center">
|
|
|
|
{{if .IsImageFile}}
|
2021-11-16 23:48:25 +05:30
|
|
|
<img src="{{$.RawFileLink}}">
|
2019-10-29 00:01:55 +05:30
|
|
|
{{else if .IsVideoFile}}
|
2021-11-16 23:48:25 +05:30
|
|
|
<video controls src="{{$.RawFileLink}}">
|
2022-06-28 02:28:46 +05:30
|
|
|
<strong>{{.locale.Tr "repo.video_not_supported_in_browser"}}</strong>
|
2019-10-29 00:01:55 +05:30
|
|
|
</video>
|
|
|
|
{{else if .IsAudioFile}}
|
2021-11-16 23:48:25 +05:30
|
|
|
<audio controls src="{{$.RawFileLink}}">
|
2022-06-28 02:28:46 +05:30
|
|
|
<strong>{{.locale.Tr "repo.audio_not_supported_in_browser"}}</strong>
|
2019-10-29 00:01:55 +05:30
|
|
|
</audio>
|
|
|
|
{{else if .IsPDFFile}}
|
2023-02-17 09:25:33 +05:30
|
|
|
<iframe width="100%" height="600px" src="{{AssetUrlPrefix}}/vendor/plugins/pdfjs/web/viewer.html?file={{$.RawFileLink}}"></iframe>
|
2019-10-29 00:01:55 +05:30
|
|
|
{{else}}
|
2022-06-28 02:28:46 +05:30
|
|
|
<a href="{{$.RawFileLink}}" rel="nofollow" class="btn btn-gray btn-radius">{{.locale.Tr "repo.file_view_raw"}}</a>
|
2019-10-29 00:01:55 +05:30
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
{{else if .FileSize}}
|
|
|
|
<table>
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
{{if .IsFileTooLarge}}
|
2022-06-28 02:28:46 +05:30
|
|
|
<td><strong>{{.locale.Tr "repo.file_too_large"}}</strong></td>
|
2019-10-29 00:01:55 +05:30
|
|
|
{{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" .}}
|