From 4564d1349615c1d976b812acb4d7451852a6fbd2 Mon Sep 17 00:00:00 2001 From: Gustavo Paes Date: Sun, 9 Aug 2015 14:38:26 -0300 Subject: Remove SSH button when SSH is disabled --- templates/repo/bare.tmpl | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'templates/repo/bare.tmpl') diff --git a/templates/repo/bare.tmpl b/templates/repo/bare.tmpl index d258c60f57..704baa7572 100644 --- a/templates/repo/bare.tmpl +++ b/templates/repo/bare.tmpl @@ -21,9 +21,11 @@

{{.i18n.Tr "repo.clone_this_repo"}}

- - - + {{if not $.DisableSSH}} + + {{end}} + +

{{.i18n.Tr "repo.clone_helper" "http://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository" | Str2html}}


@@ -34,14 +36,14 @@ git init git add README.md git commit -m "first commit" -git remote add origin {{.CloneLink.SSH}} +git remote add origin {{if $.DisableSSH}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}} git push -u origin master

{{.i18n.Tr "repo.push_exist_repo"}}

-
git remote add origin {{.CloneLink.SSH}}
+                        
git remote add origin {{if $.DisableSSH}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}
 git push -u origin master

-- cgit v1.2.3