summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/header.tmpl2
-rw-r--r--templates/repo/pulls/fork.tmpl20
2 files changed, 11 insertions, 11 deletions
diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl
index 6baacd537b..ee6fcb388d 100644
--- a/templates/repo/header.tmpl
+++ b/templates/repo/header.tmpl
@@ -32,7 +32,7 @@
</div>
{{if .CanBeForked}}
<div class="ui compact labeled button" tabindex="0">
- <a class="ui compact button {{if eq .OwnerID $.SignedUserID}}poping up{{end}}" {{if not (eq .OwnerID $.SignedUserID)}}href="{{AppSubUrl}}/repo/fork/{{.ID}}"{{else}} data-content="{{$.i18n.Tr "repo.fork_from_self"}}" data-position="top center" data-variation="tiny"{{end}}>
+ <a class="ui compact button {{if not $.CanSignedUserFork}}poping up{{end}}" {{if $.CanSignedUserFork}}href="{{AppSubUrl}}/repo/fork/{{.ID}}"{{else}} data-content="{{$.i18n.Tr "repo.fork_from_self"}}" data-position="top center" data-variation="tiny"{{end}}>
<i class="octicon octicon-repo-forked"></i>{{$.i18n.Tr "repo.fork"}}
</a>
<a class="ui basic label" href="{{.Link}}/forks">
diff --git a/templates/repo/pulls/fork.tmpl b/templates/repo/pulls/fork.tmpl
index 133cc92f7c..e9fbfdf2b6 100644
--- a/templates/repo/pulls/fork.tmpl
+++ b/templates/repo/pulls/fork.tmpl
@@ -19,17 +19,17 @@
</span>
<i class="dropdown icon"></i>
<div class="menu">
- <div class="item" data-value="{{.SignedUser.ID}}">
- <img class="ui mini image" src="{{.SignedUser.RelAvatarLink}}">
- {{.SignedUser.ShortName 20}}
- </div>
+ {{if .CanForkToUser}}
+ <div class="item" data-value="{{.SignedUser.ID}}">
+ <img class="ui mini image" src="{{.SignedUser.RelAvatarLink}}">
+ {{.SignedUser.ShortName 20}}
+ </div>
+ {{end}}
{{range .Orgs}}
- {{if and (.IsOwnedBy $.SignedUser.ID) (ne .ID $.ForkFromOwnerID)}}
- <div class="item" data-value="{{.ID}}">
- <img class="ui mini image" src="{{.RelAvatarLink}}">
- {{.ShortName 20}}
- </div>
- {{end}}
+ <div class="item" data-value="{{.ID}}">
+ <img class="ui mini image" src="{{.RelAvatarLink}}">
+ {{.ShortName 20}}
+ </div>
{{end}}
</div>
</div>