aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo/issue
diff options
context:
space:
mode:
authorMario Lubenka <mario.lubenka@googlemail.com>2019-04-20 22:50:34 +0200
committerLauris BH <lauris@nix.lv>2019-04-20 23:50:34 +0300
commitbc861347597a88ed476ec0124c4c4baf773255c3 (patch)
tree9ca8108e4d9b9c1c5f3d6b911b91ab38d9fa01b9 /templates/repo/issue
parentb1bb700665bdd801e9daac9c2a6013b551aeacec (diff)
downloadgitea-bc861347597a88ed476ec0124c4c4baf773255c3.tar.gz
gitea-bc861347597a88ed476ec0124c4c4baf773255c3.zip
Show "delete branch" button on closed pull requests (#6570) (#6601)
* Show button to delete a pull request branch after a pull request has been closed (#6570) Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Update routers/repo/pull.go Co-Authored-By: saitho <mario.lubenka@googlemail.com>
Diffstat (limited to 'templates/repo/issue')
-rw-r--r--templates/repo/issue/view_content/pull.tmpl12
1 files changed, 11 insertions, 1 deletions
diff --git a/templates/repo/issue/view_content/pull.tmpl b/templates/repo/issue/view_content/pull.tmpl
index 0ddb2820fc..73c4179080 100644
--- a/templates/repo/issue/view_content/pull.tmpl
+++ b/templates/repo/issue/view_content/pull.tmpl
@@ -58,8 +58,18 @@
{{end}}
{{else if .Issue.IsClosed}}
<div class="item text grey">
- {{$.i18n.Tr "repo.pulls.reopen_to_merge"}}
+ {{if .IsPullRequestBroken}}
+ {{$.i18n.Tr "repo.pulls.cant_reopen_deleted_branch"}}
+ {{else}}
+ {{$.i18n.Tr "repo.pulls.reopen_to_merge"}}
+ {{end}}
</div>
+ {{if .IsPullBranchDeletable}}
+ <div class="ui divider"></div>
+ <div>
+ <a class="delete-button ui red button" href="" data-url="{{.DeleteBranchLink}}">{{$.i18n.Tr "repo.branch.delete" .HeadTarget}}</a>
+ </div>
+ {{end}}
{{else if .IsPullFilesConflicted}}
<div class="item text grey">
<span class="octicon octicon-x"></span>