diff options
author | Unknwon <joe2010xtmf@163.com> | 2015-02-07 10:46:57 -0500 |
---|---|---|
committer | Unknwon <joe2010xtmf@163.com> | 2015-02-07 10:46:57 -0500 |
commit | 2a2596fe615e4f18e0aff02cc8a016fea0463849 (patch) | |
tree | c4a22ca4a195fa4ccdbfee80bae83a1a309548e5 /templates/repo | |
parent | 3f2e99962cd466da2eb09fe4719f258e6f7a39e4 (diff) | |
download | gitea-2a2596fe615e4f18e0aff02cc8a016fea0463849.tar.gz gitea-2a2596fe615e4f18e0aff02cc8a016fea0463849.zip |
able to disable SSH for #883
Diffstat (limited to 'templates/repo')
-rw-r--r-- | templates/repo/header.tmpl | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl index 20e67db810..9e52efc727 100644 --- a/templates/repo/header.tmpl +++ b/templates/repo/header.tmpl @@ -18,9 +18,11 @@ </a> <div id="repo-header-download-drop" class="drop-down"> <div id="repo-clone" class="clear"> - <button class="btn btn-blue left left btn-left-radius" id="repo-clone-ssh" data-link="{{$.CloneLink.SSH}}">SSH</button> - <button class="btn btn-gray left" id="repo-clone-https" data-link="{{$.CloneLink.HTTPS}}">HTTPS</button> - <input id="repo-clone-url" class="ipt ipt-disabled left" value="{{$.CloneLink.SSH}}" readonly /> + {{if not $.DisableSSH}} + <button class="btn btn-blue left btn-left-radius" id="repo-clone-ssh" data-link="{{$.CloneLink.SSH}}">SSH</button> + {{end}} + <button class="btn {{if $.DisableSSH}}btn-blue{{else}}btn-gray{{end}} left" id="repo-clone-https" data-link="{{$.CloneLink.HTTPS}}">HTTPS</button> + <input id="repo-clone-url" class="ipt ipt-disabled left" value="{{if $.DisableSSH}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}" readonly /> <button id="repo-clone-copy" class="btn btn-black left btn-right-radius" data-copy-val="val" data-copy-from="#repo-clone-url" original-title="{{$.i18n.Tr "repo.click_to_copy"}}" data-original-title="{{$.i18n.Tr "repo.click_to_copy"}}" data-after-title="{{$.i18n.Tr "repo.copied"}}">{{$.i18n.Tr "repo.copy_link"}}</button> <p class="text-center" id="repo-clone-help">{{$.i18n.Tr "repo.clone_helper" "http://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository" | Str2html}}</p> <hr/> |