From 4e703e03ce4f6679b4c314be7d561852ac4c144c Mon Sep 17 00:00:00 2001 From: Las Zenow Date: Sat, 1 Jun 2013 04:30:52 +0200 Subject: [PATCH] Add the statistics on the menu --- stats.go | 1 + template.go | 1 + templates/header.html | 1 + 3 files changed, 3 insertions(+) diff --git a/stats.go b/stats.go index d9f8de6..ff14419 100644 --- a/stats.go +++ b/stats.go @@ -47,6 +47,7 @@ func statsWorker() { func statsHandler(w http.ResponseWriter, r *http.Request, sess *Session) { var data statsData data.S = GetStatus(w, r) + data.S.Stats = true data.Hourly = getHourlyVisits() data.Daily = getDailyVisits() data.Monthly = getMonthlyVisits() diff --git a/template.go b/template.go index 7b8c3b8..1e13776 100644 --- a/template.go +++ b/template.go @@ -12,6 +12,7 @@ type Status struct { Home bool About bool Upload bool + Stats bool } func GetStatus(w http.ResponseWriter, r *http.Request) Status { diff --git a/templates/header.html b/templates/header.html index 45ecd3e..eaab6bb 100644 --- a/templates/header.html +++ b/templates/header.html @@ -53,6 +53,7 @@
  • Home
  • About
  • Upload your epub
  • +
  • Statistics