summaryrefslogtreecommitdiffstats
path: root/templates/repo/wiki
diff options
context:
space:
mode:
authorThibault Meyer <meyer.thibault@gmail.com>2016-09-18 10:54:33 +0200
committerThibault Meyer <meyer.thibault@gmail.com>2016-09-18 10:54:33 +0200
commit9d66497abca96905fbeba53bf8983301710d6064 (patch)
treea2729e6cdf7f4b7be54cd2cf72a49610835b16ce /templates/repo/wiki
parent7e15ff9486cde36b76f3d39b7db23f89278acb7d (diff)
downloadgitea-9d66497abca96905fbeba53bf8983301710d6064.tar.gz
gitea-9d66497abca96905fbeba53bf8983301710d6064.zip
Can disable GIT interactions by HTTP protocol
Diffstat (limited to 'templates/repo/wiki')
-rw-r--r--templates/repo/wiki/view.tmpl16
1 files changed, 11 insertions, 5 deletions
diff --git a/templates/repo/wiki/view.tmpl b/templates/repo/wiki/view.tmpl
index ff828789c8..7c4f34fb13 100644
--- a/templates/repo/wiki/view.tmpl
+++ b/templates/repo/wiki/view.tmpl
@@ -29,15 +29,21 @@
</div>
<div class="ui six wide column">
<div class="ui action small input" id="clone-panel">
- <button class="ui basic clone button" id="repo-clone-https" data-link="{{.WikiCloneLink.HTTPS}}">
- {{if UseHTTPS}}HTTPS{{else}}HTTP{{end}}
- </button>
+ {{if not $.DisableHTTP}}
+ <button class="ui basic clone button" id="repo-clone-https" data-link="{{.CloneLink.HTTPS}}">
+ {{if UseHTTPS}}HTTPS{{else}}HTTP{{end}}
+ </button>
+ {{end}}
{{if not $.DisableSSH}}
- <button class="ui basic clone button" id="repo-clone-ssh" data-link="{{.WikiCloneLink.SSH}}">
+ <button class="ui basic clone button" id="repo-clone-ssh" data-link="{{.CloneLink.SSH}}">
SSH
</button>
{{end}}
- <input id="repo-clone-url" value="{{$.WikiCloneLink.HTTPS}}" readonly>
+ {{if not $.DisableHTTP}}
+ <input id="repo-clone-url" value="{{$.CloneLink.HTTPS}}" readonly>
+ {{else}}
+ <input id="repo-clone-url" value="{{$.CloneLink.SSH}}" readonly>
+ {{end}}
<button class="ui basic icon button poping up clipboard" id="clipboard-btn" data-original="{{.i18n.Tr "repo.copy_link"}}" data-success="{{.i18n.Tr "repo.copy_link_success"}}" data-error="{{.i18n.Tr "repo.copy_link_error"}}" data-content="{{.i18n.Tr "repo.copy_link"}}" data-variation="inverted tiny" data-clipboard-target="#repo-clone-url">
<i class="octicon octicon-clippy"></i>
</button>