File tree 3 files changed +14
-18
lines changed
3 files changed +14
-18
lines changed Original file line number Diff line number Diff line change @@ -1069,7 +1069,7 @@ func registerRoutes(m *web.Router) {
1069
1069
m .Combo ("/edit" ).Get (repo_setting .SettingsProtectedBranch ).
1070
1070
Post (web .Bind (forms.ProtectBranchForm {}), context .RepoMustNotBeArchived (), repo_setting .SettingsProtectedBranchPost )
1071
1071
m .Post ("/{id}/delete" , repo_setting .DeleteProtectedBranchRulePost )
1072
- }, repo . MustBeNotEmpty )
1072
+ })
1073
1073
1074
1074
m .Group ("/tags" , func () {
1075
1075
m .Get ("" , repo_setting .ProtectedTags )
Original file line number Diff line number Diff line change 15
15
<form class="tw-flex" action="{{.Link}}" method="post">
16
16
{{.CsrfTokenHtml}}
17
17
<input type="hidden" name="action" value="default_branch">
18
- {{if not .Repository.IsEmpty}}
19
- <div class="ui dropdown selection search tw-flex-1 tw-mr-2 tw-max-w-96">
20
- {{svg "octicon-triangle-down" 14 "dropdown icon"}}
21
- <input type="hidden" name="branch" value="{{.Repository.DefaultBranch}}">
22
- <div class="default text">{{.Repository.DefaultBranch}}</div>
23
- <div class="menu">
24
- {{range .Branches}}
25
- <div class="item" data-value="{{.}}">{{.}}</div>
26
- {{end}}
27
- </div>
18
+ <div class="ui dropdown selection search tw-flex-1 tw-mr-2 tw-max-w-96">
19
+ {{svg "octicon-triangle-down" 14 "dropdown icon"}}
20
+ <input type="hidden" name="branch" value="{{.Repository.DefaultBranch}}">
21
+ <div class="default text">{{.Repository.DefaultBranch}}</div>
22
+ <div class="menu">
23
+ {{range .Branches}}
24
+ <div class="item" data-value="{{.}}">{{.}}</div>
25
+ {{end}}
28
26
</div>
29
- <button class="ui primary button">{{ctx.Locale.Tr "repo.settings.branches.update_default_branch"}}</button >
30
- {{ end}}
27
+ </div >
28
+ <button class="ui primary button"{{if .Repository.IsEmpty}} disabled{{ end}}>{{ctx.Locale.Tr "repo.settings.branches.update_default_branch"}}</button>
31
29
</form>
32
30
</div>
33
31
Original file line number Diff line number Diff line change 13
13
</a>
14
14
{{end}}
15
15
{{if .Repository.UnitEnabled $.Context ctx.Consts.RepoUnitTypeCode}}
16
- {{if not .Repository.IsEmpty}}
17
- <a class="{{if .PageIsSettingsBranches}}active {{end}}item" href="{{.RepoLink}}/settings/branches">
18
- {{ctx.Locale.Tr "repo.settings.branches"}}
19
- </a>
20
- {{end}}
16
+ <a class="{{if .PageIsSettingsBranches}}active {{end}}item" href="{{.RepoLink}}/settings/branches">
17
+ {{ctx.Locale.Tr "repo.settings.branches"}}
18
+ </a>
21
19
<a class="{{if .PageIsSettingsTags}}active {{end}}item" href="{{.RepoLink}}/settings/tags">
22
20
{{ctx.Locale.Tr "repo.settings.tags"}}
23
21
</a>
You can’t perform that action at this time.
0 commit comments