diff options
author | Unknwon <u@gogs.io> | 2015-09-01 11:57:02 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-09-01 11:57:02 -0400 |
commit | 670ade9a6178c699c04c08595b1cc8fb4c3b0863 (patch) | |
tree | 285c965e16ce0d3c89559aef5e66ea3368b749c6 /templates | |
parent | 398569f6f8c9636a7497a250f02e9c6b0a27ea9a (diff) | |
download | gitea-670ade9a6178c699c04c08595b1cc8fb4c3b0863.tar.gz gitea-670ade9a6178c699c04c08595b1cc8fb4c3b0863.zip |
#1206 does not allow fork bare repo
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/header.tmpl | 4 | ||||
-rw-r--r-- | templates/repo/header_old.tmpl | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl index 74e04d0988..141c5514cf 100644 --- a/templates/repo/header.tmpl +++ b/templates/repo/header.tmpl @@ -2,13 +2,15 @@ <div class="ui container"><!-- start container --> <div class="ui vertically padded grid head"><!-- start grid --> <div class="column"><!-- start column --> + {{if not .IsBare}} <div class="ui black small compact menu floated right count labelled"> - <a class="item{{if $.IsRepositoryOwner}} poping up{{end}}"{{if not $.IsRepositoryOwner}} href="{{AppSubUrl}}/repo/fork/{{.ID}}"{{else}} data-content="{{$.i18n.Tr "repo.fork_from_self"}}" data-position="top center" data-variation="tiny"{{end}}> + <a class="item{{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}}> <i class="icon octicon octicon-repo-forked"></i> {{$.i18n.Tr "repo.fork"}} </a> <span class="active item num">{{.NumForks}}</span> </div> + {{end}} <div class="ui black small compact menu floated right count labelled"> <a class="item" href="{{$.RepoLink}}/action/{{if $.IsStaringRepo}}un{{end}}star?redirect_to={{$.Link}}"> diff --git a/templates/repo/header_old.tmpl b/templates/repo/header_old.tmpl index ecf9ed3a7f..0537cc0244 100644 --- a/templates/repo/header_old.tmpl +++ b/templates/repo/header_old.tmpl @@ -48,6 +48,7 @@ </button> </a> </li> + {{if not .IsBare}} <li id="repo-header-fork"> <a id="repo-header-fork-btn" {{if or (not $.IsRepositoryAdmin) $.Owner.IsOrganization}}href="{{AppSubUrl}}/repo/fork/{{.ID}}"{{end}}> <button class="btn btn-gray text-bold btn-radius"> @@ -57,6 +58,7 @@ </a> </li> + {{end}} </ul> </div> </div> |