diff --git a/pages/admin/registrations.go b/pages/admin/registrations.go index a18e1088..7fdf1623 100644 --- a/pages/admin/registrations.go +++ b/pages/admin/registrations.go @@ -23,6 +23,7 @@ func UserRegistrations(ctx *aero.Context) string { return ctx.Error(http.StatusUnauthorized, "Not authorized", nil) } + total := 0 yearInfo := map[int]utils.YearRegistrations{} years := []int{} @@ -44,6 +45,8 @@ func UserRegistrations(ctx *aero.Context) string { yearRegistrations.Months[int(registered.Month())]++ yearInfo[year] = yearRegistrations + + total++ } for year := range yearInfo { @@ -52,5 +55,5 @@ func UserRegistrations(ctx *aero.Context) string { sort.Ints(years) - return ctx.HTML(components.UserRegistrations(years, yearInfo)) + return ctx.HTML(components.UserRegistrations(total, years, yearInfo)) } diff --git a/pages/admin/registrations.pixy b/pages/admin/registrations.pixy index 71541666..1c89e111 100644 --- a/pages/admin/registrations.pixy +++ b/pages/admin/registrations.pixy @@ -1,6 +1,6 @@ -component UserRegistrations(years []int, yearInfo map[int]utils.YearRegistrations) +component UserRegistrations(total int, years []int, yearInfo map[int]utils.YearRegistrations) AdminTabs - h1.page-title User registrations + h1.mountable= fmt.Sprintf("User registrations (%d)", total) for _, year := range years h3.mountable= year