Lots of changes around viewing tickets from css perspective logic changes nwe handlers and service triggers... just lots of stuff...
This commit is contained in:
@@ -4,6 +4,8 @@ import (
|
||||
"html/template"
|
||||
"net/http"
|
||||
"synlotto-website/models"
|
||||
|
||||
"github.com/gorilla/csrf"
|
||||
)
|
||||
|
||||
func TemplateFuncs() template.FuncMap {
|
||||
@@ -29,6 +31,7 @@ func TemplateFuncs() template.FuncMap {
|
||||
}
|
||||
return *p
|
||||
},
|
||||
"inSlice": InSlice,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +57,17 @@ func TemplateContext(w http.ResponseWriter, r *http.Request) map[string]interfac
|
||||
}
|
||||
|
||||
return map[string]interface{}{
|
||||
"Flash": flash,
|
||||
"User": currentUser,
|
||||
"CSRFField": csrf.TemplateField(r),
|
||||
"Flash": flash,
|
||||
"User": currentUser,
|
||||
}
|
||||
}
|
||||
|
||||
func InSlice(n int, list []int) bool {
|
||||
for _, v := range list {
|
||||
if v == n {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user