summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorBwko <bouwko@gmail.com>2016-12-25 17:19:25 +0100
committerKim "BKC" Carlbäcker <kim.carlbacker@gmail.com>2016-12-26 11:55:28 +0100
commit71dee6b7c09242707028cdfe23373a1f88d6a663 (patch)
treec5d424d2f68880728baca8a211899ff662f6f2b8 /templates
parent71634452e17a6c954e5612f861780effe7528992 (diff)
downloadgitea-71dee6b7c09242707028cdfe23373a1f88d6a663.tar.gz
gitea-71dee6b7c09242707028cdfe23373a1f88d6a663.zip
Improve the way how branches are deleted
Delete branch from HeadRepo instead of BaseRepo Prevent the deletion of a master branch Show a yes/no overlay when you press the delete branch button
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/issue/view_content.tmpl18
1 files changed, 14 insertions, 4 deletions
diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl
index 1cb69fe110..8c1f266f1c 100644
--- a/templates/repo/issue/view_content.tmpl
+++ b/templates/repo/issue/view_content.tmpl
@@ -166,10 +166,7 @@
{{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>
+ <a class="delete-button ui red button" href="" data-url="{{.DeleteBranchLink}}">{{$.i18n.Tr "repo.branch.delete" .HeadTarget}}</a>
</div>
{{end}}
{{else if .Issue.IsClosed}}
@@ -380,3 +377,16 @@
<div class="hide" id="no-content">
<span class="no-content">{{.i18n.Tr "repo.issues.no_content"}}</span>
</div>
+
+<div class="ui small basic delete modal">
+ <div class="ui icon header">
+ <i class="trash icon"></i>
+ {{.i18n.Tr "repo.branch.delete" .HeadTarget | Safe}}
+ </div>
+ <div class="content">
+ <p>{{.i18n.Tr "repo.branch.delete_desc" | Safe}}</p>
+ {{.i18n.Tr "repo.branch.delete_notices_1" | Safe}}<br>
+ {{.i18n.Tr "repo.branch.delete_notices_2" .HeadTarget | Safe}}<br>
+ </div>
+ {{template "base/delete_modal_actions" .}}
+</div> \ No newline at end of file