From 465db26f7e3e3c6ff74716c87ae6914aaf7fab40 Mon Sep 17 00:00:00 2001 From: Brian Buller Date: Tue, 3 Oct 2017 09:01:32 -0500 Subject: [PATCH] Commit to merge latest code --- admin_archive.go | 20 ++++++++++++++++++++ admin_endpoints.go | 2 ++ main.go | 1 + model_gamejam.go | 1 + 4 files changed, 24 insertions(+) create mode 100644 admin_archive.go diff --git a/admin_archive.go b/admin_archive.go new file mode 100644 index 0000000..0a49456 --- /dev/null +++ b/admin_archive.go @@ -0,0 +1,20 @@ +package main + +import ( + "net/http" + + "github.com/gorilla/mux" +) + +func handleAdminArchive(w http.ResponseWriter, req *http.Request, page *pageData) { + vars := mux.Vars(req) + page.SubTitle = "GameJam Archive" + id := vars["id"] + if id == "" { + // Archive List + type archivePageData struct { + Gamejams []Gamejam + } + apd := new(archivePageData) + } +} diff --git a/admin_endpoints.go b/admin_endpoints.go index 5bf61a4..286435d 100644 --- a/admin_endpoints.go +++ b/admin_endpoints.go @@ -47,6 +47,8 @@ func handleAdmin(w http.ResponseWriter, req *http.Request) { handleAdminSetMode(w, req, page) case "authmode": handleAdminSetAuthMode(w, req, page) + case "archive": + handleAdminArchive(w, req, page) default: page.TemplateData = getCondorcetResult() page.show("admin-main.html", w) diff --git a/main.go b/main.go index 03badeb..1818716 100644 --- a/main.go +++ b/main.go @@ -273,6 +273,7 @@ func InitPageData(w http.ResponseWriter, req *http.Request) *pageData { p.Menu = append(p.Menu, menuItem{"Teams", "/admin/teams", "fa-users"}) p.Menu = append(p.Menu, menuItem{"Games", "/admin/games", "fa-gamepad"}) p.Menu = append(p.Menu, menuItem{"Votes", "/admin/votes", "fa-sticky-note"}) + p.Menu = append(p.Menu, menuItem{"Archive", "/admin/archive", "fa-archive"}) p.Menu = append(p.Menu, menuItem{"Clients", "/admin/clients", "fa-desktop"}) p.BottomMenu = append(p.BottomMenu, menuItem{"Users", "/admin/users", "fa-user"}) diff --git a/model_gamejam.go b/model_gamejam.go index 45b900f..1c343af 100644 --- a/model_gamejam.go +++ b/model_gamejam.go @@ -6,6 +6,7 @@ import ( "github.com/br0xen/boltease" ) +// Gamejam is specifically for an archived game jam type Gamejam struct { UUID string Name string