From 579e5e4fee59f01f8a438e7ef977f34fa5dba72c Mon Sep 17 00:00:00 2001 From: Unknwon Date: Sun, 28 Aug 2016 04:56:41 -0700 Subject: Web editor: disallow edit mirror repository --- templates/.VERSION | 2 +- templates/repo/home.tmpl | 28 ++++++++++++++++------------ templates/repo/view_file.tmpl | 20 +++++++++++--------- 3 files changed, 28 insertions(+), 22 deletions(-) (limited to 'templates') diff --git a/templates/.VERSION b/templates/.VERSION index 0bbb321a..721eb5bc 100644 --- a/templates/.VERSION +++ b/templates/.VERSION @@ -1 +1 @@ -0.9.91.0828 \ No newline at end of file +0.9.92.0828 \ No newline at end of file diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl index 5c6a536c..7ef75277 100644 --- a/templates/repo/home.tmpl +++ b/templates/repo/home.tmpl @@ -33,18 +33,22 @@
-
- {{if .CanAddFile}} - - {{.i18n.Tr "repo.editor.new_file"}} - - {{end}} - {{if .UploadFileLink}} - - {{end}} -
+ {{if .Repository.CanEnableEditor}} +
+ {{if .CanAddFile}} + + {{.i18n.Tr "repo.editor.new_file"}} + + {{end}} + {{if .UploadFileLink}} + + {{end}} +
+ {{end}} + + {{if eq $n 0}}
- {{if .CanEditFile}} - - {{else}} - - {{end}} - {{if .CanDeleteFile}} - - {{else}} - + {{if .Repository.CanEnableEditor}} + {{if .CanEditFile}} + + {{else}} + + {{end}} + {{if .CanDeleteFile}} + + {{else}} + + {{end}} {{end}}
{{end}} -- cgit v1.2.3