summaryrefslogtreecommitdiffstats
path: root/templates/repo/settings/branches.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'templates/repo/settings/branches.tmpl')
-rw-r--r--templates/repo/settings/branches.tmpl37
1 files changed, 21 insertions, 16 deletions
diff --git a/templates/repo/settings/branches.tmpl b/templates/repo/settings/branches.tmpl
index cc8fc60426..ad3b3275e8 100644
--- a/templates/repo/settings/branches.tmpl
+++ b/templates/repo/settings/branches.tmpl
@@ -43,31 +43,24 @@
<h4 class="ui top attached header">
{{.locale.Tr "repo.settings.protected_branch"}}
+ <div class="ui right">
+ <a class="ui primary tiny button" href="{{$.Repository.Link}}/settings/branches/edit">{{$.locale.Tr "repo.settings.branches.add_new_rule"}}</a>
+ </div>
</h4>
<div class="ui attached table segment">
<div class="ui grid padded">
- <div class="eight wide column">
- <div class="ui fluid dropdown selection" tabindex="0">
- {{svg "octicon-triangle-down" 14 "dropdown icon"}}
- <div class="default text">{{.locale.Tr "repo.settings.choose_branch"}}</div>
- <div class="menu transition hidden" tabindex="-1" style="display: block !important;">
- {{range .LeftBranches}}
- <a class="item" href="{{$.Repository.Link}}/settings/branches/{{. | PathEscapeSegments}}">{{.}}</a>
- {{end}}
- </div>
- </div>
- </div>
- </div>
-
- <div class="ui grid padded">
<div class="sixteen wide column">
<table class="ui single line table padded">
<tbody>
{{range .ProtectedBranches}}
<tr>
- <td><div class="ui basic primary label">{{.BranchName}}</div></td>
- <td class="right aligned"><a class="rm ui button" href="{{$.Repository.Link}}/settings/branches/{{.BranchName | PathEscapeSegments}}">{{$.locale.Tr "repo.settings.edit_protected_branch"}}</a></td>
+ <td><div class="ui basic primary label">{{.RuleName}}</div></td>
+ <td class="right aligned">
+ <a class="rm ui button" href="{{$.Repository.Link}}/settings/branches/edit?rule_name={{.RuleName}}">{{$.locale.Tr "repo.settings.edit_protected_branch"}}</a>
+ <button class="ui red tiny button delete-button" data-url="{{$.Repository.Link}}/settings/branches/{{.ID}}/delete" data-id="{{.ID}}">
+ {{$.locale.Tr "repo.settings.protected_branch.delete_rule"}}</button>
+ </td>
</tr>
{{else}}
<tr class="center aligned"><td>{{.locale.Tr "repo.settings.no_protected_branch"}}</td></tr>
@@ -102,4 +95,16 @@
{{end}}
</div>
</div>
+
+<div class="ui small basic delete modal">
+ <div class="ui header">
+ {{svg "octicon-trash" 16 "mr-2"}}
+ {{.locale.Tr "repo.settings.protected_branch_deletion"}}
+ </div>
+ <div class="content">
+ <p>{{.locale.Tr "repo.settings.protected_branch_deletion_desc"}}</p>
+ </div>
+ {{template "base/delete_modal_actions" .}}
+</div>
+
{{template "base/footer" .}}