diff options
author | Lanre Adelowo <adelowomailbox@gmail.com> | 2019-01-30 18:20:40 +0100 |
---|---|---|
committer | techknowlogick <matti@mdranta.net> | 2019-01-30 12:20:40 -0500 |
commit | 57a69ef277546414893a38feb70412aa4c32330e (patch) | |
tree | d20a4d5e787054600b0d21dee2a9e554b0007c32 /templates/repo/home.tmpl | |
parent | 6dc2f401c9d4d07ca672d4f3a304799e70364f1b (diff) | |
download | gitea-57a69ef277546414893a38feb70412aa4c32330e.tar.gz gitea-57a69ef277546414893a38feb70412aa4c32330e.zip |
don't allow pull requests to be created on an archived repository (#5883)
* don't allow pull requests to be created on an archived repository
Also disable the "PR" button if the repo is archived
* Refuse creating an issue/PR via API calls too
Diffstat (limited to 'templates/repo/home.tmpl')
-rw-r--r-- | templates/repo/home.tmpl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl index 735f6c00b9..d7161153cb 100644 --- a/templates/repo/home.tmpl +++ b/templates/repo/home.tmpl @@ -57,7 +57,7 @@ {{end}} {{template "repo/sub_menu" .}} <div class="ui stackable secondary menu mobile--margin-between-items mobile--no-negative-margins"> - {{if and .PullRequestCtx.Allowed .IsViewBranch}} + {{if and .PullRequestCtx.Allowed .IsViewBranch (not .Repository.IsArchived)}} <div class="fitted item"> <a href="{{.BaseRepo.Link}}/compare/{{.BaseRepo.DefaultBranch | EscapePound}}...{{ if .Repository.IsFork }}{{.Repository.Owner.Name}}{{ else }}{{ .SignedUserName }}{{ end }}:{{.BranchName | EscapePound}}"> <button class="ui green tiny compact button"><i class="octicon octicon-git-compare"></i></button> |