Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/release/v1.17' into release/dc…
Browse files Browse the repository at this point in the history
…s/v1.17
  • Loading branch information
richmahn committed Oct 27, 2022
2 parents d01c71a + b0a057f commit 353f2c3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion modules/timeutil/timestamp.go
Expand Up @@ -103,5 +103,5 @@ func (ts TimeStamp) FormatDate() string {

// IsZero is zero time
func (ts TimeStamp) IsZero() bool {
return ts.AsTimeInLocation(time.Local).IsZero()
return int64(ts) == 0
}
2 changes: 2 additions & 0 deletions routers/web/web.go
Expand Up @@ -567,6 +567,8 @@ func RegisterRoutes(m *web.Route) {
m.Post("/delete", admin.DeleteNotices)
m.Post("/empty", admin.EmptyNotices)
})
}, func(ctx *context.Context) {
ctx.Data["EnablePackages"] = setting.Packages.Enabled
}, adminReq)
// ***** END: Admin *****

Expand Down
8 changes: 5 additions & 3 deletions templates/admin/navbar.tmpl
Expand Up @@ -12,9 +12,11 @@
<a class="{{if .PageIsAdminRepositories}}active{{end}} item" href="{{AppSubUrl}}/admin/repos">
{{.i18n.Tr "admin.repositories"}}
</a>
<a class="{{if .PageIsAdminPackages}}active{{end}} item" href="{{AppSubUrl}}/admin/packages">
{{.i18n.Tr "packages.title"}}
</a>
{{if .EnablePackages}}
<a class="{{if .PageIsAdminPackages}}active{{end}} item" href="{{AppSubUrl}}/admin/packages">
{{.i18n.Tr "packages.title"}}
</a>
{{end}}
{{if not DisableWebhooks}}
<a class="{{if or .PageIsAdminDefaultHooks .PageIsAdminSystemHooks}}active{{end}} item" href="{{AppSubUrl}}/admin/hooks">
{{.i18n.Tr "admin.hooks"}}
Expand Down

0 comments on commit 353f2c3

Please sign in to comment.