aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2016-12-25 23:27:25 +0800
committerGitHub <noreply@github.com>2016-12-25 23:27:25 +0800
commit4b7594d9fa0da67cbc8df74ee1711043168ebbbd (patch)
treeeed4cbedb522844a93645cc8e0d48d904b694ad1 /templates
parentd4924d45d6d4e991240d207a834d8d6709781449 (diff)
downloadgitea-4b7594d9fa0da67cbc8df74ee1711043168ebbbd.tar.gz
gitea-4b7594d9fa0da67cbc8df74ee1711043168ebbbd.zip
Provide button to delete merged pull request (#441)
* provide button to delete merged pull request * golint fix
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/issue/view_content.tmpl11
1 files changed, 10 insertions, 1 deletions
diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl
index bbb8f4f984..1cb69fe110 100644
--- a/templates/repo/issue/view_content.tmpl
+++ b/templates/repo/issue/view_content.tmpl
@@ -163,6 +163,15 @@
<div class="item text purple">
{{$.i18n.Tr "repo.pulls.has_merged"}}
</div>
+ {{if .IsPullBranchDeletable}}
+ <div class="ui divider"></div>
+ <div>
+ <form class="ui form" action="{{.DeleteBranchLink}}" method="post">
+ {{.CsrfTokenHtml}}
+ <button class="ui red button">{{$.i18n.Tr "repo.pulls.delete_branch"}}</button>
+ </form>
+ </div>
+ {{end}}
{{else if .Issue.IsClosed}}
<div class="item text grey">
{{$.i18n.Tr "repo.pulls.reopen_to_merge"}}
@@ -265,7 +274,7 @@
<div class="item">
<a class="ui label {{if not .IsChecked}}hide{{end}}" id="label_{{.ID}}" href="{{$.RepoLink}}/issues?labels={{.ID}}" style="color: {{.ForegroundColor}}; background-color: {{.Color}}">{{.Name}}</a>
</div>
-
+
{{end}}
</div>