allow user fork repo even when as a guest.. This will prompt the user to login and if authentication was successful, the user will be redirected to fork the repo (#5690)
This commit is contained in:
parent
6630a33ec1
commit
abb364f442
|
@ -561,6 +561,7 @@ migrate.lfs_mirror_unsupported = Mirroring LFS objects is not supported - use 'g
|
||||||
mirror_from = mirror of
|
mirror_from = mirror of
|
||||||
forked_from = forked from
|
forked_from = forked from
|
||||||
fork_from_self = You cannot fork a repository you own.
|
fork_from_self = You cannot fork a repository you own.
|
||||||
|
fork_guest_user = Sign in to fork this repository.
|
||||||
copy_link = Copy
|
copy_link = Copy
|
||||||
copy_link_success = Link has been copied
|
copy_link_success = Link has been copied
|
||||||
copy_link_error = Use ⌘C or Ctrl-C to copy
|
copy_link_error = Use ⌘C or Ctrl-C to copy
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
</div>
|
</div>
|
||||||
{{if and (not .IsBare) ($.Permission.CanRead $.UnitTypeCode)}}
|
{{if and (not .IsBare) ($.Permission.CanRead $.UnitTypeCode)}}
|
||||||
<div class="ui compact labeled button" tabindex="0">
|
<div class="ui compact labeled button" tabindex="0">
|
||||||
<a class="ui compact button {{if not $.CanSignedUserFork}}poping up{{end}}" {{if $.CanSignedUserFork}}href="{{AppSubUrl}}/repo/fork/{{.ID}}"{{else if $.IsSigned}} data-content="{{$.i18n.Tr "repo.fork_from_self"}}" data-position="top center" data-variation="tiny"{{end}}>
|
<a class="ui compact button {{if or (not $.IsSigned) (not $.CanSignedUserFork)}}poping up{{end}}" {{if $.CanSignedUserFork}}href="{{AppSubUrl}}/repo/fork/{{.ID}}"{{else if $.IsSigned}} data-content="{{$.i18n.Tr "repo.fork_from_self"}}" {{ else }} data-content="{{$.i18n.Tr "repo.fork_guest_user" }}" href="{{AppSubUrl}}/user/login?redirect_to={{AppSubUrl}}/repo/fork/{{.ID}}" {{end}} data-position="top center" data-variation="tiny">
|
||||||
<i class="octicon octicon-repo-forked"></i>{{$.i18n.Tr "repo.fork"}}
|
<i class="octicon octicon-repo-forked"></i>{{$.i18n.Tr "repo.fork"}}
|
||||||
</a>
|
</a>
|
||||||
<a class="ui basic label" href="{{.Link}}/forks">
|
<a class="ui basic label" href="{{.Link}}/forks">
|
||||||
|
|
Loading…
Reference in New Issue