mirror of https://github.com/go-gitea/gitea.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
2.5 KiB
48 lines
2.5 KiB
<button class="ui compact primary button js-btn-clone-panel"> |
|
{{svg "octicon-code" 16}} |
|
<span>{{ctx.Locale.Tr "repo.code"}}</span> |
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}} |
|
</button> |
|
<div class="clone-panel-popup tippy-target"> |
|
<div class="flex-text-block clone-panel-field">{{svg "octicon-terminal"}} Clone</div> |
|
|
|
<div class="clone-panel-tab"> |
|
<!-- there is always at least one button (guaranteed by context/repo.go) --> |
|
{{if $.CloneButtonShowHTTPS}} |
|
<button class="item repo-clone-https" data-link="{{$.CloneButtonOriginLink.HTTPS}}">HTTPS</button> |
|
{{end}} |
|
{{if $.CloneButtonShowSSH}} |
|
<button class="item repo-clone-ssh" data-link="{{$.CloneButtonOriginLink.SSH}}">SSH</button> |
|
{{end}} |
|
<button class="item repo-clone-tea" data-link="{{$.CloneButtonOriginLink.Tea}}">Tea CLI</button> |
|
</div> |
|
<div class="divider"></div> |
|
|
|
<div class="clone-panel-field"> |
|
<div class="ui input tiny action"> |
|
<input size="30" class="repo-clone-url js-clone-url" value="{{$.CloneButtonOriginLink.HTTPS}}" readonly> |
|
<div class="ui small compact icon button" data-clipboard-target=".js-clone-url" data-tooltip-content="{{ctx.Locale.Tr "copy_url"}}"> |
|
{{svg "octicon-copy" 14}} |
|
</div> |
|
</div> |
|
</div> |
|
|
|
{{if not .PageIsWiki}} |
|
<div class="flex-items-block clone-panel-list"> |
|
{{range .OpenWithEditorApps}} |
|
<a class="item muted js-clone-url-editor" data-href-template="{{.OpenURL}}">{{.IconHTML}}{{ctx.Locale.Tr "repo.open_with_editor" .DisplayName}}</a> |
|
{{end}} |
|
</div> |
|
|
|
{{if and (not $.DisableDownloadSourceArchives) $.RefFullName}} |
|
<div class="divider"></div> |
|
<div class="flex-items-block clone-panel-list"> |
|
{{/* FIXME: here it only uses the shortname in the ref to build the link, it can't distinguish the branch/tag/commit with the same name |
|
in the future, it's better to use something like "/archive/branch/the-name.zip", "/archive/tag/the-name.zip" */}} |
|
<a class="item muted archive-link" href="{{$.RepoLink}}/archive/{{PathEscapeSegments $.RefFullName.ShortName}}.zip" rel="nofollow">{{svg "octicon-file-zip"}} {{ctx.Locale.Tr "repo.download_zip"}}</a> |
|
<a class="item muted archive-link" href="{{$.RepoLink}}/archive/{{PathEscapeSegments $.RefFullName.ShortName}}.tar.gz" rel="nofollow">{{svg "octicon-file-zip"}} {{ctx.Locale.Tr "repo.download_tar"}}</a> |
|
<a class="item muted archive-link" href="{{$.RepoLink}}/archive/{{PathEscapeSegments $.RefFullName.ShortName}}.bundle" rel="nofollow">{{svg "octicon-package"}} {{ctx.Locale.Tr "repo.download_bundle"}}</a> |
|
</div> |
|
{{end}} |
|
{{end}} |
|
</div>
|
|
|