Don't show dashboard links for globally disabled repo units (#13908)
This applias the same checks from base/head_navbar.tmpl to user/dashboard/navbar.tmpl so no links are shown for globally disabled repo units Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
		
							parent
							
								
									c05701dd7d
								
							
						
					
					
						commit
						10b9a6df0d
					
				
					 1 changed files with 8 additions and 4 deletions
				
			
		|  | @ -46,16 +46,20 @@ | ||||||
| 				<a class="{{if .PageIsNews}}active{{end}} item" style="margin-left: auto" href="{{AppSubUrl}}/org/{{.ContextUser.Name}}/dashboard"> | 				<a class="{{if .PageIsNews}}active{{end}} item" style="margin-left: auto" href="{{AppSubUrl}}/org/{{.ContextUser.Name}}/dashboard"> | ||||||
| 					{{svg "octicon-rss"}} {{.i18n.Tr "activities"}} | 					{{svg "octicon-rss"}} {{.i18n.Tr "activities"}} | ||||||
| 				</a> | 				</a> | ||||||
|  | 				{{if not .UnitIssuesGlobalDisabled}} | ||||||
| 				<a class="{{if .PageIsIssues}}active{{end}} item" href="{{AppSubUrl}}/org/{{.ContextUser.Name}}/issues"> | 				<a class="{{if .PageIsIssues}}active{{end}} item" href="{{AppSubUrl}}/org/{{.ContextUser.Name}}/issues"> | ||||||
| 					{{svg "octicon-issue-opened"}} {{.i18n.Tr "issues"}} | 					{{svg "octicon-issue-opened"}} {{.i18n.Tr "issues"}} | ||||||
| 				</a> | 				</a> | ||||||
|  | 				{{end}} | ||||||
|  | 				{{if not .UnitPullsGlobalDisabled}} | ||||||
| 				<a class="{{if .PageIsPulls}}active{{end}} item" href="{{AppSubUrl}}/org/{{.ContextUser.Name}}/pulls"> | 				<a class="{{if .PageIsPulls}}active{{end}} item" href="{{AppSubUrl}}/org/{{.ContextUser.Name}}/pulls"> | ||||||
| 					{{svg "octicon-git-pull-request"}} {{.i18n.Tr "pull_requests"}} | 					{{svg "octicon-git-pull-request"}} {{.i18n.Tr "pull_requests"}} | ||||||
| 				</a> | 				</a> | ||||||
| 				{{if .ShowMilestonesDashboardPage}} | 				{{end}} | ||||||
| 					<a class="{{if .PageIsMilestonesDashboard}}active{{end}} item" href="{{AppSubUrl}}/org/{{.ContextUser.Name}}/milestones"> | 				{{if and .ShowMilestonesDashboardPage (not (and .UnitIssuesGlobalDisabled .UnitPullsGlobalDisabled))}} | ||||||
| 						{{svg "octicon-milestone"}} {{.i18n.Tr "milestones"}} | 				<a class="{{if .PageIsMilestonesDashboard}}active{{end}} item" href="{{AppSubUrl}}/org/{{.ContextUser.Name}}/milestones"> | ||||||
| 					</a> | 					{{svg "octicon-milestone"}} {{.i18n.Tr "milestones"}} | ||||||
|  | 				</a> | ||||||
| 				{{end}} | 				{{end}} | ||||||
| 				<div class="item"> | 				<div class="item"> | ||||||
| 					<a class="ui blue basic button" href="{{.ContextUser.HomeLink}}" title='{{.i18n.Tr "home.view_home" .ContextUser.Name}}'> | 					<a class="ui blue basic button" href="{{.ContextUser.HomeLink}}" title='{{.i18n.Tr "home.view_home" .ContextUser.Name}}'> | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue