Page is done
This commit is contained in:
+6
-4
@@ -11,10 +11,11 @@ import (
|
||||
// Base is the basic information used to render the page
|
||||
type Base struct {
|
||||
User struct {
|
||||
ID string
|
||||
Name string
|
||||
Role string
|
||||
LoggedIn bool
|
||||
ID string
|
||||
Name string
|
||||
Role string
|
||||
LoggedIn bool
|
||||
SessionID string
|
||||
}
|
||||
ViewTitle string
|
||||
}
|
||||
@@ -28,6 +29,7 @@ func (base *Base) setupBase(user *auth.User, viewTitle string) {
|
||||
base.User.Name = user.ID
|
||||
base.User.Role = user.Data["role"]
|
||||
base.User.LoggedIn = true
|
||||
base.User.SessionID = user.Session.ID
|
||||
}
|
||||
|
||||
base.ViewTitle = fmt.Sprintf("%s - %s", viewTitle, server.Main.Config.View.Title)
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
type PageView struct {
|
||||
Base
|
||||
Page model.Page
|
||||
Page *model.Page
|
||||
}
|
||||
|
||||
func (pv *PageView) Setup(user *auth.User) {
|
||||
|
||||
Reference in New Issue
Block a user