gitea

Development moved to Codeberg

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
  24. 24
  25. 25
  26. 26
  27. 27
  28. 28
  29. 29
  30. 30
  31. 31
  32. 32
  33. 33
  34. 34
  35. 35
  36. 36
  37. 37
  38. 38
  39. 39
  40. 40
  41. 41
  42. 42
  43. 43
  44. 44
  45. 45
  46. 46
  47. 47
  48. 48
  49. 49
  50. 50
  51. 51
  52. 52
  53. 53
  54. 54
  55. 55
  56. 56
  57. 57
  58. 58
  59. 59
  60. 60
  61. 61
  62. 62
{{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">{{.LFSFile.Oid}}</span>
				<div class="ui right">
					{{if .EscapeStatus.Escaped}}
						<a class="ui mini basic button unescape-button gt-hidden">{{.locale.Tr "repo.unescape_control_characters"}}</a>
						<a class="ui mini basic button escape-button">{{.locale.Tr "repo.escape_control_characters"}}</a>
					{{end}}
					<a class="ui primary show-panel button" href="{{.LFSFilesLink}}/find?oid={{.LFSFile.Oid}}&size={{.LFSFile.Size}}">{{$.locale.Tr "repo.settings.lfs_findcommits"}}</a>
				</div>
			</h4>
			<div class="ui attached table unstackable segment">
				{{template "repo/unicode_escape_prompt" dict "EscapeStatus" .EscapeStatus "root" $}}
				<div class="file-view{{if .IsMarkup}} markup {{.MarkupType}}{{else if .IsPlainText}} plain-text{{else if .IsTextFile}} code-view{{end}}">
					{{if .IsMarkup}}
						{{if .FileContent}}{{.FileContent | Safe}}{{end}}
					{{else if .IsPlainText}}
						<pre>{{if .FileContent}}{{.FileContent | Safe}}{{end}}</pre>
					{{else if not .IsTextFile}}
						<div class="view-raw ui center">
							{{if .IsImageFile}}
								<img src="{{$.RawFileLink}}">
							{{else if .IsVideoFile}}
								<video controls src="{{$.RawFileLink}}">
									<strong>{{.locale.Tr "repo.video_not_supported_in_browser"}}</strong>
								</video>
							{{else if .IsAudioFile}}
								<audio controls src="{{$.RawFileLink}}">
									<strong>{{.locale.Tr "repo.audio_not_supported_in_browser"}}</strong>
								</audio>
							{{else if .IsPDFFile}}
								<iframe width="100%" height="600px" src="{{AssetUrlPrefix}}/vendor/plugins/pdfjs/web/viewer.html?file={{$.RawFileLink}}"></iframe>
							{{else}}
								<a href="{{$.RawFileLink}}" rel="nofollow" class="btn btn-gray btn-radius">{{.locale.Tr "repo.file_view_raw"}}</a>
							{{end}}
						</div>
					{{else if .FileSize}}
						<table>
							<tbody>
								<tr>
								{{if .IsFileTooLarge}}
									<td><strong>{{.locale.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" .}}