From 533f8241c2fdd3b431d9698fdd4440369cd2178d Mon Sep 17 00:00:00 2001 From: Las Zenow Date: Wed, 19 Feb 2014 11:59:16 +0100 Subject: [PATCH] Add dashboard --- template.go | 26 ++++++++++++++------------ templates/dashboard.html | 18 ++++++++++++++++++ templates/header.html | 3 ++- trantor.go | 1 + user.go | 19 ++++++++++++++++--- 5 files changed, 51 insertions(+), 16 deletions(-) create mode 100644 templates/dashboard.html diff --git a/template.go b/template.go index 87c51c1..9dbb410 100644 --- a/template.go +++ b/template.go @@ -8,18 +8,19 @@ import ( import txt_tmpl "text/template" type Status struct { - BaseURL string - FullURL string - Search string - User string - IsAdmin bool - Notif []Notification - Home bool - About bool - News bool - Upload bool - Stats bool - Help bool + BaseURL string + FullURL string + Search string + User string + IsAdmin bool + Notif []Notification + Home bool + About bool + News bool + Upload bool + Stats bool + Help bool + Dasboard bool } func GetStatus(h handler) Status { @@ -47,6 +48,7 @@ var templates = template.Must(template.ParseFiles(TEMPLATE_PATH+"header.html", TEMPLATE_PATH+"new.html", TEMPLATE_PATH+"read.html", TEMPLATE_PATH+"edit.html", + TEMPLATE_PATH+"dashboard.html", TEMPLATE_PATH+"settings.html", TEMPLATE_PATH+"stats.html", TEMPLATE_PATH+"help.html", diff --git a/templates/dashboard.html b/templates/dashboard.html new file mode 100644 index 0000000..2950def --- /dev/null +++ b/templates/dashboard.html @@ -0,0 +1,18 @@ +{{template "header.html" .S}} + +

Dashboard

+ +
+ +
+ +{{template "footer.html"}} diff --git a/templates/header.html b/templates/header.html index 1fbe133..ab0c4c3 100644 --- a/templates/header.html +++ b/templates/header.html @@ -63,10 +63,11 @@
  • {{if .User}}