diff options
author | Jimmy Praet <jimmy.praet@ksz-bcss.fgov.be> | 2020-12-09 02:58:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-08 20:58:38 -0500 |
commit | 10b9a6df0d09b9865f7bd705b70b414d07d3f320 (patch) | |
tree | d71b5c8ad41f35bb2cd7bf3414c7f5436d5cbb33 /templates | |
parent | c05701dd7d72aea75c67fbb07df928c192474686 (diff) | |
download | gitea-10b9a6df0d09b9865f7bd705b70b414d07d3f320.tar.gz gitea-10b9a6df0d09b9865f7bd705b70b414d07d3f320.zip |
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>
Diffstat (limited to 'templates')
-rw-r--r-- | templates/user/dashboard/navbar.tmpl | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/templates/user/dashboard/navbar.tmpl b/templates/user/dashboard/navbar.tmpl index d80ac2e88a..25670f470b 100644 --- a/templates/user/dashboard/navbar.tmpl +++ b/templates/user/dashboard/navbar.tmpl @@ -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}}'> |