Commit to merge latest code

This commit is contained in:
Brian Buller 2017-10-03 09:01:32 -05:00
parent f57d917297
commit 465db26f7e
4 changed files with 24 additions and 0 deletions

20
admin_archive.go Normal file
View File

@ -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)
}
}

View File

@ -47,6 +47,8 @@ func handleAdmin(w http.ResponseWriter, req *http.Request) {
handleAdminSetMode(w, req, page) handleAdminSetMode(w, req, page)
case "authmode": case "authmode":
handleAdminSetAuthMode(w, req, page) handleAdminSetAuthMode(w, req, page)
case "archive":
handleAdminArchive(w, req, page)
default: default:
page.TemplateData = getCondorcetResult() page.TemplateData = getCondorcetResult()
page.show("admin-main.html", w) page.show("admin-main.html", w)

View File

@ -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{"Teams", "/admin/teams", "fa-users"})
p.Menu = append(p.Menu, menuItem{"Games", "/admin/games", "fa-gamepad"}) 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{"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.Menu = append(p.Menu, menuItem{"Clients", "/admin/clients", "fa-desktop"})
p.BottomMenu = append(p.BottomMenu, menuItem{"Users", "/admin/users", "fa-user"}) p.BottomMenu = append(p.BottomMenu, menuItem{"Users", "/admin/users", "fa-user"})

View File

@ -6,6 +6,7 @@ import (
"github.com/br0xen/boltease" "github.com/br0xen/boltease"
) )
// Gamejam is specifically for an archived game jam
type Gamejam struct { type Gamejam struct {
UUID string UUID string
Name string Name string