diff options
author | Lanre Adelowo <adelowomailbox@gmail.com> | 2019-01-11 05:25:14 +0100 |
---|---|---|
committer | techknowlogick <hello@techknowlogick.com> | 2019-01-10 23:25:14 -0500 |
commit | abb364f4427bc84b78e969f005fb5b4338b7d589 (patch) | |
tree | 0989416aa30bd3b8d2ed0c94fdb7b0d51af85fe7 /templates/repo/header.tmpl | |
parent | 6630a33ec18c61d81b538e78ac48d42af36e0ce5 (diff) | |
download | gitea-abb364f4427bc84b78e969f005fb5b4338b7d589.tar.gz gitea-abb364f4427bc84b78e969f005fb5b4338b7d589.zip |
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)
Diffstat (limited to 'templates/repo/header.tmpl')
-rw-r--r-- | templates/repo/header.tmpl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl index c8ef4bced7..b0ea694ff9 100644 --- a/templates/repo/header.tmpl +++ b/templates/repo/header.tmpl @@ -32,7 +32,7 @@ </div> {{if and (not .IsBare) ($.Permission.CanRead $.UnitTypeCode)}} <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"}} </a> <a class="ui basic label" href="{{.Link}}/forks"> |