2023-04-23 13:21:21 +03:00
|
|
|
{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings lfs")}}
|
|
|
|
<div class="user-main-content twelve wide column content repository file list">
|
2019-10-28 21:31:55 +03:00
|
|
|
<div class="tab-size-8 non-diff-file-content">
|
|
|
|
<h4 class="ui top attached header">
|
2022-06-27 23:58:46 +03:00
|
|
|
<a href="{{.LFSFilesLink}}">{{.locale.Tr "repo.settings.lfs"}}</a> / <span class="truncate sha">{{.LFSFile.Oid}}</span>
|
2019-10-28 21:31:55 +03:00
|
|
|
<div class="ui right">
|
2022-01-07 04:18:52 +03:00
|
|
|
{{if .EscapeStatus.Escaped}}
|
2023-02-19 07:06:14 +03:00
|
|
|
<a class="ui mini basic button unescape-button gt-hidden">{{.locale.Tr "repo.unescape_control_characters"}}</a>
|
2022-06-27 23:58:46 +03:00
|
|
|
<a class="ui mini basic button escape-button">{{.locale.Tr "repo.escape_control_characters"}}</a>
|
2022-01-07 04:18:52 +03:00
|
|
|
{{end}}
|
2023-03-23 19:52:20 +03:00
|
|
|
<a class="ui primary button" href="{{.LFSFilesLink}}/find?oid={{.LFSFile.Oid}}&size={{.LFSFile.Size}}">{{$.locale.Tr "repo.settings.lfs_findcommits"}}</a>
|
2019-10-28 21:31:55 +03:00
|
|
|
</div>
|
|
|
|
</h4>
|
|
|
|
<div class="ui attached table unstackable segment">
|
2022-01-07 04:18:52 +03:00
|
|
|
{{template "repo/unicode_escape_prompt" dict "EscapeStatus" .EscapeStatus "root" $}}
|
2022-12-17 23:22:25 +03:00
|
|
|
<div class="file-view{{if .IsMarkup}} markup {{.MarkupType}}{{else if .IsPlainText}} plain-text{{else if .IsTextFile}} code-view{{end}}">
|
2019-10-28 21:31:55 +03:00
|
|
|
{{if .IsMarkup}}
|
|
|
|
{{if .FileContent}}{{.FileContent | Safe}}{{end}}
|
2022-12-17 23:22:25 +03:00
|
|
|
{{else if .IsPlainText}}
|
|
|
|
<pre>{{if .FileContent}}{{.FileContent | Safe}}{{end}}</pre>
|
2019-10-28 21:31:55 +03:00
|
|
|
{{else if not .IsTextFile}}
|
|
|
|
<div class="view-raw ui center">
|
|
|
|
{{if .IsImageFile}}
|
2021-11-16 21:18:25 +03:00
|
|
|
<img src="{{$.RawFileLink}}">
|
2019-10-28 21:31:55 +03:00
|
|
|
{{else if .IsVideoFile}}
|
2021-11-16 21:18:25 +03:00
|
|
|
<video controls src="{{$.RawFileLink}}">
|
2022-06-27 23:58:46 +03:00
|
|
|
<strong>{{.locale.Tr "repo.video_not_supported_in_browser"}}</strong>
|
2019-10-28 21:31:55 +03:00
|
|
|
</video>
|
|
|
|
{{else if .IsAudioFile}}
|
2021-11-16 21:18:25 +03:00
|
|
|
<audio controls src="{{$.RawFileLink}}">
|
2022-06-27 23:58:46 +03:00
|
|
|
<strong>{{.locale.Tr "repo.audio_not_supported_in_browser"}}</strong>
|
2019-10-28 21:31:55 +03:00
|
|
|
</audio>
|
|
|
|
{{else if .IsPDFFile}}
|
2023-02-17 06:55:33 +03:00
|
|
|
<iframe width="100%" height="600px" src="{{AssetUrlPrefix}}/vendor/plugins/pdfjs/web/viewer.html?file={{$.RawFileLink}}"></iframe>
|
2019-10-28 21:31:55 +03:00
|
|
|
{{else}}
|
2022-06-27 23:58:46 +03:00
|
|
|
<a href="{{$.RawFileLink}}" rel="nofollow" class="btn btn-gray btn-radius">{{.locale.Tr "repo.file_view_raw"}}</a>
|
2019-10-28 21:31:55 +03:00
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
{{else if .FileSize}}
|
|
|
|
<table>
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
{{if .IsFileTooLarge}}
|
2022-06-27 23:58:46 +03:00
|
|
|
<td><strong>{{.locale.Tr "repo.file_too_large"}}</strong></td>
|
2019-10-28 21:31:55 +03:00
|
|
|
{{else}}
|
|
|
|
<td class="lines-num">{{.LineNums}}</td>
|
2023-04-04 14:05:07 +03:00
|
|
|
<td class="lines-code"><pre><code class="{{.HighlightClass}}"><ol>{{.FileContent}}</ol></code></pre></td>
|
2019-10-28 21:31:55 +03:00
|
|
|
{{end}}
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-04-23 13:21:21 +03:00
|
|
|
{{template "repo/settings/layout_footer" .}}
|