diff options
author | Unknwon <u@gogs.io> | 2016-08-28 04:56:41 -0700 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-08-28 04:56:41 -0700 |
commit | 579e5e4fee59f01f8a438e7ef977f34fa5dba72c (patch) | |
tree | eb949bc9c4a8024067ca1a81f47f1f2c8c48d002 /templates/repo/home.tmpl | |
parent | ba27d71abea437af2f0612a8960eea651ec2df59 (diff) | |
download | gitea-579e5e4fee59f01f8a438e7ef977f34fa5dba72c.tar.gz gitea-579e5e4fee59f01f8a438e7ef977f34fa5dba72c.zip |
Web editor: disallow edit mirror repository
Diffstat (limited to 'templates/repo/home.tmpl')
-rw-r--r-- | templates/repo/home.tmpl | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl index 5c6a536c2c..7ef75277e6 100644 --- a/templates/repo/home.tmpl +++ b/templates/repo/home.tmpl @@ -33,18 +33,22 @@ </div> </div> <div class="right fitted item"> - <div id="file-buttons" class="ui tiny buttons"> - {{if .CanAddFile}} - <a href="{{.RepoLink}}/_new/{{EscapePound .BranchName}}/{{EscapePound .TreePath}}" class="ui button"> - {{.i18n.Tr "repo.editor.new_file"}} - </a> - {{end}} - {{if .UploadFileLink}} - <!-- <a href="{{EscapePound .UploadFileLink}}" class="ui button nowrap"> - <i class="upload icon"></i> {{.i18n.Tr "repo.upload_file"}} - </a> --> - {{end}} - </div> + {{if .Repository.CanEnableEditor}} + <div id="file-buttons" class="ui tiny buttons"> + {{if .CanAddFile}} + <a href="{{.RepoLink}}/_new/{{EscapePound .BranchName}}/{{EscapePound .TreePath}}" class="ui button"> + {{.i18n.Tr "repo.editor.new_file"}} + </a> + {{end}} + {{if .UploadFileLink}} + <!-- <a href="{{EscapePound .UploadFileLink}}" class="ui button nowrap"> + <i class="upload icon"></i> {{.i18n.Tr "repo.upload_file"}} + </a> --> + {{end}} + </div> + {{end}} + + <!-- Only show colne panel in repository home page --> {{if eq $n 0}} <div class="ui action small input" id="clone-panel"> <button class="ui basic clone button" id="repo-clone-https" data-link="{{.CloneLink.HTTPS}}"> |