From c1be811954b65350fc4319fc7f537ce4ed60980f Mon Sep 17 00:00:00 2001 From: zhoupzh Date: Tue, 2 Nov 2021 16:52:32 +0800 Subject: [PATCH] fix issue #497 --- templates/repo/view_file.tmpl | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/templates/repo/view_file.tmpl b/templates/repo/view_file.tmpl index 1216b5f40..7c98420d9 100644 --- a/templates/repo/view_file.tmpl +++ b/templates/repo/view_file.tmpl @@ -34,6 +34,21 @@ {{end}} + + {{if .ReadmeInList}} +
+
+ {{if .Repository.CanEnableEditor}} + {{if .CanEditFile}} + {{svg "octicon-pencil" 16}} + {{else}} + {{svg "octicon-pencil" 16}} + {{end}} + {{end}} +
+
+ {{end}} + {{if not .ReadmeInList}}