mirror of https://github.com/go-gitea/gitea.git
Remove SSH button when SSH is disabled
This commit is contained in:
parent
8a3ee795d2
commit
4564d13496
|
@ -1496,7 +1496,7 @@ The register and sign-in page style
|
||||||
.repo-bare #repo-header-meta {
|
.repo-bare #repo-header-meta {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
.repo-bare #repo-clone-ssh {
|
.repo-bare .btn-first {
|
||||||
margin-left: 200px;
|
margin-left: 200px;
|
||||||
}
|
}
|
||||||
.repo-bare #repo-clone-copy {
|
.repo-bare #repo-clone-copy {
|
||||||
|
|
|
@ -345,7 +345,7 @@
|
||||||
#repo-header-meta {
|
#repo-header-meta {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
#repo-clone-ssh {
|
.btn-first {
|
||||||
margin-left: 200px;
|
margin-left: 200px;
|
||||||
}
|
}
|
||||||
#repo-clone-copy {
|
#repo-clone-copy {
|
||||||
|
|
|
@ -21,9 +21,11 @@
|
||||||
<div class="panel-content">
|
<div class="panel-content">
|
||||||
<div id="repo-clone" class="clear text-center">
|
<div id="repo-clone" class="clear text-center">
|
||||||
<h2>{{.i18n.Tr "repo.clone_this_repo"}}</h2>
|
<h2>{{.i18n.Tr "repo.clone_this_repo"}}</h2>
|
||||||
<button class="btn btn-blue current left btn-left-radius" id="repo-clone-ssh" data-link="{{.CloneLink.SSH}}">SSH</button>
|
{{if not $.DisableSSH}}
|
||||||
<button class="btn btn-gray left" id="repo-clone-https" data-link="{{.CloneLink.HTTPS}}">HTTPS</button>
|
<button class="btn btn-blue btn-first current left btn-left-radius" id="repo-clone-ssh" data-link="{{.CloneLink.SSH}}">SSH</button>
|
||||||
<input id="repo-clone-url" type="text" class="ipt ipt-disabled left" value="{{.CloneLink.SSH}}" onclick="this.select()" readonly />
|
{{end}}
|
||||||
|
<button class="btn {{if $.DisableSSH}}btn-first btn-blue current{{else}}btn-gray{{end}} left" id="repo-clone-https" data-link="{{.CloneLink.HTTPS}}">HTTPS</button>
|
||||||
|
<input id="repo-clone-url" type="text" class="ipt ipt-disabled left" value="{{if $.DisableSSH}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}" onclick="this.select()" readonly />
|
||||||
<button class="btn btn-black left btn-right-radius" id="repo-clone-copy" data-copy-val="val" data-copy-from="#repo-clone-url">{{.i18n.Tr "repo.copy_link"}}</button>
|
<button class="btn btn-black left btn-right-radius" id="repo-clone-copy" data-copy-val="val" data-copy-from="#repo-clone-url">{{.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>
|
<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/>
|
<hr/>
|
||||||
|
@ -34,14 +36,14 @@
|
||||||
git init
|
git init
|
||||||
git add README.md
|
git add README.md
|
||||||
git commit -m "first commit"
|
git commit -m "first commit"
|
||||||
git remote add origin <span class="clone-url">{{.CloneLink.SSH}}</span>
|
git remote add origin <span class="clone-url">{{if $.DisableSSH}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}</span>
|
||||||
git push -u origin master</code></pre>
|
git push -u origin master</code></pre>
|
||||||
<br/>
|
<br/>
|
||||||
<hr/>
|
<hr/>
|
||||||
</div>
|
</div>
|
||||||
<div id="repo-bare-remote" class="text-center">
|
<div id="repo-bare-remote" class="text-center">
|
||||||
<h2>{{.i18n.Tr "repo.push_exist_repo"}}</h2>
|
<h2>{{.i18n.Tr "repo.push_exist_repo"}}</h2>
|
||||||
<pre class="text-left radius"><code>git remote add origin <span class="clone-url">{{.CloneLink.SSH}}</span>
|
<pre class="text-left radius"><code>git remote add origin <span class="clone-url">{{if $.DisableSSH}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}</span>
|
||||||
git push -u origin master</code></pre>
|
git push -u origin master</code></pre>
|
||||||
<br/>
|
<br/>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue