File tree 2 files changed +16
-7
lines changed
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 {
261
261
log .Debug ("Session ID: %s" , sess .ID ())
262
262
log .Debug ("CSRF Token: %v" , ctx .Data ["CsrfToken" ])
263
263
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
+
264
268
ctx .Data ["ShowRegistrationButton" ] = setting .Service .ShowRegistrationButton
265
269
ctx .Data ["ShowFooterBranding" ] = setting .ShowFooterBranding
266
270
ctx .Data ["ShowFooterVersion" ] = setting .ShowFooterVersion
271
+
267
272
ctx .Data ["EnableSwagger" ] = setting .API .EnableSwagger
268
273
ctx .Data ["EnableOpenIDSignIn" ] = setting .Service .EnableOpenIDSignIn
269
274
Original file line number Diff line number Diff line change 153
153
</div>
154
154
155
155
{{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>
161
167
{{end}}
162
168
163
- <a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "explore"}}</a>
164
-
165
169
{{template "custom/extra_links" .}}
166
170
167
171
{{/*
You can’t perform that action at this time.
0 commit comments