File tree Expand file tree Collapse file tree 3 files changed +14
-18
lines changed Expand file tree Collapse file tree 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) {
10691069			m .Combo ("/edit" ).Get (repo_setting .SettingsProtectedBranch ).
10701070				Post (web .Bind (forms.ProtectBranchForm {}), context .RepoMustNotBeArchived (), repo_setting .SettingsProtectedBranchPost )
10711071			m .Post ("/{id}/delete" , repo_setting .DeleteProtectedBranchRulePost )
1072- 		},  repo . MustBeNotEmpty )
1072+ 		})
10731073
10741074		m .Group ("/tags" , func () {
10751075			m .Get ("" , repo_setting .ProtectedTags )
Original file line number Diff line number Diff line change 1515				<form class="tw-flex" action="{{.Link}}" method="post">
1616					{{.CsrfTokenHtml}}
1717					<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}}
2826						</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> 
3129				</form>
3230			</div>
3331
Original file line number Diff line number Diff line change 1313			</a>
1414		{{end}}
1515		{{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>
2119			<a class="{{if .PageIsSettingsTags}}active {{end}}item" href="{{.RepoLink}}/settings/tags">
2220				{{ctx.Locale.Tr "repo.settings.tags"}}
2321			</a>
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments