Skip to content

Commit b18042b

Browse files
authored
Fix wiki clone urls (#15430)
Fix wiki clone urls Regressed by: 9a4050f Fixes: #15420
1 parent 26e16e4 commit b18042b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

templates/repo/clone_buttons.tmpl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{{if not $.DisableHTTP}}
2-
<button class="ui basic clone button no-transition" id="repo-clone-https" data-link="{{.CloneLink.HTTPS}}">
2+
<button class="ui basic clone button no-transition" id="repo-clone-https" data-link="{{if $.PageIsWiki}}{{$.WikiCloneLink.HTTPS}}{{else}}{{$.CloneLink.HTTPS}}{{end}}">
33
{{if UseHTTPS}}HTTPS{{else}}HTTP{{end}}
44
</button>
55
{{end}}
66
{{if and (not $.DisableSSH) (or $.IsSigned $.ExposeAnonSSH)}}
7-
<button class="ui basic clone button no-transition" id="repo-clone-ssh" data-link="{{.CloneLink.SSH}}">
7+
<button class="ui basic clone button no-transition" id="repo-clone-ssh" data-link="{{if $.PageIsWiki}}{{$.WikiCloneLink.SSH}}{{else}}{{$.CloneLink.SSH}}{{end}}">
88
SSH
99
</button>
1010
{{end}}
1111
{{if not $.DisableHTTP}}
12-
<input id="repo-clone-url" value="{{$.CloneLink.HTTPS}}" readonly>
12+
<input id="repo-clone-url" value="{{if $.PageIsWiki}}{{$.WikiCloneLink.HTTPS}}{{else}}{{$.CloneLink.HTTPS}}{{end}}" readonly>
1313
{{else if and (not .DisableSSH) (or $.IsSigned $.ExposeAnonSSH)}}
14-
<input id="repo-clone-url" value="{{$.CloneLink.SSH}}" readonly>
14+
<input id="repo-clone-url" value="{{if $.PageIsWiki}}{{$.WikiCloneLink.SSH}}{{else}}{{$.CloneLink.SSH}}{{end}}" readonly>
1515
{{end}}
1616
{{if or (not $.DisableHTTP) (and (not $.DisableSSH) (or $.IsSigned $.ExposeAnonSSH))}}
1717
<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">

0 commit comments

Comments
 (0)