mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	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:
		@@ -46,16 +46,20 @@
 | 
			
		||||
				<a class="{{if .PageIsNews}}active{{end}} item" style="margin-left: auto" href="{{AppSubUrl}}/org/{{.ContextUser.Name}}/dashboard">
 | 
			
		||||
					{{svg "octicon-rss"}} {{.i18n.Tr "activities"}}
 | 
			
		||||
				</a>
 | 
			
		||||
				{{if not .UnitIssuesGlobalDisabled}}
 | 
			
		||||
				<a class="{{if .PageIsIssues}}active{{end}} item" href="{{AppSubUrl}}/org/{{.ContextUser.Name}}/issues">
 | 
			
		||||
					{{svg "octicon-issue-opened"}} {{.i18n.Tr "issues"}}
 | 
			
		||||
				</a>
 | 
			
		||||
				{{end}}
 | 
			
		||||
				{{if not .UnitPullsGlobalDisabled}}
 | 
			
		||||
				<a class="{{if .PageIsPulls}}active{{end}} item" href="{{AppSubUrl}}/org/{{.ContextUser.Name}}/pulls">
 | 
			
		||||
					{{svg "octicon-git-pull-request"}} {{.i18n.Tr "pull_requests"}}
 | 
			
		||||
				</a>
 | 
			
		||||
				{{if .ShowMilestonesDashboardPage}}
 | 
			
		||||
					<a class="{{if .PageIsMilestonesDashboard}}active{{end}} item" href="{{AppSubUrl}}/org/{{.ContextUser.Name}}/milestones">
 | 
			
		||||
						{{svg "octicon-milestone"}} {{.i18n.Tr "milestones"}}
 | 
			
		||||
					</a>
 | 
			
		||||
				{{end}}
 | 
			
		||||
				{{if and .ShowMilestonesDashboardPage (not (and .UnitIssuesGlobalDisabled .UnitPullsGlobalDisabled))}}
 | 
			
		||||
				<a class="{{if .PageIsMilestonesDashboard}}active{{end}} item" href="{{AppSubUrl}}/org/{{.ContextUser.Name}}/milestones">
 | 
			
		||||
					{{svg "octicon-milestone"}} {{.i18n.Tr "milestones"}}
 | 
			
		||||
				</a>
 | 
			
		||||
				{{end}}
 | 
			
		||||
				<div class="item">
 | 
			
		||||
					<a class="ui blue basic button" href="{{.ContextUser.HomeLink}}" title='{{.i18n.Tr "home.view_home" .ContextUser.Name}}'>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user