File tree Expand file tree Collapse file tree 2 files changed +16
-7
lines changed Expand file tree Collapse file tree 2 files changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -261,9 +261,14 @@ func Contexter() macaron.Handler {
261261 log .Debug ("Session ID: %s" , sess .ID ())
262262 log .Debug ("CSRF Token: %v" , ctx .Data ["CsrfToken" ])
263263
264+ ctx .Data ["IsLandingPageHome" ] = setting .LandingPageURL == setting .LandingPageHome
265+ ctx .Data ["IsLandingPageExplore" ] = setting .LandingPageURL == setting .LandingPageExplore
266+ ctx .Data ["IsLandingPageOrganizations" ] = setting .LandingPageURL == setting .LandingPageOrganizations
267+
264268 ctx .Data ["ShowRegistrationButton" ] = setting .Service .ShowRegistrationButton
265269 ctx .Data ["ShowFooterBranding" ] = setting .ShowFooterBranding
266270 ctx .Data ["ShowFooterVersion" ] = setting .ShowFooterVersion
271+
267272 ctx .Data ["EnableSwagger" ] = setting .API .EnableSwagger
268273 ctx .Data ["EnableOpenIDSignIn" ] = setting .Service .EnableOpenIDSignIn
269274
Original file line number Diff line number Diff line change 153153 </div>
154154
155155 {{if .IsSigned}}
156- <a class="item{{if .PageIsDashboard}} active{{end}}" href="{{AppSubUrl}}/">{{.i18n.Tr "dashboard"}}</a>
157- <a class="item{{if .PageIsIssues}} active{{end}}" href="{{AppSubUrl}}/issues">{{.i18n.Tr "issues"}}</a>
158- <a class="item{{if .PageIsPulls}} active{{end}}" href="{{AppSubUrl}}/pulls">{{.i18n.Tr "pull_requests"}}</a>
159- {{else}}
160- <a class="item{{if .PageIsHome}} active{{end}}" href="{{AppSubUrl}}/">{{.i18n.Tr "home"}}</a>
156+ <a class="item {{if .PageIsDashboard}}active{{end}}" href="{{AppSubUrl}}/">{{.i18n.Tr "dashboard"}}</a>
157+ <a class="item {{if .PageIsIssues}}active{{end}}" href="{{AppSubUrl}}/issues">{{.i18n.Tr "issues"}}</a>
158+ <a class="item {{if .PageIsPulls}}active{{end}}" href="{{AppSubUrl}}/pulls">{{.i18n.Tr "pull_requests"}}</a>
159+ <a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "explore"}}</a>
160+ {{else if .IsLandingPageHome}}
161+ <a class="item {{if .PageIsHome}}active{{end}}" href="{{AppSubUrl}}/">{{.i18n.Tr "home"}}</a>
162+ <a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "explore"}}</a>
163+ {{else if .IsLandingPageExplore}}
164+ <a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "home"}}</a>
165+ {{else if .IsLandingPageOrganizations}}
166+ <a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/organizations">{{.i18n.Tr "home"}}</a>
161167 {{end}}
162168
163- <a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "explore"}}</a>
164-
165169 {{template "custom/extra_links" .}}
166170
167171 {{/*
You can’t perform that action at this time.
0 commit comments