aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorYevhen Pavlov <yevhen.pavlov.ua@gmail.com>2023-05-29 20:56:08 +0300
committerGitHub <noreply@github.com>2023-05-29 19:56:08 +0200
commita36c620583b9caa3133b714f47b6de32754e136c (patch)
tree44b29875174e443b8ed102f561e7ab5b962df88b /templates
parente06f3d2ee510e748b43fff5996f549b493644cad (diff)
downloadgitea-a36c620583b9caa3133b714f47b6de32754e136c.tar.gz
gitea-a36c620583b9caa3133b714f47b6de32754e136c.zip
Display file mode for new file and file mode changes (#24966)
This MR introduces the addition of file mode display support for both new file creation and file mode changes, following a similar approach as GitLab. GitLab: ![изображение](https://github.com/go-gitea/gitea/assets/1969460/4c0d0d74-30b2-486c-ac12-ef2355b04c96) Gitea: ![изображение](https://github.com/go-gitea/gitea/assets/1969460/8237fe99-2507-42c0-a40c-cd52ad355ab7) Replaces: https://github.com/go-gitea/gitea/pull/23159 Closes: https://github.com/go-gitea/gitea/issues/23021 --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Giteabot <teabot@gitea.io>
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/diff/box.tmpl5
1 files changed, 5 insertions, 0 deletions
diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl
index 292a7dd2bd..132f999808 100644
--- a/templates/repo/diff/box.tmpl
+++ b/templates/repo/diff/box.tmpl
@@ -113,6 +113,11 @@
{{if $file.IsVendored}}
<span class="ui label gt-ml-3">{{$.locale.Tr "repo.diff.vendored"}}</span>
{{end}}
+ {{if and $file.Mode $file.OldMode}}
+ <span class="gt-ml-4 gt-mono">{{$file.OldMode}} &rarr; {{$file.Mode}}</span>
+ {{else if $file.Mode}}
+ <span class="gt-ml-4 gt-mono">{{$file.Mode}}</span>
+ {{end}}
</div>
<div class="diff-file-header-actions gt-df gt-ac">
{{if $showFileViewToggle}}