Added the registration logs.
Tweaked the h1 CSS for the Control Panel in Cosora. Improved the support for autocompleters. Reverted some of the int64s back to ints. The per-request user variable should now have the IPs for guests. Removed some obsolete statements. Removed a couple obsolete phrases. Moved a couple more accumulator initializers out of the store initializers. Refactored one of the report statements to use a store instead of a statement. Created the menuhead CSS class. Added the GetOffset method to the LogStore interface and refactored the mod and admin log pages to use it. Changed the labels on the adminlog and modlog pages to make them more understandable. Removed the generated templates from Git. Run the patcher / update script to get the new table.
This commit is contained in:
parent
2be884edc1
commit
ba98b0c952
|
@ -9,21 +9,32 @@ import (
|
|||
var ModLogs LogStore
|
||||
var AdminLogs LogStore
|
||||
|
||||
type LogItem struct {
|
||||
Action string
|
||||
ElementID int
|
||||
ElementType string
|
||||
IPAddress string
|
||||
ActorID int
|
||||
DoneAt string
|
||||
}
|
||||
|
||||
type LogStore interface {
|
||||
Create(action string, elementID int, elementType string, ipaddress string, actorID int) (err error)
|
||||
GlobalCount() int
|
||||
GetOffset(offset int, perPage int) (logs []LogItem, err error)
|
||||
}
|
||||
|
||||
type SQLModLogStore struct {
|
||||
create *sql.Stmt
|
||||
count *sql.Stmt
|
||||
getOffset *sql.Stmt
|
||||
}
|
||||
|
||||
func NewModLogStore() (*SQLModLogStore, error) {
|
||||
acc := qgen.Builder.Accumulator()
|
||||
func NewModLogStore(acc *qgen.Accumulator) (*SQLModLogStore, error) {
|
||||
return &SQLModLogStore{
|
||||
create: acc.Insert("moderation_logs").Columns("action, elementID, elementType, ipaddress, actorID, doneAt").Fields("?,?,?,?,?,UTC_TIMESTAMP()").Prepare(),
|
||||
count: acc.Count("moderation_logs").Prepare(),
|
||||
getOffset: acc.Select("moderation_logs").Columns("action, elementID, elementType, ipaddress, actorID, doneAt").Orderby("doneAt DESC").Limit("?,?").Prepare(),
|
||||
}, acc.FirstError()
|
||||
}
|
||||
|
||||
|
@ -41,16 +52,38 @@ func (store *SQLModLogStore) GlobalCount() (logCount int) {
|
|||
return logCount
|
||||
}
|
||||
|
||||
func buildLogList(rows *sql.Rows) (logs []LogItem, err error) {
|
||||
for rows.Next() {
|
||||
var log LogItem
|
||||
err := rows.Scan(&log.Action, &log.ElementID, &log.ElementType, &log.IPAddress, &log.ActorID, &log.DoneAt)
|
||||
if err != nil {
|
||||
return logs, err
|
||||
}
|
||||
logs = append(logs, log)
|
||||
}
|
||||
return logs, rows.Err()
|
||||
}
|
||||
|
||||
func (store *SQLModLogStore) GetOffset(offset int, perPage int) (logs []LogItem, err error) {
|
||||
rows, err := store.getOffset.Query(offset, perPage)
|
||||
if err != nil {
|
||||
return logs, err
|
||||
}
|
||||
defer rows.Close()
|
||||
return buildLogList(rows)
|
||||
}
|
||||
|
||||
type SQLAdminLogStore struct {
|
||||
create *sql.Stmt
|
||||
count *sql.Stmt
|
||||
getOffset *sql.Stmt
|
||||
}
|
||||
|
||||
func NewAdminLogStore() (*SQLAdminLogStore, error) {
|
||||
acc := qgen.Builder.Accumulator()
|
||||
func NewAdminLogStore(acc *qgen.Accumulator) (*SQLAdminLogStore, error) {
|
||||
return &SQLAdminLogStore{
|
||||
create: acc.Insert("administration_logs").Columns("action, elementID, elementType, ipaddress, actorID, doneAt").Fields("?,?,?,?,?,UTC_TIMESTAMP()").Prepare(),
|
||||
count: acc.Count("administration_logs").Prepare(),
|
||||
getOffset: acc.Select("administration_logs").Columns("action, elementID, elementType, ipaddress, actorID, doneAt").Orderby("doneAt DESC").Limit("?,?").Prepare(),
|
||||
}, acc.FirstError()
|
||||
}
|
||||
|
||||
|
@ -67,3 +100,12 @@ func (store *SQLAdminLogStore) GlobalCount() (logCount int) {
|
|||
}
|
||||
return logCount
|
||||
}
|
||||
|
||||
func (store *SQLAdminLogStore) GetOffset(offset int, perPage int) (logs []LogItem, err error) {
|
||||
rows, err := store.getOffset.Query(offset, perPage)
|
||||
if err != nil {
|
||||
return logs, err
|
||||
}
|
||||
defer rows.Close()
|
||||
return buildLogList(rows)
|
||||
}
|
||||
|
|
|
@ -8,16 +8,16 @@ import (
|
|||
)
|
||||
|
||||
// nolint I don't want to write comments for each of these o.o
|
||||
const Hour int64 = 60 * 60
|
||||
const Day int64 = Hour * 24
|
||||
const Week int64 = Day * 7
|
||||
const Month int64 = Day * 30
|
||||
const Year int64 = Day * 365
|
||||
const Kilobyte int64 = 1024
|
||||
const Megabyte int64 = Kilobyte * 1024
|
||||
const Gigabyte int64 = Megabyte * 1024
|
||||
const Terabyte int64 = Gigabyte * 1024
|
||||
const Petabyte int64 = Terabyte * 1024
|
||||
const Hour int = 60 * 60
|
||||
const Day int = Hour * 24
|
||||
const Week int = Day * 7
|
||||
const Month int = Day * 30
|
||||
const Year int = Day * 365
|
||||
const Kilobyte int = 1024
|
||||
const Megabyte int = Kilobyte * 1024
|
||||
const Gigabyte int = Megabyte * 1024
|
||||
const Terabyte int = Gigabyte * 1024
|
||||
const Petabyte int = Terabyte * 1024
|
||||
|
||||
const SaltLength int = 32
|
||||
const SessionLength int = 80
|
||||
|
|
|
@ -0,0 +1,93 @@
|
|||
package common
|
||||
|
||||
import "database/sql"
|
||||
import "../query_gen/lib"
|
||||
|
||||
var RegLogs RegLogStore
|
||||
|
||||
type RegLogItem struct {
|
||||
ID int
|
||||
Username string
|
||||
Email string
|
||||
FailureReason string
|
||||
Success bool
|
||||
IPAddress string
|
||||
DoneAt string
|
||||
}
|
||||
|
||||
type RegLogStmts struct {
|
||||
update *sql.Stmt
|
||||
create *sql.Stmt
|
||||
}
|
||||
|
||||
var regLogStmts RegLogStmts
|
||||
|
||||
func init() {
|
||||
DbInits.Add(func(acc *qgen.Accumulator) error {
|
||||
regLogStmts = RegLogStmts{
|
||||
update: acc.Update("registration_logs").Set("username = ?, email = ?, failureReason = ?, success = ?").Where("rlid = ?").Prepare(),
|
||||
create: acc.Insert("registration_logs").Columns("username, email, failureReason, success, ipaddress, doneAt").Fields("?,?,?,?,?,UTC_TIMESTAMP()").Prepare(),
|
||||
}
|
||||
return acc.FirstError()
|
||||
})
|
||||
}
|
||||
|
||||
// TODO: Reload this item in the store, probably doesn't matter right now, but it might when we start caching this stuff in memory
|
||||
// ! Retroactive updates of date are not permitted for integrity reasons
|
||||
func (log *RegLogItem) Commit() error {
|
||||
_, err := regLogStmts.update.Exec(log.Username, log.Email, log.FailureReason, log.Success, log.ID)
|
||||
return err
|
||||
}
|
||||
|
||||
func (log *RegLogItem) Create() (id int, err error) {
|
||||
res, err := regLogStmts.create.Exec(log.Username, log.Email, log.FailureReason, log.Success, log.IPAddress)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
id64, err := res.LastInsertId()
|
||||
log.ID = int(id64)
|
||||
return log.ID, err
|
||||
}
|
||||
|
||||
type RegLogStore interface {
|
||||
GlobalCount() (logCount int)
|
||||
GetOffset(offset int, perPage int) (logs []RegLogItem, err error)
|
||||
}
|
||||
|
||||
type SQLRegLogStore struct {
|
||||
count *sql.Stmt
|
||||
getOffset *sql.Stmt
|
||||
}
|
||||
|
||||
func NewRegLogStore(acc *qgen.Accumulator) (*SQLRegLogStore, error) {
|
||||
return &SQLRegLogStore{
|
||||
count: acc.Count("registration_logs").Prepare(),
|
||||
getOffset: acc.Select("registration_logs").Columns("rlid, username, email, failureReason, success, ipaddress, doneAt").Orderby("doneAt DESC").Limit("?,?").Prepare(),
|
||||
}, acc.FirstError()
|
||||
}
|
||||
|
||||
func (store *SQLRegLogStore) GlobalCount() (logCount int) {
|
||||
err := store.count.QueryRow().Scan(&logCount)
|
||||
if err != nil {
|
||||
LogError(err)
|
||||
}
|
||||
return logCount
|
||||
}
|
||||
|
||||
func (store *SQLRegLogStore) GetOffset(offset int, perPage int) (logs []RegLogItem, err error) {
|
||||
rows, err := store.getOffset.Query(offset, perPage)
|
||||
if err != nil {
|
||||
return logs, err
|
||||
}
|
||||
defer rows.Close()
|
||||
|
||||
for rows.Next() {
|
||||
var log RegLogItem
|
||||
err := rows.Scan(&log.ID, &log.Username, &log.Email, &log.FailureReason, &log.Success, &log.IPAddress, &log.DoneAt)
|
||||
if err != nil {
|
||||
return logs, err
|
||||
}
|
||||
logs = append(logs, log)
|
||||
}
|
||||
return logs, rows.Err()
|
||||
}
|
|
@ -383,7 +383,7 @@ type PanelBackupPage struct {
|
|||
Backups []BackupItem
|
||||
}
|
||||
|
||||
type LogItem struct {
|
||||
type PageLogItem struct {
|
||||
Action template.HTML
|
||||
IPAddress string
|
||||
DoneAt string
|
||||
|
@ -395,7 +395,22 @@ type PanelLogsPage struct {
|
|||
Header *Header
|
||||
Stats PanelStats
|
||||
Zone string
|
||||
Logs []LogItem
|
||||
Logs []PageLogItem
|
||||
Paginator
|
||||
}
|
||||
|
||||
type PageRegLogItem struct {
|
||||
RegLogItem
|
||||
ParsedReason string
|
||||
}
|
||||
|
||||
type PanelRegLogsPage struct {
|
||||
Title string
|
||||
CurrentUser User
|
||||
Header *Header
|
||||
Stats PanelStats
|
||||
Zone string
|
||||
Logs []PageRegLogItem
|
||||
Paginator
|
||||
}
|
||||
|
||||
|
|
|
@ -263,10 +263,6 @@ func preRoute(w http.ResponseWriter, r *http.Request) (User, bool) {
|
|||
if halt {
|
||||
return *user, false
|
||||
}
|
||||
if user == &GuestUser {
|
||||
return *user, true
|
||||
}
|
||||
|
||||
var usercpy *User = BlankUser()
|
||||
*usercpy = *user
|
||||
|
||||
|
@ -276,6 +272,11 @@ func preRoute(w http.ResponseWriter, r *http.Request) (User, bool) {
|
|||
PreError("Bad IP", w, r)
|
||||
return *usercpy, false
|
||||
}
|
||||
if user == &GuestUser {
|
||||
usercpy.LastIP = host
|
||||
return *usercpy, true
|
||||
}
|
||||
|
||||
if host != usercpy.LastIP {
|
||||
err = usercpy.UpdateIP(host)
|
||||
if err != nil {
|
||||
|
|
|
@ -52,7 +52,7 @@ type config struct {
|
|||
SslPrivkey string
|
||||
SslFullchain string
|
||||
|
||||
MaxRequestSize int64
|
||||
MaxRequestSize int
|
||||
CacheTopicUser int
|
||||
UserCacheCapacity int
|
||||
TopicCacheCapacity int
|
||||
|
|
|
@ -151,8 +151,8 @@ func ConvertByteInUnit(bytes float64, unit string) (count float64) {
|
|||
// TODO: Re-add T as int64
|
||||
func ConvertUnit(num int) (int, string) {
|
||||
switch {
|
||||
//case num >= 1000000000000:
|
||||
// return num / 1000000000000, "T"
|
||||
case num >= 1000000000000:
|
||||
return num / 1000000000000, "T"
|
||||
case num >= 1000000000:
|
||||
return num / 1000000000, "B"
|
||||
case num >= 1000000:
|
||||
|
@ -169,10 +169,10 @@ func ConvertUnit(num int) (int, string) {
|
|||
// TODO: Re-add trillion as int64
|
||||
func ConvertFriendlyUnit(num int) (int, string) {
|
||||
switch {
|
||||
//case num >= 1000000000000000:
|
||||
// return 0, " quadrillion"
|
||||
//case num >= 1000000000000:
|
||||
// return 0, " trillion"
|
||||
case num >= 1000000000000000:
|
||||
return 0, " quadrillion"
|
||||
case num >= 1000000000000:
|
||||
return 0, " trillion"
|
||||
case num >= 1000000000:
|
||||
return num / 1000000000, " billion"
|
||||
case num >= 1000000:
|
||||
|
|
54
gen_mssql.go
54
gen_mssql.go
|
@ -12,11 +12,6 @@ type Stmts struct {
|
|||
isPluginActive *sql.Stmt
|
||||
getUsersOffset *sql.Stmt
|
||||
isThemeDefault *sql.Stmt
|
||||
getModlogs *sql.Stmt
|
||||
getModlogsOffset *sql.Stmt
|
||||
getAdminlogsOffset *sql.Stmt
|
||||
getTopicFID *sql.Stmt
|
||||
getUserName *sql.Stmt
|
||||
getEmailsByUser *sql.Stmt
|
||||
getTopicBasic *sql.Stmt
|
||||
forumEntryExists *sql.Stmt
|
||||
|
@ -27,7 +22,6 @@ type Stmts struct {
|
|||
addPlugin *sql.Stmt
|
||||
addTheme *sql.Stmt
|
||||
createWordFilter *sql.Stmt
|
||||
editReply *sql.Stmt
|
||||
updatePlugin *sql.Stmt
|
||||
updatePluginInstall *sql.Stmt
|
||||
updateTheme *sql.Stmt
|
||||
|
@ -81,46 +75,6 @@ func _gen_mssql() (err error) {
|
|||
return err
|
||||
}
|
||||
|
||||
common.DebugLog("Preparing getModlogs statement.")
|
||||
stmts.getModlogs, err = db.Prepare("SELECT [action],[elementID],[elementType],[ipaddress],[actorID],[doneAt] FROM [moderation_logs]")
|
||||
if err != nil {
|
||||
log.Print("Error in getModlogs statement.")
|
||||
log.Print("Bad Query: ","SELECT [action],[elementID],[elementType],[ipaddress],[actorID],[doneAt] FROM [moderation_logs]")
|
||||
return err
|
||||
}
|
||||
|
||||
common.DebugLog("Preparing getModlogsOffset statement.")
|
||||
stmts.getModlogsOffset, err = db.Prepare("SELECT [action],[elementID],[elementType],[ipaddress],[actorID],[doneAt] FROM [moderation_logs] ORDER BY doneAt DESC OFFSET ?1 ROWS FETCH NEXT ?2 ROWS ONLY")
|
||||
if err != nil {
|
||||
log.Print("Error in getModlogsOffset statement.")
|
||||
log.Print("Bad Query: ","SELECT [action],[elementID],[elementType],[ipaddress],[actorID],[doneAt] FROM [moderation_logs] ORDER BY doneAt DESC OFFSET ?1 ROWS FETCH NEXT ?2 ROWS ONLY")
|
||||
return err
|
||||
}
|
||||
|
||||
common.DebugLog("Preparing getAdminlogsOffset statement.")
|
||||
stmts.getAdminlogsOffset, err = db.Prepare("SELECT [action],[elementID],[elementType],[ipaddress],[actorID],[doneAt] FROM [administration_logs] ORDER BY doneAt DESC OFFSET ?1 ROWS FETCH NEXT ?2 ROWS ONLY")
|
||||
if err != nil {
|
||||
log.Print("Error in getAdminlogsOffset statement.")
|
||||
log.Print("Bad Query: ","SELECT [action],[elementID],[elementType],[ipaddress],[actorID],[doneAt] FROM [administration_logs] ORDER BY doneAt DESC OFFSET ?1 ROWS FETCH NEXT ?2 ROWS ONLY")
|
||||
return err
|
||||
}
|
||||
|
||||
common.DebugLog("Preparing getTopicFID statement.")
|
||||
stmts.getTopicFID, err = db.Prepare("SELECT [parentID] FROM [topics] WHERE [tid] = ?1")
|
||||
if err != nil {
|
||||
log.Print("Error in getTopicFID statement.")
|
||||
log.Print("Bad Query: ","SELECT [parentID] FROM [topics] WHERE [tid] = ?1")
|
||||
return err
|
||||
}
|
||||
|
||||
common.DebugLog("Preparing getUserName statement.")
|
||||
stmts.getUserName, err = db.Prepare("SELECT [name] FROM [users] WHERE [uid] = ?1")
|
||||
if err != nil {
|
||||
log.Print("Error in getUserName statement.")
|
||||
log.Print("Bad Query: ","SELECT [name] FROM [users] WHERE [uid] = ?1")
|
||||
return err
|
||||
}
|
||||
|
||||
common.DebugLog("Preparing getEmailsByUser statement.")
|
||||
stmts.getEmailsByUser, err = db.Prepare("SELECT [email],[validated],[token] FROM [emails] WHERE [uid] = ?1")
|
||||
if err != nil {
|
||||
|
@ -201,14 +155,6 @@ func _gen_mssql() (err error) {
|
|||
return err
|
||||
}
|
||||
|
||||
common.DebugLog("Preparing editReply statement.")
|
||||
stmts.editReply, err = db.Prepare("UPDATE [replies] SET [content] = ?,[parsed_content] = ? WHERE [rid] = ?")
|
||||
if err != nil {
|
||||
log.Print("Error in editReply statement.")
|
||||
log.Print("Bad Query: ","UPDATE [replies] SET [content] = ?,[parsed_content] = ? WHERE [rid] = ?")
|
||||
return err
|
||||
}
|
||||
|
||||
common.DebugLog("Preparing updatePlugin statement.")
|
||||
stmts.updatePlugin, err = db.Prepare("UPDATE [plugins] SET [active] = ? WHERE [uname] = ?")
|
||||
if err != nil {
|
||||
|
|
48
gen_mysql.go
48
gen_mysql.go
|
@ -14,11 +14,6 @@ type Stmts struct {
|
|||
isPluginActive *sql.Stmt
|
||||
getUsersOffset *sql.Stmt
|
||||
isThemeDefault *sql.Stmt
|
||||
getModlogs *sql.Stmt
|
||||
getModlogsOffset *sql.Stmt
|
||||
getAdminlogsOffset *sql.Stmt
|
||||
getTopicFID *sql.Stmt
|
||||
getUserName *sql.Stmt
|
||||
getEmailsByUser *sql.Stmt
|
||||
getTopicBasic *sql.Stmt
|
||||
forumEntryExists *sql.Stmt
|
||||
|
@ -29,7 +24,6 @@ type Stmts struct {
|
|||
addPlugin *sql.Stmt
|
||||
addTheme *sql.Stmt
|
||||
createWordFilter *sql.Stmt
|
||||
editReply *sql.Stmt
|
||||
updatePlugin *sql.Stmt
|
||||
updatePluginInstall *sql.Stmt
|
||||
updateTheme *sql.Stmt
|
||||
|
@ -80,41 +74,6 @@ func _gen_mysql() (err error) {
|
|||
return err
|
||||
}
|
||||
|
||||
common.DebugLog("Preparing getModlogs statement.")
|
||||
stmts.getModlogs, err = db.Prepare("SELECT `action`,`elementID`,`elementType`,`ipaddress`,`actorID`,`doneAt` FROM `moderation_logs`")
|
||||
if err != nil {
|
||||
log.Print("Error in getModlogs statement.")
|
||||
return err
|
||||
}
|
||||
|
||||
common.DebugLog("Preparing getModlogsOffset statement.")
|
||||
stmts.getModlogsOffset, err = db.Prepare("SELECT `action`,`elementID`,`elementType`,`ipaddress`,`actorID`,`doneAt` FROM `moderation_logs` ORDER BY `doneAt` DESC LIMIT ?,?")
|
||||
if err != nil {
|
||||
log.Print("Error in getModlogsOffset statement.")
|
||||
return err
|
||||
}
|
||||
|
||||
common.DebugLog("Preparing getAdminlogsOffset statement.")
|
||||
stmts.getAdminlogsOffset, err = db.Prepare("SELECT `action`,`elementID`,`elementType`,`ipaddress`,`actorID`,`doneAt` FROM `administration_logs` ORDER BY `doneAt` DESC LIMIT ?,?")
|
||||
if err != nil {
|
||||
log.Print("Error in getAdminlogsOffset statement.")
|
||||
return err
|
||||
}
|
||||
|
||||
common.DebugLog("Preparing getTopicFID statement.")
|
||||
stmts.getTopicFID, err = db.Prepare("SELECT `parentID` FROM `topics` WHERE `tid` = ?")
|
||||
if err != nil {
|
||||
log.Print("Error in getTopicFID statement.")
|
||||
return err
|
||||
}
|
||||
|
||||
common.DebugLog("Preparing getUserName statement.")
|
||||
stmts.getUserName, err = db.Prepare("SELECT `name` FROM `users` WHERE `uid` = ?")
|
||||
if err != nil {
|
||||
log.Print("Error in getUserName statement.")
|
||||
return err
|
||||
}
|
||||
|
||||
common.DebugLog("Preparing getEmailsByUser statement.")
|
||||
stmts.getEmailsByUser, err = db.Prepare("SELECT `email`,`validated`,`token` FROM `emails` WHERE `uid` = ?")
|
||||
if err != nil {
|
||||
|
@ -185,13 +144,6 @@ func _gen_mysql() (err error) {
|
|||
return err
|
||||
}
|
||||
|
||||
common.DebugLog("Preparing editReply statement.")
|
||||
stmts.editReply, err = db.Prepare("UPDATE `replies` SET `content` = ?,`parsed_content` = ? WHERE `rid` = ?")
|
||||
if err != nil {
|
||||
log.Print("Error in editReply statement.")
|
||||
return err
|
||||
}
|
||||
|
||||
common.DebugLog("Preparing updatePlugin statement.")
|
||||
stmts.updatePlugin, err = db.Prepare("UPDATE `plugins` SET `active` = ? WHERE `uname` = ?")
|
||||
if err != nil {
|
||||
|
|
|
@ -9,7 +9,6 @@ import "./common"
|
|||
|
||||
// nolint
|
||||
type Stmts struct {
|
||||
editReply *sql.Stmt
|
||||
updatePlugin *sql.Stmt
|
||||
updatePluginInstall *sql.Stmt
|
||||
updateTheme *sql.Stmt
|
||||
|
@ -36,13 +35,6 @@ type Stmts struct {
|
|||
func _gen_pgsql() (err error) {
|
||||
common.DebugLog("Building the generated statements")
|
||||
|
||||
common.DebugLog("Preparing editReply statement.")
|
||||
stmts.editReply, err = db.Prepare("UPDATE `replies` SET `content` = ?,`parsed_content` = ? WHERE `rid` = ?")
|
||||
if err != nil {
|
||||
log.Print("Error in editReply statement.")
|
||||
return err
|
||||
}
|
||||
|
||||
common.DebugLog("Preparing updatePlugin statement.")
|
||||
stmts.updatePlugin, err = db.Prepare("UPDATE `plugins` SET `active` = ? WHERE `uname` = ?")
|
||||
if err != nil {
|
||||
|
|
282
gen_router.go
282
gen_router.go
|
@ -85,6 +85,7 @@ var RouteMap = map[string]interface{}{
|
|||
"routePanelGroupsEditPermsSubmit": routePanelGroupsEditPermsSubmit,
|
||||
"routePanelGroupsCreateSubmit": routePanelGroupsCreateSubmit,
|
||||
"routePanelBackups": routePanelBackups,
|
||||
"routePanelLogsRegs": routePanelLogsRegs,
|
||||
"routePanelLogsMod": routePanelLogsMod,
|
||||
"routePanelDebug": routePanelDebug,
|
||||
"routePanelDashboard": routePanelDashboard,
|
||||
|
@ -201,52 +202,53 @@ var routeMapEnum = map[string]int{
|
|||
"routePanelGroupsEditPermsSubmit": 63,
|
||||
"routePanelGroupsCreateSubmit": 64,
|
||||
"routePanelBackups": 65,
|
||||
"routePanelLogsMod": 66,
|
||||
"routePanelDebug": 67,
|
||||
"routePanelDashboard": 68,
|
||||
"routes.AccountEditCritical": 69,
|
||||
"routes.AccountEditCriticalSubmit": 70,
|
||||
"routes.AccountEditAvatar": 71,
|
||||
"routes.AccountEditAvatarSubmit": 72,
|
||||
"routes.AccountEditUsername": 73,
|
||||
"routes.AccountEditUsernameSubmit": 74,
|
||||
"routeAccountEditEmail": 75,
|
||||
"routeAccountEditEmailTokenSubmit": 76,
|
||||
"routes.ViewProfile": 77,
|
||||
"routes.BanUserSubmit": 78,
|
||||
"routes.UnbanUser": 79,
|
||||
"routes.ActivateUser": 80,
|
||||
"routes.IPSearch": 81,
|
||||
"routes.CreateTopicSubmit": 82,
|
||||
"routes.EditTopicSubmit": 83,
|
||||
"routes.DeleteTopicSubmit": 84,
|
||||
"routes.StickTopicSubmit": 85,
|
||||
"routes.UnstickTopicSubmit": 86,
|
||||
"routes.LockTopicSubmit": 87,
|
||||
"routes.UnlockTopicSubmit": 88,
|
||||
"routes.MoveTopicSubmit": 89,
|
||||
"routes.LikeTopicSubmit": 90,
|
||||
"routes.ViewTopic": 91,
|
||||
"routes.CreateReplySubmit": 92,
|
||||
"routes.ReplyEditSubmit": 93,
|
||||
"routes.ReplyDeleteSubmit": 94,
|
||||
"routes.ReplyLikeSubmit": 95,
|
||||
"routes.ProfileReplyCreateSubmit": 96,
|
||||
"routes.ProfileReplyEditSubmit": 97,
|
||||
"routes.ProfileReplyDeleteSubmit": 98,
|
||||
"routes.PollVote": 99,
|
||||
"routes.PollResults": 100,
|
||||
"routes.AccountLogin": 101,
|
||||
"routes.AccountRegister": 102,
|
||||
"routes.AccountLogout": 103,
|
||||
"routes.AccountLoginSubmit": 104,
|
||||
"routes.AccountRegisterSubmit": 105,
|
||||
"routes.DynamicRoute": 106,
|
||||
"routes.UploadedFile": 107,
|
||||
"routes.StaticFile": 108,
|
||||
"routes.RobotsTxt": 109,
|
||||
"routes.SitemapXml": 110,
|
||||
"routes.BadRoute": 111,
|
||||
"routePanelLogsRegs": 66,
|
||||
"routePanelLogsMod": 67,
|
||||
"routePanelDebug": 68,
|
||||
"routePanelDashboard": 69,
|
||||
"routes.AccountEditCritical": 70,
|
||||
"routes.AccountEditCriticalSubmit": 71,
|
||||
"routes.AccountEditAvatar": 72,
|
||||
"routes.AccountEditAvatarSubmit": 73,
|
||||
"routes.AccountEditUsername": 74,
|
||||
"routes.AccountEditUsernameSubmit": 75,
|
||||
"routeAccountEditEmail": 76,
|
||||
"routeAccountEditEmailTokenSubmit": 77,
|
||||
"routes.ViewProfile": 78,
|
||||
"routes.BanUserSubmit": 79,
|
||||
"routes.UnbanUser": 80,
|
||||
"routes.ActivateUser": 81,
|
||||
"routes.IPSearch": 82,
|
||||
"routes.CreateTopicSubmit": 83,
|
||||
"routes.EditTopicSubmit": 84,
|
||||
"routes.DeleteTopicSubmit": 85,
|
||||
"routes.StickTopicSubmit": 86,
|
||||
"routes.UnstickTopicSubmit": 87,
|
||||
"routes.LockTopicSubmit": 88,
|
||||
"routes.UnlockTopicSubmit": 89,
|
||||
"routes.MoveTopicSubmit": 90,
|
||||
"routes.LikeTopicSubmit": 91,
|
||||
"routes.ViewTopic": 92,
|
||||
"routes.CreateReplySubmit": 93,
|
||||
"routes.ReplyEditSubmit": 94,
|
||||
"routes.ReplyDeleteSubmit": 95,
|
||||
"routes.ReplyLikeSubmit": 96,
|
||||
"routes.ProfileReplyCreateSubmit": 97,
|
||||
"routes.ProfileReplyEditSubmit": 98,
|
||||
"routes.ProfileReplyDeleteSubmit": 99,
|
||||
"routes.PollVote": 100,
|
||||
"routes.PollResults": 101,
|
||||
"routes.AccountLogin": 102,
|
||||
"routes.AccountRegister": 103,
|
||||
"routes.AccountLogout": 104,
|
||||
"routes.AccountLoginSubmit": 105,
|
||||
"routes.AccountRegisterSubmit": 106,
|
||||
"routes.DynamicRoute": 107,
|
||||
"routes.UploadedFile": 108,
|
||||
"routes.StaticFile": 109,
|
||||
"routes.RobotsTxt": 110,
|
||||
"routes.SitemapXml": 111,
|
||||
"routes.BadRoute": 112,
|
||||
}
|
||||
var reverseRouteMapEnum = map[int]string{
|
||||
0: "routeAPI",
|
||||
|
@ -315,52 +317,53 @@ var reverseRouteMapEnum = map[int]string{
|
|||
63: "routePanelGroupsEditPermsSubmit",
|
||||
64: "routePanelGroupsCreateSubmit",
|
||||
65: "routePanelBackups",
|
||||
66: "routePanelLogsMod",
|
||||
67: "routePanelDebug",
|
||||
68: "routePanelDashboard",
|
||||
69: "routes.AccountEditCritical",
|
||||
70: "routes.AccountEditCriticalSubmit",
|
||||
71: "routes.AccountEditAvatar",
|
||||
72: "routes.AccountEditAvatarSubmit",
|
||||
73: "routes.AccountEditUsername",
|
||||
74: "routes.AccountEditUsernameSubmit",
|
||||
75: "routeAccountEditEmail",
|
||||
76: "routeAccountEditEmailTokenSubmit",
|
||||
77: "routes.ViewProfile",
|
||||
78: "routes.BanUserSubmit",
|
||||
79: "routes.UnbanUser",
|
||||
80: "routes.ActivateUser",
|
||||
81: "routes.IPSearch",
|
||||
82: "routes.CreateTopicSubmit",
|
||||
83: "routes.EditTopicSubmit",
|
||||
84: "routes.DeleteTopicSubmit",
|
||||
85: "routes.StickTopicSubmit",
|
||||
86: "routes.UnstickTopicSubmit",
|
||||
87: "routes.LockTopicSubmit",
|
||||
88: "routes.UnlockTopicSubmit",
|
||||
89: "routes.MoveTopicSubmit",
|
||||
90: "routes.LikeTopicSubmit",
|
||||
91: "routes.ViewTopic",
|
||||
92: "routes.CreateReplySubmit",
|
||||
93: "routes.ReplyEditSubmit",
|
||||
94: "routes.ReplyDeleteSubmit",
|
||||
95: "routes.ReplyLikeSubmit",
|
||||
96: "routes.ProfileReplyCreateSubmit",
|
||||
97: "routes.ProfileReplyEditSubmit",
|
||||
98: "routes.ProfileReplyDeleteSubmit",
|
||||
99: "routes.PollVote",
|
||||
100: "routes.PollResults",
|
||||
101: "routes.AccountLogin",
|
||||
102: "routes.AccountRegister",
|
||||
103: "routes.AccountLogout",
|
||||
104: "routes.AccountLoginSubmit",
|
||||
105: "routes.AccountRegisterSubmit",
|
||||
106: "routes.DynamicRoute",
|
||||
107: "routes.UploadedFile",
|
||||
108: "routes.StaticFile",
|
||||
109: "routes.RobotsTxt",
|
||||
110: "routes.SitemapXml",
|
||||
111: "routes.BadRoute",
|
||||
66: "routePanelLogsRegs",
|
||||
67: "routePanelLogsMod",
|
||||
68: "routePanelDebug",
|
||||
69: "routePanelDashboard",
|
||||
70: "routes.AccountEditCritical",
|
||||
71: "routes.AccountEditCriticalSubmit",
|
||||
72: "routes.AccountEditAvatar",
|
||||
73: "routes.AccountEditAvatarSubmit",
|
||||
74: "routes.AccountEditUsername",
|
||||
75: "routes.AccountEditUsernameSubmit",
|
||||
76: "routeAccountEditEmail",
|
||||
77: "routeAccountEditEmailTokenSubmit",
|
||||
78: "routes.ViewProfile",
|
||||
79: "routes.BanUserSubmit",
|
||||
80: "routes.UnbanUser",
|
||||
81: "routes.ActivateUser",
|
||||
82: "routes.IPSearch",
|
||||
83: "routes.CreateTopicSubmit",
|
||||
84: "routes.EditTopicSubmit",
|
||||
85: "routes.DeleteTopicSubmit",
|
||||
86: "routes.StickTopicSubmit",
|
||||
87: "routes.UnstickTopicSubmit",
|
||||
88: "routes.LockTopicSubmit",
|
||||
89: "routes.UnlockTopicSubmit",
|
||||
90: "routes.MoveTopicSubmit",
|
||||
91: "routes.LikeTopicSubmit",
|
||||
92: "routes.ViewTopic",
|
||||
93: "routes.CreateReplySubmit",
|
||||
94: "routes.ReplyEditSubmit",
|
||||
95: "routes.ReplyDeleteSubmit",
|
||||
96: "routes.ReplyLikeSubmit",
|
||||
97: "routes.ProfileReplyCreateSubmit",
|
||||
98: "routes.ProfileReplyEditSubmit",
|
||||
99: "routes.ProfileReplyDeleteSubmit",
|
||||
100: "routes.PollVote",
|
||||
101: "routes.PollResults",
|
||||
102: "routes.AccountLogin",
|
||||
103: "routes.AccountRegister",
|
||||
104: "routes.AccountLogout",
|
||||
105: "routes.AccountLoginSubmit",
|
||||
106: "routes.AccountRegisterSubmit",
|
||||
107: "routes.DynamicRoute",
|
||||
108: "routes.UploadedFile",
|
||||
109: "routes.StaticFile",
|
||||
110: "routes.RobotsTxt",
|
||||
111: "routes.SitemapXml",
|
||||
112: "routes.BadRoute",
|
||||
}
|
||||
var osMapEnum = map[string]int{
|
||||
"unknown": 0,
|
||||
|
@ -656,7 +659,7 @@ func (router *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
|||
counters.GlobalViewCounter.Bump()
|
||||
|
||||
if prefix == "/static" {
|
||||
counters.RouteViewCounter.Bump(108)
|
||||
counters.RouteViewCounter.Bump(109)
|
||||
req.URL.Path += extraData
|
||||
routes.StaticFile(w, req)
|
||||
return
|
||||
|
@ -1293,8 +1296,11 @@ func (router *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
|||
|
||||
counters.RouteViewCounter.Bump(65)
|
||||
err = routePanelBackups(w,req,user,extraData)
|
||||
case "/panel/logs/mod/":
|
||||
case "/panel/logs/regs/":
|
||||
counters.RouteViewCounter.Bump(66)
|
||||
err = routePanelLogsRegs(w,req,user)
|
||||
case "/panel/logs/mod/":
|
||||
counters.RouteViewCounter.Bump(67)
|
||||
err = routePanelLogsMod(w,req,user)
|
||||
case "/panel/debug/":
|
||||
err = common.AdminOnly(w,req,user)
|
||||
|
@ -1303,10 +1309,10 @@ func (router *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
counters.RouteViewCounter.Bump(67)
|
||||
counters.RouteViewCounter.Bump(68)
|
||||
err = routePanelDebug(w,req,user)
|
||||
default:
|
||||
counters.RouteViewCounter.Bump(68)
|
||||
counters.RouteViewCounter.Bump(69)
|
||||
err = routePanelDashboard(w,req,user)
|
||||
}
|
||||
if err != nil {
|
||||
|
@ -1321,7 +1327,7 @@ func (router *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
counters.RouteViewCounter.Bump(69)
|
||||
counters.RouteViewCounter.Bump(70)
|
||||
err = routes.AccountEditCritical(w,req,user)
|
||||
case "/user/edit/critical/submit/":
|
||||
err = common.NoSessionMismatch(w,req,user)
|
||||
|
@ -1336,7 +1342,7 @@ func (router *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
counters.RouteViewCounter.Bump(70)
|
||||
counters.RouteViewCounter.Bump(71)
|
||||
err = routes.AccountEditCriticalSubmit(w,req,user)
|
||||
case "/user/edit/avatar/":
|
||||
err = common.MemberOnly(w,req,user)
|
||||
|
@ -1345,7 +1351,7 @@ func (router *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
counters.RouteViewCounter.Bump(71)
|
||||
counters.RouteViewCounter.Bump(72)
|
||||
err = routes.AccountEditAvatar(w,req,user)
|
||||
case "/user/edit/avatar/submit/":
|
||||
err = common.MemberOnly(w,req,user)
|
||||
|
@ -1365,7 +1371,7 @@ func (router *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
counters.RouteViewCounter.Bump(72)
|
||||
counters.RouteViewCounter.Bump(73)
|
||||
err = routes.AccountEditAvatarSubmit(w,req,user)
|
||||
case "/user/edit/username/":
|
||||
err = common.MemberOnly(w,req,user)
|
||||
|
@ -1374,7 +1380,7 @@ func (router *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
counters.RouteViewCounter.Bump(73)
|
||||
counters.RouteViewCounter.Bump(74)
|
||||
err = routes.AccountEditUsername(w,req,user)
|
||||
case "/user/edit/username/submit/":
|
||||
err = common.NoSessionMismatch(w,req,user)
|
||||
|
@ -1389,7 +1395,7 @@ func (router *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
counters.RouteViewCounter.Bump(74)
|
||||
counters.RouteViewCounter.Bump(75)
|
||||
err = routes.AccountEditUsernameSubmit(w,req,user)
|
||||
case "/user/edit/email/":
|
||||
err = common.MemberOnly(w,req,user)
|
||||
|
@ -1398,7 +1404,7 @@ func (router *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
counters.RouteViewCounter.Bump(75)
|
||||
counters.RouteViewCounter.Bump(76)
|
||||
err = routeAccountEditEmail(w,req,user)
|
||||
case "/user/edit/token/":
|
||||
err = common.NoSessionMismatch(w,req,user)
|
||||
|
@ -1413,11 +1419,11 @@ func (router *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
counters.RouteViewCounter.Bump(76)
|
||||
counters.RouteViewCounter.Bump(77)
|
||||
err = routeAccountEditEmailTokenSubmit(w,req,user,extraData)
|
||||
default:
|
||||
req.URL.Path += extraData
|
||||
counters.RouteViewCounter.Bump(77)
|
||||
counters.RouteViewCounter.Bump(78)
|
||||
err = routes.ViewProfile(w,req,user)
|
||||
}
|
||||
if err != nil {
|
||||
|
@ -1438,7 +1444,7 @@ func (router *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
counters.RouteViewCounter.Bump(78)
|
||||
counters.RouteViewCounter.Bump(79)
|
||||
err = routes.BanUserSubmit(w,req,user,extraData)
|
||||
case "/users/unban/":
|
||||
err = common.NoSessionMismatch(w,req,user)
|
||||
|
@ -1453,7 +1459,7 @@ func (router *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
counters.RouteViewCounter.Bump(79)
|
||||
counters.RouteViewCounter.Bump(80)
|
||||
err = routes.UnbanUser(w,req,user,extraData)
|
||||
case "/users/activate/":
|
||||
err = common.NoSessionMismatch(w,req,user)
|
||||
|
@ -1468,7 +1474,7 @@ func (router *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
counters.RouteViewCounter.Bump(80)
|
||||
counters.RouteViewCounter.Bump(81)
|
||||
err = routes.ActivateUser(w,req,user,extraData)
|
||||
case "/users/ips/":
|
||||
err = common.MemberOnly(w,req,user)
|
||||
|
@ -1477,7 +1483,7 @@ func (router *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
counters.RouteViewCounter.Bump(81)
|
||||
counters.RouteViewCounter.Bump(82)
|
||||
err = routes.IPSearch(w,req,user)
|
||||
}
|
||||
if err != nil {
|
||||
|
@ -1503,7 +1509,7 @@ func (router *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
counters.RouteViewCounter.Bump(82)
|
||||
counters.RouteViewCounter.Bump(83)
|
||||
err = routes.CreateTopicSubmit(w,req,user)
|
||||
case "/topic/edit/submit/":
|
||||
err = common.NoSessionMismatch(w,req,user)
|
||||
|
@ -1518,7 +1524,7 @@ func (router *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
counters.RouteViewCounter.Bump(83)
|
||||
counters.RouteViewCounter.Bump(84)
|
||||
err = routes.EditTopicSubmit(w,req,user,extraData)
|
||||
case "/topic/delete/submit/":
|
||||
err = common.NoSessionMismatch(w,req,user)
|
||||
|
@ -1534,7 +1540,7 @@ func (router *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
|||
}
|
||||
|
||||
req.URL.Path += extraData
|
||||
counters.RouteViewCounter.Bump(84)
|
||||
counters.RouteViewCounter.Bump(85)
|
||||
err = routes.DeleteTopicSubmit(w,req,user)
|
||||
case "/topic/stick/submit/":
|
||||
err = common.NoSessionMismatch(w,req,user)
|
||||
|
@ -1549,7 +1555,7 @@ func (router *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
counters.RouteViewCounter.Bump(85)
|
||||
counters.RouteViewCounter.Bump(86)
|
||||
err = routes.StickTopicSubmit(w,req,user,extraData)
|
||||
case "/topic/unstick/submit/":
|
||||
err = common.NoSessionMismatch(w,req,user)
|
||||
|
@ -1564,7 +1570,7 @@ func (router *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
counters.RouteViewCounter.Bump(86)
|
||||
counters.RouteViewCounter.Bump(87)
|
||||
err = routes.UnstickTopicSubmit(w,req,user,extraData)
|
||||
case "/topic/lock/submit/":
|
||||
err = common.NoSessionMismatch(w,req,user)
|
||||
|
@ -1580,7 +1586,7 @@ func (router *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
|||
}
|
||||
|
||||
req.URL.Path += extraData
|
||||
counters.RouteViewCounter.Bump(87)
|
||||
counters.RouteViewCounter.Bump(88)
|
||||
err = routes.LockTopicSubmit(w,req,user)
|
||||
case "/topic/unlock/submit/":
|
||||
err = common.NoSessionMismatch(w,req,user)
|
||||
|
@ -1595,7 +1601,7 @@ func (router *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
counters.RouteViewCounter.Bump(88)
|
||||
counters.RouteViewCounter.Bump(89)
|
||||
err = routes.UnlockTopicSubmit(w,req,user,extraData)
|
||||
case "/topic/move/submit/":
|
||||
err = common.NoSessionMismatch(w,req,user)
|
||||
|
@ -1610,7 +1616,7 @@ func (router *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
counters.RouteViewCounter.Bump(89)
|
||||
counters.RouteViewCounter.Bump(90)
|
||||
err = routes.MoveTopicSubmit(w,req,user,extraData)
|
||||
case "/topic/like/submit/":
|
||||
err = common.NoSessionMismatch(w,req,user)
|
||||
|
@ -1631,10 +1637,10 @@ func (router *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
counters.RouteViewCounter.Bump(90)
|
||||
counters.RouteViewCounter.Bump(91)
|
||||
err = routes.LikeTopicSubmit(w,req,user,extraData)
|
||||
default:
|
||||
counters.RouteViewCounter.Bump(91)
|
||||
counters.RouteViewCounter.Bump(92)
|
||||
err = routes.ViewTopic(w,req,user, extraData)
|
||||
}
|
||||
if err != nil {
|
||||
|
@ -1660,7 +1666,7 @@ func (router *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
counters.RouteViewCounter.Bump(92)
|
||||
counters.RouteViewCounter.Bump(93)
|
||||
err = routes.CreateReplySubmit(w,req,user)
|
||||
case "/reply/edit/submit/":
|
||||
err = common.NoSessionMismatch(w,req,user)
|
||||
|
@ -1675,7 +1681,7 @@ func (router *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
counters.RouteViewCounter.Bump(93)
|
||||
counters.RouteViewCounter.Bump(94)
|
||||
err = routes.ReplyEditSubmit(w,req,user,extraData)
|
||||
case "/reply/delete/submit/":
|
||||
err = common.NoSessionMismatch(w,req,user)
|
||||
|
@ -1690,7 +1696,7 @@ func (router *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
counters.RouteViewCounter.Bump(94)
|
||||
counters.RouteViewCounter.Bump(95)
|
||||
err = routes.ReplyDeleteSubmit(w,req,user,extraData)
|
||||
case "/reply/like/submit/":
|
||||
err = common.NoSessionMismatch(w,req,user)
|
||||
|
@ -1711,7 +1717,7 @@ func (router *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
counters.RouteViewCounter.Bump(95)
|
||||
counters.RouteViewCounter.Bump(96)
|
||||
err = routes.ReplyLikeSubmit(w,req,user,extraData)
|
||||
}
|
||||
if err != nil {
|
||||
|
@ -1732,7 +1738,7 @@ func (router *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
counters.RouteViewCounter.Bump(96)
|
||||
counters.RouteViewCounter.Bump(97)
|
||||
err = routes.ProfileReplyCreateSubmit(w,req,user)
|
||||
case "/profile/reply/edit/submit/":
|
||||
err = common.NoSessionMismatch(w,req,user)
|
||||
|
@ -1747,7 +1753,7 @@ func (router *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
counters.RouteViewCounter.Bump(97)
|
||||
counters.RouteViewCounter.Bump(98)
|
||||
err = routes.ProfileReplyEditSubmit(w,req,user,extraData)
|
||||
case "/profile/reply/delete/submit/":
|
||||
err = common.NoSessionMismatch(w,req,user)
|
||||
|
@ -1762,7 +1768,7 @@ func (router *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
counters.RouteViewCounter.Bump(98)
|
||||
counters.RouteViewCounter.Bump(99)
|
||||
err = routes.ProfileReplyDeleteSubmit(w,req,user,extraData)
|
||||
}
|
||||
if err != nil {
|
||||
|
@ -1783,10 +1789,10 @@ func (router *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
counters.RouteViewCounter.Bump(99)
|
||||
counters.RouteViewCounter.Bump(100)
|
||||
err = routes.PollVote(w,req,user,extraData)
|
||||
case "/poll/results/":
|
||||
counters.RouteViewCounter.Bump(100)
|
||||
counters.RouteViewCounter.Bump(101)
|
||||
err = routes.PollResults(w,req,user,extraData)
|
||||
}
|
||||
if err != nil {
|
||||
|
@ -1795,10 +1801,10 @@ func (router *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
|||
case "/accounts":
|
||||
switch(req.URL.Path) {
|
||||
case "/accounts/login/":
|
||||
counters.RouteViewCounter.Bump(101)
|
||||
counters.RouteViewCounter.Bump(102)
|
||||
err = routes.AccountLogin(w,req,user)
|
||||
case "/accounts/create/":
|
||||
counters.RouteViewCounter.Bump(102)
|
||||
counters.RouteViewCounter.Bump(103)
|
||||
err = routes.AccountRegister(w,req,user)
|
||||
case "/accounts/logout/":
|
||||
err = common.NoSessionMismatch(w,req,user)
|
||||
|
@ -1813,7 +1819,7 @@ func (router *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
counters.RouteViewCounter.Bump(103)
|
||||
counters.RouteViewCounter.Bump(104)
|
||||
err = routes.AccountLogout(w,req,user)
|
||||
case "/accounts/login/submit/":
|
||||
err = common.ParseForm(w,req,user)
|
||||
|
@ -1822,7 +1828,7 @@ func (router *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
counters.RouteViewCounter.Bump(104)
|
||||
counters.RouteViewCounter.Bump(105)
|
||||
err = routes.AccountLoginSubmit(w,req,user)
|
||||
case "/accounts/create/submit/":
|
||||
err = common.ParseForm(w,req,user)
|
||||
|
@ -1831,7 +1837,7 @@ func (router *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
counters.RouteViewCounter.Bump(105)
|
||||
counters.RouteViewCounter.Bump(106)
|
||||
err = routes.AccountRegisterSubmit(w,req,user)
|
||||
}
|
||||
if err != nil {
|
||||
|
@ -1848,7 +1854,7 @@ func (router *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
|||
common.NotFound(w,req,nil)
|
||||
return
|
||||
}
|
||||
counters.RouteViewCounter.Bump(107)
|
||||
counters.RouteViewCounter.Bump(108)
|
||||
req.URL.Path += extraData
|
||||
// TODO: Find a way to propagate errors up from this?
|
||||
router.UploadHandler(w,req) // TODO: Count these views
|
||||
|
@ -1857,14 +1863,14 @@ func (router *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
|||
// TODO: Add support for favicons and robots.txt files
|
||||
switch(extraData) {
|
||||
case "robots.txt":
|
||||
counters.RouteViewCounter.Bump(109)
|
||||
counters.RouteViewCounter.Bump(110)
|
||||
err = routes.RobotsTxt(w,req)
|
||||
if err != nil {
|
||||
router.handleError(err,w,req,user)
|
||||
}
|
||||
return
|
||||
/*case "sitemap.xml":
|
||||
counters.RouteViewCounter.Bump(110)
|
||||
counters.RouteViewCounter.Bump(111)
|
||||
err = routes.SitemapXml(w,req)
|
||||
if err != nil {
|
||||
router.handleError(err,w,req,user)
|
||||
|
@ -1893,7 +1899,7 @@ func (router *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
|||
router.RUnlock()
|
||||
|
||||
if ok {
|
||||
counters.RouteViewCounter.Bump(106) // TODO: Be more specific about *which* dynamic route it is
|
||||
counters.RouteViewCounter.Bump(107) // TODO: Be more specific about *which* dynamic route it is
|
||||
req.URL.Path += extraData
|
||||
err = handle(w,req,user)
|
||||
if err != nil {
|
||||
|
@ -1908,7 +1914,7 @@ func (router *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
|||
} else {
|
||||
router.DumpRequest(req,"Bad Route")
|
||||
}
|
||||
counters.RouteViewCounter.Bump(111)
|
||||
counters.RouteViewCounter.Bump(112)
|
||||
common.NotFound(w,req,nil)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -96,8 +96,9 @@
|
|||
"panel_themes_menus":"Menu Manager",
|
||||
"panel_themes_menus_edit":"Menu Editor",
|
||||
"panel_backups":"Backups",
|
||||
"panel_mod_logs":"Moderation Logs",
|
||||
"panel_admin_logs":"Administration Logs",
|
||||
"panel_registration_logs":"Registration Logs",
|
||||
"panel_mod_logs":"Mod Action Logs",
|
||||
"panel_admin_logs":"Admin Action Logs",
|
||||
"panel_debug":"Debug"
|
||||
},
|
||||
|
||||
|
@ -547,8 +548,9 @@
|
|||
"panel_menu_statistics_referrers":"Referrers",
|
||||
"panel_menu_reports":"Reports",
|
||||
"panel_menu_logs":"Logs",
|
||||
"panel_menu_logs_moderators":"Moderators",
|
||||
"panel_menu_logs_administrators":"Administrators",
|
||||
"panel_menu_logs_registrations":"Registrations",
|
||||
"panel_menu_logs_moderators":"Mod Actions",
|
||||
"panel_menu_logs_administrators":"Admin Actions",
|
||||
"panel_menu_system":"System",
|
||||
"panel_menu_plugins":"Plugins",
|
||||
"panel_menu_backups":"Backups",
|
||||
|
@ -680,10 +682,12 @@
|
|||
"panel_statistics_operating_systems_no_operating_systems":"No operating systems could be found in the selected time range",
|
||||
|
||||
"panel_logs_menu_head":"Logs",
|
||||
"panel_logs_menu_moderation":"Moderation Logs",
|
||||
"panel_logs_menu_administration":"Administration Logs",
|
||||
"panel_logs_moderation_head":"Moderation Logs",
|
||||
"panel_logs_administration_head":"Administration Logs",
|
||||
"panel_logs_registration_head":"Registrations",
|
||||
"panel_logs_registration_attempt":"Attempt",
|
||||
"panel_logs_registration_email":"email",
|
||||
"panel_logs_registration_reason":"reason",
|
||||
"panel_logs_moderation_head":"Mod Action Logs",
|
||||
"panel_logs_administration_head":"Admin Action Logs",
|
||||
|
||||
"panel_plugins_head":"Plugins",
|
||||
"panel_plugins_author_prefix":"Author: ",
|
||||
|
|
8
main.go
8
main.go
|
@ -107,11 +107,15 @@ func afterDBInit() (err error) {
|
|||
}
|
||||
|
||||
log.Print("Initialising the stores")
|
||||
common.ModLogs, err = common.NewModLogStore()
|
||||
common.RegLogs, err = common.NewRegLogStore(acc)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
common.AdminLogs, err = common.NewAdminLogStore()
|
||||
common.ModLogs, err = common.NewModLogStore(acc)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
common.AdminLogs, err = common.NewAdminLogStore(acc)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -42,13 +42,13 @@ func routeReportSubmit(w http.ResponseWriter, r *http.Request, user common.User,
|
|||
return common.InternalError(err, w, r)
|
||||
}
|
||||
|
||||
err = stmts.getUserName.QueryRow(userReply.ParentID).Scan(&title)
|
||||
profileOwner, err := common.Users.Get(userReply.ParentID)
|
||||
if err == ErrNoRows {
|
||||
return common.LocalError("We weren't able to find the profile the reported post is supposed to be on", w, r, user)
|
||||
} else if err != nil {
|
||||
return common.InternalError(err, w, r)
|
||||
}
|
||||
title = "Profile: " + title
|
||||
title = "Profile: " + profileOwner.Name
|
||||
content = userReply.Content + "\n\nOriginal Post: @" + strconv.Itoa(userReply.ParentID)
|
||||
} else if itemType == "topic" {
|
||||
err = stmts.getTopicBasic.QueryRow(itemID).Scan(&title, &content)
|
||||
|
|
|
@ -2701,6 +2701,31 @@ func routePanelBackups(w http.ResponseWriter, r *http.Request, user common.User,
|
|||
return panelRenderTemplate("panel_backups", w, r, user, &pi)
|
||||
}
|
||||
|
||||
func routePanelLogsRegs(w http.ResponseWriter, r *http.Request, user common.User) common.RouteError {
|
||||
headerVars, stats, ferr := common.PanelUserCheck(w, r, &user)
|
||||
if ferr != nil {
|
||||
return ferr
|
||||
}
|
||||
|
||||
logCount := common.RegLogs.GlobalCount()
|
||||
page, _ := strconv.Atoi(r.FormValue("page"))
|
||||
perPage := 10
|
||||
offset, page, lastPage := common.PageOffset(logCount, page, perPage)
|
||||
|
||||
logs, err := common.RegLogs.GetOffset(offset, perPage)
|
||||
if err != nil {
|
||||
return common.InternalError(err, w, r)
|
||||
}
|
||||
var llist = make([]common.PageRegLogItem, len(logs))
|
||||
for index, log := range logs {
|
||||
llist[index] = common.PageRegLogItem{log, strings.Replace(strings.TrimSuffix(log.FailureReason,"|"), "|", " | ", -1)}
|
||||
}
|
||||
|
||||
pageList := common.Paginate(logCount, perPage, 5)
|
||||
pi := common.PanelRegLogsPage{common.GetTitlePhrase("panel_registration_logs"), user, headerVars, stats, "logs", llist, common.Paginator{pageList, page, lastPage}}
|
||||
return panelRenderTemplate("panel_reglogs", w, r, user, &pi)
|
||||
}
|
||||
|
||||
// TODO: Log errors when something really screwy is going on?
|
||||
func handleUnknownUser(user *common.User, err error) *common.User {
|
||||
if err != nil {
|
||||
|
@ -2720,7 +2745,6 @@ func topicElementTypeAction(action string, elementType string, elementID int, ac
|
|||
if action == "delete" {
|
||||
return fmt.Sprintf("Topic #%d was deleted by <a href='%s'>%s</a>", elementID, actor.Link, actor.Name)
|
||||
}
|
||||
|
||||
switch action {
|
||||
case "lock":
|
||||
out = "<a href='%s'>%s</a> was locked by <a href='%s'>%s</a>"
|
||||
|
@ -2778,32 +2802,19 @@ func routePanelLogsMod(w http.ResponseWriter, r *http.Request, user common.User)
|
|||
perPage := 10
|
||||
offset, page, lastPage := common.PageOffset(logCount, page, perPage)
|
||||
|
||||
rows, err := stmts.getModlogsOffset.Query(offset, perPage)
|
||||
logs, err := common.ModLogs.GetOffset(offset, perPage)
|
||||
if err != nil {
|
||||
return common.InternalError(err, w, r)
|
||||
}
|
||||
defer rows.Close()
|
||||
|
||||
var logs []common.LogItem
|
||||
var action, elementType, ipaddress, doneAt string
|
||||
var elementID, actorID int
|
||||
for rows.Next() {
|
||||
err := rows.Scan(&action, &elementID, &elementType, &ipaddress, &actorID, &doneAt)
|
||||
if err != nil {
|
||||
return common.InternalError(err, w, r)
|
||||
}
|
||||
|
||||
actor := handleUnknownUser(common.Users.Get(actorID))
|
||||
action = modlogsElementType(action, elementType, elementID, actor)
|
||||
logs = append(logs, common.LogItem{Action: template.HTML(action), IPAddress: ipaddress, DoneAt: doneAt})
|
||||
}
|
||||
err = rows.Err()
|
||||
if err != nil {
|
||||
return common.InternalError(err, w, r)
|
||||
var llist = make([]common.PageLogItem, len(logs))
|
||||
for index, log := range logs {
|
||||
actor := handleUnknownUser(common.Users.Get(log.ActorID))
|
||||
action := modlogsElementType(log.Action, log.ElementType, log.ElementID, actor)
|
||||
llist[index] = common.PageLogItem{Action: template.HTML(action), IPAddress: log.IPAddress, DoneAt: log.DoneAt}
|
||||
}
|
||||
|
||||
pageList := common.Paginate(logCount, perPage, 5)
|
||||
pi := common.PanelLogsPage{common.GetTitlePhrase("panel_mod_logs"), user, headerVars, stats, "logs", logs, common.Paginator{pageList, page, lastPage}}
|
||||
pi := common.PanelLogsPage{common.GetTitlePhrase("panel_mod_logs"), user, headerVars, stats, "logs", llist, common.Paginator{pageList, page, lastPage}}
|
||||
return panelRenderTemplate("panel_modlogs", w, r, user, &pi)
|
||||
}
|
||||
|
||||
|
@ -2818,32 +2829,19 @@ func routePanelLogsAdmin(w http.ResponseWriter, r *http.Request, user common.Use
|
|||
perPage := 10
|
||||
offset, page, lastPage := common.PageOffset(logCount, page, perPage)
|
||||
|
||||
rows, err := stmts.getAdminlogsOffset.Query(offset, perPage)
|
||||
logs, err := common.AdminLogs.GetOffset(offset, perPage)
|
||||
if err != nil {
|
||||
return common.InternalError(err, w, r)
|
||||
}
|
||||
defer rows.Close()
|
||||
|
||||
var logs []common.LogItem
|
||||
var action, elementType, ipaddress, doneAt string
|
||||
var elementID, actorID int
|
||||
for rows.Next() {
|
||||
err := rows.Scan(&action, &elementID, &elementType, &ipaddress, &actorID, &doneAt)
|
||||
if err != nil {
|
||||
return common.InternalError(err, w, r)
|
||||
}
|
||||
|
||||
actor := handleUnknownUser(common.Users.Get(actorID))
|
||||
action = modlogsElementType(action, elementType, elementID, actor)
|
||||
logs = append(logs, common.LogItem{Action: template.HTML(action), IPAddress: ipaddress, DoneAt: doneAt})
|
||||
}
|
||||
err = rows.Err()
|
||||
if err != nil {
|
||||
return common.InternalError(err, w, r)
|
||||
var llist = make([]common.PageLogItem, len(logs))
|
||||
for index, log := range logs {
|
||||
actor := handleUnknownUser(common.Users.Get(log.ActorID))
|
||||
action := modlogsElementType(log.Action, log.ElementType, log.ElementID, actor)
|
||||
llist[index] = common.PageLogItem{Action: template.HTML(action), IPAddress: log.IPAddress, DoneAt: log.DoneAt}
|
||||
}
|
||||
|
||||
pageList := common.Paginate(logCount, perPage, 5)
|
||||
pi := common.PanelLogsPage{common.GetTitlePhrase("panel_admin_logs"), user, headerVars, stats, "logs", logs, common.Paginator{pageList, page, lastPage}}
|
||||
pi := common.PanelLogsPage{common.GetTitlePhrase("panel_admin_logs"), user, headerVars, stats, "logs", llist, common.Paginator{pageList, page, lastPage}}
|
||||
return panelRenderTemplate("panel_adminlogs", w, r, user, &pi)
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@ package main
|
|||
|
||||
import (
|
||||
"bufio"
|
||||
"database/sql"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
|
@ -17,6 +16,12 @@ import (
|
|||
_ "github.com/go-sql-driver/mysql"
|
||||
)
|
||||
|
||||
var patches = make(map[int]func(*bufio.Scanner) error)
|
||||
|
||||
func addPatch(index int, handle func(*bufio.Scanner) error) {
|
||||
patches[index] = handle
|
||||
}
|
||||
|
||||
func main() {
|
||||
scanner := bufio.NewScanner(os.Stdin)
|
||||
|
||||
|
@ -92,55 +97,21 @@ func patcher(scanner *bufio.Scanner) error {
|
|||
}
|
||||
|
||||
fmt.Println("Applying the patches")
|
||||
if dbVersion < 2 {
|
||||
if dbVersion < 1 {
|
||||
err := patch0(scanner)
|
||||
var pslice = make([]func(*bufio.Scanner) error, len(patches))
|
||||
for i := 0; i < len(patches); i++ {
|
||||
pslice[i] = patches[i]
|
||||
}
|
||||
|
||||
// Run the queued up patches
|
||||
for index, patch := range pslice {
|
||||
if dbVersion > index {
|
||||
continue
|
||||
}
|
||||
err := patch(scanner)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return patch1(scanner)
|
||||
}
|
||||
return patch2(scanner)
|
||||
}
|
||||
|
||||
func execStmt(stmt *sql.Stmt, err error) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
_, err = stmt.Exec()
|
||||
return err
|
||||
}
|
||||
|
||||
/*func eachUserQuick(handle func(int)) error {
|
||||
stmt, err := qgen.Builder.Select("users").Orderby("uid desc").Limit(1).Prepare()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
var topID int
|
||||
err := stmt.QueryRow(topID)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for i := 1; i <= topID; i++ {
|
||||
err = handle(i)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
func eachUser(handle func(int) error) error {
|
||||
acc := qgen.Builder.Accumulator()
|
||||
err := acc.Select("users").Each(func(rows *sql.Rows) error {
|
||||
var uid int
|
||||
err := rows.Scan(&uid)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return handle(uid)
|
||||
})
|
||||
return err
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -7,6 +7,13 @@ import (
|
|||
"../query_gen/lib"
|
||||
)
|
||||
|
||||
func init() {
|
||||
addPatch(0, patch0)
|
||||
addPatch(1, patch1)
|
||||
addPatch(2, patch2)
|
||||
addPatch(3, patch3)
|
||||
}
|
||||
|
||||
func patch0(scanner *bufio.Scanner) (err error) {
|
||||
err = execStmt(qgen.Builder.DropTable("menus"))
|
||||
if err != nil {
|
||||
|
@ -206,3 +213,25 @@ func patch2(scanner *bufio.Scanner) error {
|
|||
|
||||
return nil
|
||||
}
|
||||
|
||||
func patch3(scanner *bufio.Scanner) error {
|
||||
err := execStmt(qgen.Builder.CreateTable("registration_logs", "", "",
|
||||
[]qgen.DBTableColumn{
|
||||
qgen.DBTableColumn{"rlid", "int", 0, false, true, ""},
|
||||
qgen.DBTableColumn{"username", "varchar", 100, false, false, ""},
|
||||
qgen.DBTableColumn{"email", "varchar", 100, false, false, ""},
|
||||
qgen.DBTableColumn{"failureReason", "varchar", 100, false, false, ""},
|
||||
qgen.DBTableColumn{"success", "bool", 0, false, false, "0"}, // Did this attempt succeed?
|
||||
qgen.DBTableColumn{"ipaddress", "varchar", 200, false, false, ""},
|
||||
qgen.DBTableColumn{"doneAt", "createdAt", 0, false, false, ""},
|
||||
},
|
||||
[]qgen.DBTableKey{
|
||||
qgen.DBTableKey{"rlid", "primary"},
|
||||
},
|
||||
))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
package main
|
||||
|
||||
import "database/sql"
|
||||
import "../query_gen/lib"
|
||||
|
||||
func execStmt(stmt *sql.Stmt, err error) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
_, err = stmt.Exec()
|
||||
return err
|
||||
}
|
||||
|
||||
/*func eachUserQuick(handle func(int)) error {
|
||||
stmt, err := qgen.Builder.Select("users").Orderby("uid desc").Limit(1).Prepare()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
var topID int
|
||||
err := stmt.QueryRow(topID)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for i := 1; i <= topID; i++ {
|
||||
err = handle(i)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
func eachUser(handle func(int) error) error {
|
||||
acc := qgen.Builder.Accumulator()
|
||||
err := acc.Select("users").Each(func(rows *sql.Rows) error {
|
||||
var uid int
|
||||
err := rows.Scan(&uid)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return handle(uid)
|
||||
})
|
||||
return err
|
||||
}
|
|
@ -265,19 +265,9 @@ func writeSelects(adapter qgen.Adapter) error {
|
|||
|
||||
build.Select("isThemeDefault").Table("themes").Columns("default").Where("uname = ?").Parse()
|
||||
|
||||
build.Select("getModlogs").Table("moderation_logs").Columns("action, elementID, elementType, ipaddress, actorID, doneAt").Parse()
|
||||
|
||||
build.Select("getModlogsOffset").Table("moderation_logs").Columns("action, elementID, elementType, ipaddress, actorID, doneAt").Orderby("doneAt DESC").Limit("?,?").Parse()
|
||||
|
||||
build.Select("getAdminlogsOffset").Table("administration_logs").Columns("action, elementID, elementType, ipaddress, actorID, doneAt").Orderby("doneAt DESC").Limit("?,?").Parse()
|
||||
|
||||
build.Select("getTopicFID").Table("topics").Columns("parentID").Where("tid = ?").Parse()
|
||||
|
||||
build.Select("getUserName").Table("users").Columns("name").Where("uid = ?").Parse()
|
||||
|
||||
build.Select("getEmailsByUser").Table("emails").Columns("email, validated, token").Where("uid = ?").Parse()
|
||||
|
||||
build.Select("getTopicBasic").Table("topics").Columns("title, content").Where("tid = ?").Parse()
|
||||
build.Select("getTopicBasic").Table("topics").Columns("title, content").Where("tid = ?").Parse() // TODO: Comment this out and see if anything breaks
|
||||
|
||||
build.Select("forumEntryExists").Table("forums").Columns("fid").Where("name = ''").Orderby("fid ASC").Limit("0,1").Parse()
|
||||
|
||||
|
@ -315,8 +305,6 @@ func writeInserts(adapter qgen.Adapter) error {
|
|||
func writeUpdates(adapter qgen.Adapter) error {
|
||||
build := adapter.Builder()
|
||||
|
||||
build.Update("editReply").Table("replies").Set("content = ?, parsed_content = ?").Where("rid = ?").Parse()
|
||||
|
||||
build.Update("updatePlugin").Table("plugins").Set("active = ?").Where("uname = ?").Parse()
|
||||
|
||||
build.Update("updatePluginInstall").Table("plugins").Set("installed = ?").Where("uname = ?").Parse()
|
||||
|
|
|
@ -411,18 +411,20 @@ func createTables(adapter qgen.Adapter) error {
|
|||
},
|
||||
)
|
||||
|
||||
/*
|
||||
qgen.Install.CreateTable("registration_logs", "", "",
|
||||
[]qgen.DBTableColumn{
|
||||
qgen.DBTableColumn{"rlid", "int", 0, false, true, ""},
|
||||
qgen.DBTableColumn{"username", "varchar", 100, false, false, ""},
|
||||
qgen.DBTableColumn{"email", "varchar", 100, false, false, ""},
|
||||
qgen.DBTableColumn{"failureReason", "varchar", 100, false, false, ""},
|
||||
qgen.DBTableColumn{"success", "int", 0, false, false, "0"}, // Did this attempt succeed?
|
||||
qgen.DBTableColumn{"success", "bool", 0, false, false, "0"}, // Did this attempt succeed?
|
||||
qgen.DBTableColumn{"ipaddress", "varchar", 200, false, false, ""},
|
||||
qgen.DBTableColumn{"doneAt", "createdAt", 0, false, false, ""},
|
||||
},
|
||||
[]qgen.DBTableKey{},
|
||||
[]qgen.DBTableKey{
|
||||
qgen.DBTableKey{"rlid", "primary"},
|
||||
},
|
||||
)
|
||||
*/
|
||||
|
||||
qgen.Install.CreateTable("moderation_logs", "", "",
|
||||
[]qgen.DBTableColumn{
|
||||
|
|
|
@ -194,6 +194,7 @@ func buildPanelRoutes() {
|
|||
Action("routePanelGroupsCreateSubmit", "/panel/groups/create/"),
|
||||
|
||||
View("routePanelBackups", "/panel/backups/", "extraData").Before("SuperAdminOnly"), // TODO: Test
|
||||
View("routePanelLogsRegs", "/panel/logs/regs/"),
|
||||
View("routePanelLogsMod", "/panel/logs/mod/"),
|
||||
View("routePanelDebug", "/panel/debug/").Before("AdminOnly"),
|
||||
)
|
||||
|
|
|
@ -108,28 +108,47 @@ func AccountRegister(w http.ResponseWriter, r *http.Request, user common.User) c
|
|||
func AccountRegisterSubmit(w http.ResponseWriter, r *http.Request, user common.User) common.RouteError {
|
||||
headerLite, _ := common.SimpleUserCheck(w, r, &user)
|
||||
|
||||
username := html.EscapeString(strings.Replace(r.PostFormValue("username"), "\n", "", -1))
|
||||
if username == "" {
|
||||
return common.LocalError("You didn't put in a username.", w, r, user)
|
||||
// TODO: Should we push multiple validation errors to the user instead of just one?
|
||||
var regSuccess = true
|
||||
var regErrMsg = ""
|
||||
var regErrReason = ""
|
||||
var regError = func(userMsg string, reason string) {
|
||||
regSuccess = false
|
||||
if regErrMsg == "" {
|
||||
regErrMsg = userMsg
|
||||
}
|
||||
regErrReason += reason + "|"
|
||||
}
|
||||
|
||||
username := html.EscapeString(strings.Replace(r.PostFormValue("username"), "\n", "", -1))
|
||||
email := html.EscapeString(strings.Replace(r.PostFormValue("email"), "\n", "", -1))
|
||||
if username == "" {
|
||||
regError("You didn't put in a username.", "no-username")
|
||||
}
|
||||
if email == "" {
|
||||
return common.LocalError("You didn't put in an email.", w, r, user)
|
||||
regError("You didn't put in an email.", "no-email")
|
||||
}
|
||||
|
||||
password := r.PostFormValue("password")
|
||||
// ? Move this into Create()? What if we want to programatically set weak passwords for tests?
|
||||
err := common.WeakPassword(password, username, email)
|
||||
if err != nil {
|
||||
return common.LocalError(err.Error(), w, r, user)
|
||||
regError(err.Error(), "weak-password")
|
||||
} else {
|
||||
// Do the two inputted passwords match..?
|
||||
confirmPassword := r.PostFormValue("confirm_password")
|
||||
if password != confirmPassword {
|
||||
regError("The two passwords don't match.", "password-mismatch")
|
||||
}
|
||||
}
|
||||
|
||||
confirmPassword := r.PostFormValue("confirm_password")
|
||||
common.DebugLog("Registration Attempt! Username: " + username) // TODO: Add more controls over what is logged when?
|
||||
|
||||
// Do the two inputted passwords match..?
|
||||
if password != confirmPassword {
|
||||
return common.LocalError("The two passwords don't match.", w, r, user)
|
||||
regLog := common.RegLogItem{Username: username, Email: email, FailureReason: regErrReason, Success: regSuccess, IPAddress: user.LastIP}
|
||||
_, err = regLog.Create()
|
||||
if err != nil {
|
||||
return common.InternalError(err, w, r)
|
||||
}
|
||||
if !regSuccess {
|
||||
return common.LocalError(regErrMsg, w, r, user)
|
||||
}
|
||||
|
||||
var active bool
|
||||
|
@ -142,12 +161,30 @@ func AccountRegisterSubmit(w http.ResponseWriter, r *http.Request, user common.U
|
|||
group = common.Config.ActivationGroup
|
||||
}
|
||||
|
||||
// TODO: Do the registration attempt logging a little less messily (without having to amend the result after the insert)
|
||||
uid, err := common.Users.Create(username, password, email, group, active)
|
||||
if err != nil {
|
||||
regLog.Success = false
|
||||
if err == common.ErrAccountExists {
|
||||
regLog.FailureReason += "username-exists"
|
||||
err = regLog.Commit()
|
||||
if err != nil {
|
||||
return common.InternalError(err, w, r)
|
||||
}
|
||||
return common.LocalError("This username isn't available. Try another.", w, r, user)
|
||||
} else if err == common.ErrLongUsername {
|
||||
regLog.FailureReason += "username-too-long"
|
||||
err = regLog.Commit()
|
||||
if err != nil {
|
||||
return common.InternalError(err, w, r)
|
||||
}
|
||||
return common.LocalError("The username is too long, max: "+strconv.Itoa(common.Config.MaxUsernameLength), w, r, user)
|
||||
} else if err != nil {
|
||||
}
|
||||
regLog.FailureReason += "internal-error"
|
||||
err2 := regLog.Commit()
|
||||
if err2 != nil {
|
||||
return common.InternalError(err2, w, r)
|
||||
}
|
||||
return common.InternalError(err, w, r)
|
||||
}
|
||||
|
||||
|
@ -161,7 +198,6 @@ func AccountRegisterSubmit(w http.ResponseWriter, r *http.Request, user common.U
|
|||
// TODO: Add an EmailStore and move this there
|
||||
acc := qgen.Builder.Accumulator()
|
||||
_, err = acc.Insert("emails").Columns("email, uid, validated, token").Fields("?,?,?,?").Exec(email, uid, 0, token)
|
||||
//_, err = stmts.addEmail.Exec(email, uid, 0, token)
|
||||
if err != nil {
|
||||
return common.InternalError(err, w, r)
|
||||
}
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
CREATE TABLE [registration_logs] (
|
||||
[rlid] int not null IDENTITY,
|
||||
[username] nvarchar (100) not null,
|
||||
[email] nvarchar (100) not null,
|
||||
[failureReason] nvarchar (100) not null,
|
||||
[success] bool DEFAULT 0 not null,
|
||||
[ipaddress] nvarchar (200) not null,
|
||||
[doneAt] datetime not null,
|
||||
primary key([rlid])
|
||||
);
|
|
@ -0,0 +1,10 @@
|
|||
CREATE TABLE `registration_logs` (
|
||||
`rlid` int not null AUTO_INCREMENT,
|
||||
`username` varchar(100) not null,
|
||||
`email` varchar(100) not null,
|
||||
`failureReason` varchar(100) not null,
|
||||
`success` bool DEFAULT 0 not null,
|
||||
`ipaddress` varchar(200) not null,
|
||||
`doneAt` datetime not null,
|
||||
primary key(`rlid`)
|
||||
);
|
|
@ -0,0 +1,10 @@
|
|||
CREATE TABLE `registration_logs` (
|
||||
`rlid` serial not null,
|
||||
`username` varchar (100) not null,
|
||||
`email` varchar (100) not null,
|
||||
`failureReason` varchar (100) not null,
|
||||
`success` bool DEFAULT 0 not null,
|
||||
`ipaddress` varchar (200) not null,
|
||||
`doneAt` timestamp not null,
|
||||
primary key(`rlid`)
|
||||
);
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"DBVersion":"3",
|
||||
"DBVersion":"4",
|
||||
"DynamicFileVersion":"0",
|
||||
"MinGoVersion":"1.10",
|
||||
"MinVersion":""
|
||||
|
|
|
@ -1,121 +0,0 @@
|
|||
// +build !no_templategen
|
||||
|
||||
// Code generated by Gosora. More below:
|
||||
/* This file was automatically generated by the software. Please don't edit it as your changes may be overwritten at any moment. */
|
||||
package main
|
||||
import "io"
|
||||
import "./common"
|
||||
|
||||
var error_tmpl_phrase_id int
|
||||
|
||||
// nolint
|
||||
func init() {
|
||||
common.Template_error_handle = Template_error
|
||||
common.Ctemplates = append(common.Ctemplates,"error")
|
||||
common.TmplPtrMap["error"] = &common.Template_error_handle
|
||||
common.TmplPtrMap["o_error"] = Template_error
|
||||
error_tmpl_phrase_id = common.RegisterTmplPhraseNames([]string{
|
||||
"menu_hamburger_tooltip",
|
||||
"error_head",
|
||||
"footer_powered_by",
|
||||
"footer_made_with_love",
|
||||
"footer_theme_selector_aria",
|
||||
})
|
||||
}
|
||||
|
||||
// nolint
|
||||
func Template_error(tmpl_error_vars common.Page, w io.Writer) error {
|
||||
var phrases = common.GetTmplPhrasesBytes(error_tmpl_phrase_id)
|
||||
w.Write(header_frags[0])
|
||||
w.Write([]byte(tmpl_error_vars.Title))
|
||||
w.Write(header_frags[1])
|
||||
w.Write([]byte(tmpl_error_vars.Header.Site.Name))
|
||||
w.Write(header_frags[2])
|
||||
w.Write([]byte(tmpl_error_vars.Header.Theme.Name))
|
||||
w.Write(header_frags[3])
|
||||
if len(tmpl_error_vars.Header.Stylesheets) != 0 {
|
||||
for _, item := range tmpl_error_vars.Header.Stylesheets {
|
||||
w.Write(header_frags[4])
|
||||
w.Write([]byte(item))
|
||||
w.Write(header_frags[5])
|
||||
}
|
||||
}
|
||||
w.Write(header_frags[6])
|
||||
if len(tmpl_error_vars.Header.Scripts) != 0 {
|
||||
for _, item := range tmpl_error_vars.Header.Scripts {
|
||||
w.Write(header_frags[7])
|
||||
w.Write([]byte(item))
|
||||
w.Write(header_frags[8])
|
||||
}
|
||||
}
|
||||
w.Write(header_frags[9])
|
||||
w.Write([]byte(tmpl_error_vars.CurrentUser.Session))
|
||||
w.Write(header_frags[10])
|
||||
w.Write([]byte(tmpl_error_vars.Header.Site.URL))
|
||||
w.Write(header_frags[11])
|
||||
if tmpl_error_vars.Header.MetaDesc != "" {
|
||||
w.Write(header_frags[12])
|
||||
w.Write([]byte(tmpl_error_vars.Header.MetaDesc))
|
||||
w.Write(header_frags[13])
|
||||
}
|
||||
w.Write(header_frags[14])
|
||||
if !tmpl_error_vars.CurrentUser.IsSuperMod {
|
||||
w.Write(header_frags[15])
|
||||
}
|
||||
w.Write(header_frags[16])
|
||||
w.Write([]byte(common.BuildWidget("leftOfNav",tmpl_error_vars.Header)))
|
||||
w.Write(header_frags[17])
|
||||
w.Write([]byte(tmpl_error_vars.Header.Site.ShortName))
|
||||
w.Write(header_frags[18])
|
||||
w.Write([]byte(common.BuildWidget("topMenu",tmpl_error_vars.Header)))
|
||||
w.Write(header_frags[19])
|
||||
w.Write(phrases[0])
|
||||
w.Write(header_frags[20])
|
||||
w.Write([]byte(common.BuildWidget("rightOfNav",tmpl_error_vars.Header)))
|
||||
w.Write(header_frags[21])
|
||||
if tmpl_error_vars.Header.Widgets.RightSidebar != "" {
|
||||
w.Write(header_frags[22])
|
||||
}
|
||||
w.Write(header_frags[23])
|
||||
if len(tmpl_error_vars.Header.NoticeList) != 0 {
|
||||
for _, item := range tmpl_error_vars.Header.NoticeList {
|
||||
w.Write(notice_frags[0])
|
||||
w.Write([]byte(item))
|
||||
w.Write(notice_frags[1])
|
||||
}
|
||||
}
|
||||
w.Write(header_frags[24])
|
||||
w.Write(error_frags[0])
|
||||
w.Write(phrases[1])
|
||||
w.Write(error_frags[1])
|
||||
w.Write([]byte(tmpl_error_vars.Something.(string)))
|
||||
w.Write(error_frags[2])
|
||||
w.Write(footer_frags[0])
|
||||
w.Write([]byte(common.BuildWidget("footer",tmpl_error_vars.Header)))
|
||||
w.Write(footer_frags[1])
|
||||
w.Write(phrases[2])
|
||||
w.Write(footer_frags[2])
|
||||
w.Write(phrases[3])
|
||||
w.Write(footer_frags[3])
|
||||
w.Write(phrases[4])
|
||||
w.Write(footer_frags[4])
|
||||
if len(tmpl_error_vars.Header.Themes) != 0 {
|
||||
for _, item := range tmpl_error_vars.Header.Themes {
|
||||
if !item.HideFromThemes {
|
||||
w.Write(footer_frags[5])
|
||||
w.Write([]byte(item.Name))
|
||||
w.Write(footer_frags[6])
|
||||
if tmpl_error_vars.Header.Theme.Name == item.Name {
|
||||
w.Write(footer_frags[7])
|
||||
}
|
||||
w.Write(footer_frags[8])
|
||||
w.Write([]byte(item.FriendlyName))
|
||||
w.Write(footer_frags[9])
|
||||
}
|
||||
}
|
||||
}
|
||||
w.Write(footer_frags[10])
|
||||
w.Write([]byte(common.BuildWidget("rightSidebar",tmpl_error_vars.Header)))
|
||||
w.Write(footer_frags[11])
|
||||
return nil
|
||||
}
|
|
@ -1,370 +0,0 @@
|
|||
// +build !no_templategen
|
||||
|
||||
// Code generated by Gosora. More below:
|
||||
/* This file was automatically generated by the software. Please don't edit it as your changes may be overwritten at any moment. */
|
||||
package main
|
||||
import "strconv"
|
||||
import "io"
|
||||
import "./common"
|
||||
|
||||
var forum_tmpl_phrase_id int
|
||||
|
||||
// nolint
|
||||
func init() {
|
||||
common.Template_forum_handle = Template_forum
|
||||
common.Ctemplates = append(common.Ctemplates,"forum")
|
||||
common.TmplPtrMap["forum"] = &common.Template_forum_handle
|
||||
common.TmplPtrMap["o_forum"] = Template_forum
|
||||
forum_tmpl_phrase_id = common.RegisterTmplPhraseNames([]string{
|
||||
"menu_hamburger_tooltip",
|
||||
"paginator_prev_page_aria",
|
||||
"paginator_less_than",
|
||||
"paginator_next_page_aria",
|
||||
"paginator_greater_than",
|
||||
"topic_list_create_topic_tooltip",
|
||||
"topic_list_create_topic_aria",
|
||||
"topic_list_moderate_tooltip",
|
||||
"topic_list_moderate_aria",
|
||||
"forum_locked_tooltip",
|
||||
"forum_locked_aria",
|
||||
"topic_list_what_to_do",
|
||||
"topic_list_moderate_delete",
|
||||
"topic_list_moderate_lock",
|
||||
"topic_list_moderate_move",
|
||||
"topic_list_moderate_run",
|
||||
"quick_topic_aria",
|
||||
"quick_topic_avatar_alt",
|
||||
"quick_topic_avatar_tooltip",
|
||||
"quick_topic_whatsup",
|
||||
"quick_topic_content_placeholder",
|
||||
"quick_topic_create_topic_button",
|
||||
"quick_topic_add_poll_button",
|
||||
"quick_topic_add_file_button",
|
||||
"quick_topic_cancel_button",
|
||||
"forum_list_aria",
|
||||
"status_closed_tooltip",
|
||||
"status_pinned_tooltip",
|
||||
"forum_no_topics",
|
||||
"forum_start_one",
|
||||
"paginator_prev_page_aria",
|
||||
"paginator_prev_page",
|
||||
"paginator_next_page_aria",
|
||||
"paginator_next_page",
|
||||
"footer_powered_by",
|
||||
"footer_made_with_love",
|
||||
"footer_theme_selector_aria",
|
||||
})
|
||||
}
|
||||
|
||||
// nolint
|
||||
func Template_forum(tmpl_forum_vars common.ForumPage, w io.Writer) error {
|
||||
var phrases = common.GetTmplPhrasesBytes(forum_tmpl_phrase_id)
|
||||
w.Write(header_frags[0])
|
||||
w.Write([]byte(tmpl_forum_vars.Title))
|
||||
w.Write(header_frags[1])
|
||||
w.Write([]byte(tmpl_forum_vars.Header.Site.Name))
|
||||
w.Write(header_frags[2])
|
||||
w.Write([]byte(tmpl_forum_vars.Header.Theme.Name))
|
||||
w.Write(header_frags[3])
|
||||
if len(tmpl_forum_vars.Header.Stylesheets) != 0 {
|
||||
for _, item := range tmpl_forum_vars.Header.Stylesheets {
|
||||
w.Write(header_frags[4])
|
||||
w.Write([]byte(item))
|
||||
w.Write(header_frags[5])
|
||||
}
|
||||
}
|
||||
w.Write(header_frags[6])
|
||||
if len(tmpl_forum_vars.Header.Scripts) != 0 {
|
||||
for _, item := range tmpl_forum_vars.Header.Scripts {
|
||||
w.Write(header_frags[7])
|
||||
w.Write([]byte(item))
|
||||
w.Write(header_frags[8])
|
||||
}
|
||||
}
|
||||
w.Write(header_frags[9])
|
||||
w.Write([]byte(tmpl_forum_vars.CurrentUser.Session))
|
||||
w.Write(header_frags[10])
|
||||
w.Write([]byte(tmpl_forum_vars.Header.Site.URL))
|
||||
w.Write(header_frags[11])
|
||||
if tmpl_forum_vars.Header.MetaDesc != "" {
|
||||
w.Write(header_frags[12])
|
||||
w.Write([]byte(tmpl_forum_vars.Header.MetaDesc))
|
||||
w.Write(header_frags[13])
|
||||
}
|
||||
w.Write(header_frags[14])
|
||||
if !tmpl_forum_vars.CurrentUser.IsSuperMod {
|
||||
w.Write(header_frags[15])
|
||||
}
|
||||
w.Write(header_frags[16])
|
||||
w.Write([]byte(common.BuildWidget("leftOfNav",tmpl_forum_vars.Header)))
|
||||
w.Write(header_frags[17])
|
||||
w.Write([]byte(tmpl_forum_vars.Header.Site.ShortName))
|
||||
w.Write(header_frags[18])
|
||||
w.Write([]byte(common.BuildWidget("topMenu",tmpl_forum_vars.Header)))
|
||||
w.Write(header_frags[19])
|
||||
w.Write(phrases[0])
|
||||
w.Write(header_frags[20])
|
||||
w.Write([]byte(common.BuildWidget("rightOfNav",tmpl_forum_vars.Header)))
|
||||
w.Write(header_frags[21])
|
||||
if tmpl_forum_vars.Header.Widgets.RightSidebar != "" {
|
||||
w.Write(header_frags[22])
|
||||
}
|
||||
w.Write(header_frags[23])
|
||||
if len(tmpl_forum_vars.Header.NoticeList) != 0 {
|
||||
for _, item := range tmpl_forum_vars.Header.NoticeList {
|
||||
w.Write(notice_frags[0])
|
||||
w.Write([]byte(item))
|
||||
w.Write(notice_frags[1])
|
||||
}
|
||||
}
|
||||
w.Write(header_frags[24])
|
||||
if tmpl_forum_vars.Page > 1 {
|
||||
w.Write(forum_frags[0])
|
||||
w.Write(phrases[1])
|
||||
w.Write(forum_frags[1])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Forum.ID)))
|
||||
w.Write(forum_frags[2])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Page - 1)))
|
||||
w.Write(forum_frags[3])
|
||||
w.Write(phrases[2])
|
||||
w.Write(forum_frags[4])
|
||||
}
|
||||
if tmpl_forum_vars.LastPage != tmpl_forum_vars.Page {
|
||||
w.Write(forum_frags[5])
|
||||
w.Write(phrases[3])
|
||||
w.Write(forum_frags[6])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Forum.ID)))
|
||||
w.Write(forum_frags[7])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Page + 1)))
|
||||
w.Write(forum_frags[8])
|
||||
w.Write(phrases[4])
|
||||
w.Write(forum_frags[9])
|
||||
}
|
||||
w.Write(forum_frags[10])
|
||||
if tmpl_forum_vars.CurrentUser.ID != 0 {
|
||||
w.Write(forum_frags[11])
|
||||
}
|
||||
w.Write(forum_frags[12])
|
||||
w.Write([]byte(tmpl_forum_vars.Title))
|
||||
w.Write(forum_frags[13])
|
||||
if tmpl_forum_vars.CurrentUser.ID != 0 {
|
||||
w.Write(forum_frags[14])
|
||||
if tmpl_forum_vars.CurrentUser.Perms.CreateTopic {
|
||||
w.Write(forum_frags[15])
|
||||
w.Write(phrases[5])
|
||||
w.Write(forum_frags[16])
|
||||
w.Write(phrases[6])
|
||||
w.Write(forum_frags[17])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Forum.ID)))
|
||||
w.Write(forum_frags[18])
|
||||
w.Write(forum_frags[19])
|
||||
w.Write(phrases[7])
|
||||
w.Write(forum_frags[20])
|
||||
w.Write(phrases[8])
|
||||
w.Write(forum_frags[21])
|
||||
} else {
|
||||
w.Write(forum_frags[22])
|
||||
w.Write(phrases[9])
|
||||
w.Write(forum_frags[23])
|
||||
w.Write(phrases[10])
|
||||
w.Write(forum_frags[24])
|
||||
}
|
||||
w.Write(forum_frags[25])
|
||||
}
|
||||
w.Write(forum_frags[26])
|
||||
if tmpl_forum_vars.CurrentUser.ID != 0 {
|
||||
w.Write(forum_frags[27])
|
||||
w.Write(phrases[11])
|
||||
w.Write(forum_frags[28])
|
||||
w.Write(phrases[12])
|
||||
w.Write(forum_frags[29])
|
||||
w.Write(phrases[13])
|
||||
w.Write(forum_frags[30])
|
||||
w.Write(phrases[14])
|
||||
w.Write(forum_frags[31])
|
||||
w.Write(phrases[15])
|
||||
w.Write(forum_frags[32])
|
||||
if tmpl_forum_vars.CurrentUser.Perms.CreateTopic {
|
||||
w.Write(forum_frags[33])
|
||||
w.Write(phrases[16])
|
||||
w.Write(forum_frags[34])
|
||||
w.Write([]byte(tmpl_forum_vars.CurrentUser.Avatar))
|
||||
w.Write(forum_frags[35])
|
||||
w.Write(phrases[17])
|
||||
w.Write(forum_frags[36])
|
||||
w.Write(phrases[18])
|
||||
w.Write(forum_frags[37])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Forum.ID)))
|
||||
w.Write(forum_frags[38])
|
||||
w.Write(phrases[19])
|
||||
w.Write(forum_frags[39])
|
||||
w.Write(phrases[20])
|
||||
w.Write(forum_frags[40])
|
||||
w.Write(phrases[21])
|
||||
w.Write(forum_frags[41])
|
||||
w.Write(phrases[22])
|
||||
w.Write(forum_frags[42])
|
||||
if tmpl_forum_vars.CurrentUser.Perms.UploadFiles {
|
||||
w.Write(forum_frags[43])
|
||||
w.Write(phrases[23])
|
||||
w.Write(forum_frags[44])
|
||||
}
|
||||
w.Write(forum_frags[45])
|
||||
w.Write(phrases[24])
|
||||
w.Write(forum_frags[46])
|
||||
}
|
||||
}
|
||||
w.Write(forum_frags[47])
|
||||
w.Write(phrases[25])
|
||||
w.Write(forum_frags[48])
|
||||
if len(tmpl_forum_vars.ItemList) != 0 {
|
||||
for _, item := range tmpl_forum_vars.ItemList {
|
||||
w.Write(forum_frags[49])
|
||||
w.Write([]byte(strconv.Itoa(item.ID)))
|
||||
w.Write(forum_frags[50])
|
||||
if item.Sticky {
|
||||
w.Write(forum_frags[51])
|
||||
} else {
|
||||
if item.IsClosed {
|
||||
w.Write(forum_frags[52])
|
||||
}
|
||||
}
|
||||
w.Write(forum_frags[53])
|
||||
w.Write([]byte(item.Creator.Link))
|
||||
w.Write(forum_frags[54])
|
||||
w.Write([]byte(item.Creator.Avatar))
|
||||
w.Write(forum_frags[55])
|
||||
w.Write([]byte(item.Creator.Name))
|
||||
w.Write(forum_frags[56])
|
||||
w.Write([]byte(item.Creator.Name))
|
||||
w.Write(forum_frags[57])
|
||||
w.Write([]byte(item.Link))
|
||||
w.Write(forum_frags[58])
|
||||
w.Write([]byte(item.Title))
|
||||
w.Write(forum_frags[59])
|
||||
w.Write([]byte(item.Title))
|
||||
w.Write(forum_frags[60])
|
||||
w.Write([]byte(item.Creator.Link))
|
||||
w.Write(forum_frags[61])
|
||||
w.Write([]byte(item.Creator.Name))
|
||||
w.Write(forum_frags[62])
|
||||
w.Write([]byte(item.Creator.Name))
|
||||
w.Write(forum_frags[63])
|
||||
if item.IsClosed {
|
||||
w.Write(forum_frags[64])
|
||||
w.Write(phrases[26])
|
||||
w.Write(forum_frags[65])
|
||||
}
|
||||
if item.Sticky {
|
||||
w.Write(forum_frags[66])
|
||||
w.Write(phrases[27])
|
||||
w.Write(forum_frags[67])
|
||||
}
|
||||
w.Write(forum_frags[68])
|
||||
w.Write([]byte(strconv.Itoa(item.PostCount)))
|
||||
w.Write(forum_frags[69])
|
||||
w.Write([]byte(strconv.Itoa(item.LikeCount)))
|
||||
w.Write(forum_frags[70])
|
||||
if item.Sticky {
|
||||
w.Write(forum_frags[71])
|
||||
} else {
|
||||
if item.IsClosed {
|
||||
w.Write(forum_frags[72])
|
||||
}
|
||||
}
|
||||
w.Write(forum_frags[73])
|
||||
w.Write([]byte(item.LastUser.Link))
|
||||
w.Write(forum_frags[74])
|
||||
w.Write([]byte(item.LastUser.Avatar))
|
||||
w.Write(forum_frags[75])
|
||||
w.Write([]byte(item.LastUser.Name))
|
||||
w.Write(forum_frags[76])
|
||||
w.Write([]byte(item.LastUser.Name))
|
||||
w.Write(forum_frags[77])
|
||||
w.Write([]byte(item.LastUser.Link))
|
||||
w.Write(forum_frags[78])
|
||||
w.Write([]byte(item.LastUser.Name))
|
||||
w.Write(forum_frags[79])
|
||||
w.Write([]byte(item.LastUser.Name))
|
||||
w.Write(forum_frags[80])
|
||||
w.Write([]byte(item.RelativeLastReplyAt))
|
||||
w.Write(forum_frags[81])
|
||||
}
|
||||
} else {
|
||||
w.Write(forum_frags[82])
|
||||
w.Write(phrases[28])
|
||||
if tmpl_forum_vars.CurrentUser.Perms.CreateTopic {
|
||||
w.Write(forum_frags[83])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Forum.ID)))
|
||||
w.Write(forum_frags[84])
|
||||
w.Write(phrases[29])
|
||||
w.Write(forum_frags[85])
|
||||
}
|
||||
w.Write(forum_frags[86])
|
||||
}
|
||||
w.Write(forum_frags[87])
|
||||
if tmpl_forum_vars.LastPage > 1 {
|
||||
w.Write(paginator_frags[0])
|
||||
if tmpl_forum_vars.Page > 1 {
|
||||
w.Write(paginator_frags[1])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Page - 1)))
|
||||
w.Write(paginator_frags[2])
|
||||
w.Write(phrases[30])
|
||||
w.Write(paginator_frags[3])
|
||||
w.Write(phrases[31])
|
||||
w.Write(paginator_frags[4])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Page - 1)))
|
||||
w.Write(paginator_frags[5])
|
||||
}
|
||||
if len(tmpl_forum_vars.PageList) != 0 {
|
||||
for _, item := range tmpl_forum_vars.PageList {
|
||||
w.Write(paginator_frags[6])
|
||||
w.Write([]byte(strconv.Itoa(item)))
|
||||
w.Write(paginator_frags[7])
|
||||
w.Write([]byte(strconv.Itoa(item)))
|
||||
w.Write(paginator_frags[8])
|
||||
}
|
||||
}
|
||||
if tmpl_forum_vars.LastPage != tmpl_forum_vars.Page {
|
||||
w.Write(paginator_frags[9])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Page + 1)))
|
||||
w.Write(paginator_frags[10])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Page + 1)))
|
||||
w.Write(paginator_frags[11])
|
||||
w.Write(phrases[32])
|
||||
w.Write(paginator_frags[12])
|
||||
w.Write(phrases[33])
|
||||
w.Write(paginator_frags[13])
|
||||
}
|
||||
w.Write(paginator_frags[14])
|
||||
}
|
||||
w.Write(forum_frags[88])
|
||||
w.Write(footer_frags[0])
|
||||
w.Write([]byte(common.BuildWidget("footer",tmpl_forum_vars.Header)))
|
||||
w.Write(footer_frags[1])
|
||||
w.Write(phrases[34])
|
||||
w.Write(footer_frags[2])
|
||||
w.Write(phrases[35])
|
||||
w.Write(footer_frags[3])
|
||||
w.Write(phrases[36])
|
||||
w.Write(footer_frags[4])
|
||||
if len(tmpl_forum_vars.Header.Themes) != 0 {
|
||||
for _, item := range tmpl_forum_vars.Header.Themes {
|
||||
if !item.HideFromThemes {
|
||||
w.Write(footer_frags[5])
|
||||
w.Write([]byte(item.Name))
|
||||
w.Write(footer_frags[6])
|
||||
if tmpl_forum_vars.Header.Theme.Name == item.Name {
|
||||
w.Write(footer_frags[7])
|
||||
}
|
||||
w.Write(footer_frags[8])
|
||||
w.Write([]byte(item.FriendlyName))
|
||||
w.Write(footer_frags[9])
|
||||
}
|
||||
}
|
||||
}
|
||||
w.Write(footer_frags[10])
|
||||
w.Write([]byte(common.BuildWidget("rightSidebar",tmpl_forum_vars.Header)))
|
||||
w.Write(footer_frags[11])
|
||||
return nil
|
||||
}
|
|
@ -1,174 +0,0 @@
|
|||
// +build !no_templategen
|
||||
|
||||
// Code generated by Gosora. More below:
|
||||
/* This file was automatically generated by the software. Please don't edit it as your changes may be overwritten at any moment. */
|
||||
package main
|
||||
import "./common"
|
||||
import "io"
|
||||
|
||||
var forums_tmpl_phrase_id int
|
||||
|
||||
// nolint
|
||||
func init() {
|
||||
common.Template_forums_handle = Template_forums
|
||||
common.Ctemplates = append(common.Ctemplates,"forums")
|
||||
common.TmplPtrMap["forums"] = &common.Template_forums_handle
|
||||
common.TmplPtrMap["o_forums"] = Template_forums
|
||||
forums_tmpl_phrase_id = common.RegisterTmplPhraseNames([]string{
|
||||
"menu_hamburger_tooltip",
|
||||
"forums_head",
|
||||
"forums_no_description",
|
||||
"forums_none",
|
||||
"forums_no_forums",
|
||||
"footer_powered_by",
|
||||
"footer_made_with_love",
|
||||
"footer_theme_selector_aria",
|
||||
})
|
||||
}
|
||||
|
||||
// nolint
|
||||
func Template_forums(tmpl_forums_vars common.ForumsPage, w io.Writer) error {
|
||||
var phrases = common.GetTmplPhrasesBytes(forums_tmpl_phrase_id)
|
||||
w.Write(header_frags[0])
|
||||
w.Write([]byte(tmpl_forums_vars.Title))
|
||||
w.Write(header_frags[1])
|
||||
w.Write([]byte(tmpl_forums_vars.Header.Site.Name))
|
||||
w.Write(header_frags[2])
|
||||
w.Write([]byte(tmpl_forums_vars.Header.Theme.Name))
|
||||
w.Write(header_frags[3])
|
||||
if len(tmpl_forums_vars.Header.Stylesheets) != 0 {
|
||||
for _, item := range tmpl_forums_vars.Header.Stylesheets {
|
||||
w.Write(header_frags[4])
|
||||
w.Write([]byte(item))
|
||||
w.Write(header_frags[5])
|
||||
}
|
||||
}
|
||||
w.Write(header_frags[6])
|
||||
if len(tmpl_forums_vars.Header.Scripts) != 0 {
|
||||
for _, item := range tmpl_forums_vars.Header.Scripts {
|
||||
w.Write(header_frags[7])
|
||||
w.Write([]byte(item))
|
||||
w.Write(header_frags[8])
|
||||
}
|
||||
}
|
||||
w.Write(header_frags[9])
|
||||
w.Write([]byte(tmpl_forums_vars.CurrentUser.Session))
|
||||
w.Write(header_frags[10])
|
||||
w.Write([]byte(tmpl_forums_vars.Header.Site.URL))
|
||||
w.Write(header_frags[11])
|
||||
if tmpl_forums_vars.Header.MetaDesc != "" {
|
||||
w.Write(header_frags[12])
|
||||
w.Write([]byte(tmpl_forums_vars.Header.MetaDesc))
|
||||
w.Write(header_frags[13])
|
||||
}
|
||||
w.Write(header_frags[14])
|
||||
if !tmpl_forums_vars.CurrentUser.IsSuperMod {
|
||||
w.Write(header_frags[15])
|
||||
}
|
||||
w.Write(header_frags[16])
|
||||
w.Write([]byte(common.BuildWidget("leftOfNav",tmpl_forums_vars.Header)))
|
||||
w.Write(header_frags[17])
|
||||
w.Write([]byte(tmpl_forums_vars.Header.Site.ShortName))
|
||||
w.Write(header_frags[18])
|
||||
w.Write([]byte(common.BuildWidget("topMenu",tmpl_forums_vars.Header)))
|
||||
w.Write(header_frags[19])
|
||||
w.Write(phrases[0])
|
||||
w.Write(header_frags[20])
|
||||
w.Write([]byte(common.BuildWidget("rightOfNav",tmpl_forums_vars.Header)))
|
||||
w.Write(header_frags[21])
|
||||
if tmpl_forums_vars.Header.Widgets.RightSidebar != "" {
|
||||
w.Write(header_frags[22])
|
||||
}
|
||||
w.Write(header_frags[23])
|
||||
if len(tmpl_forums_vars.Header.NoticeList) != 0 {
|
||||
for _, item := range tmpl_forums_vars.Header.NoticeList {
|
||||
w.Write(notice_frags[0])
|
||||
w.Write([]byte(item))
|
||||
w.Write(notice_frags[1])
|
||||
}
|
||||
}
|
||||
w.Write(header_frags[24])
|
||||
w.Write(forums_frags[0])
|
||||
w.Write(phrases[1])
|
||||
w.Write(forums_frags[1])
|
||||
if len(tmpl_forums_vars.ItemList) != 0 {
|
||||
for _, item := range tmpl_forums_vars.ItemList {
|
||||
w.Write(forums_frags[2])
|
||||
if item.Desc != "" || item.LastTopic.Title != "" {
|
||||
w.Write(forums_frags[3])
|
||||
}
|
||||
w.Write(forums_frags[4])
|
||||
w.Write([]byte(item.Link))
|
||||
w.Write(forums_frags[5])
|
||||
w.Write([]byte(item.Name))
|
||||
w.Write(forums_frags[6])
|
||||
if item.Desc != "" {
|
||||
w.Write(forums_frags[7])
|
||||
w.Write([]byte(item.Desc))
|
||||
w.Write(forums_frags[8])
|
||||
} else {
|
||||
w.Write(forums_frags[9])
|
||||
w.Write(phrases[2])
|
||||
w.Write(forums_frags[10])
|
||||
}
|
||||
w.Write(forums_frags[11])
|
||||
if item.LastReplyer.Avatar != "" {
|
||||
w.Write(forums_frags[12])
|
||||
w.Write([]byte(item.LastReplyer.Avatar))
|
||||
w.Write(forums_frags[13])
|
||||
w.Write([]byte(item.LastReplyer.Name))
|
||||
w.Write(forums_frags[14])
|
||||
w.Write([]byte(item.LastReplyer.Name))
|
||||
w.Write(forums_frags[15])
|
||||
}
|
||||
w.Write(forums_frags[16])
|
||||
w.Write([]byte(item.LastTopic.Link))
|
||||
w.Write(forums_frags[17])
|
||||
if item.LastTopic.Title != "" {
|
||||
w.Write([]byte(item.LastTopic.Title))
|
||||
} else {
|
||||
w.Write(phrases[3])
|
||||
}
|
||||
w.Write(forums_frags[18])
|
||||
if item.LastTopicTime != "" {
|
||||
w.Write(forums_frags[19])
|
||||
w.Write([]byte(item.LastTopicTime))
|
||||
w.Write(forums_frags[20])
|
||||
}
|
||||
w.Write(forums_frags[21])
|
||||
}
|
||||
} else {
|
||||
w.Write(forums_frags[22])
|
||||
w.Write(phrases[4])
|
||||
w.Write(forums_frags[23])
|
||||
}
|
||||
w.Write(forums_frags[24])
|
||||
w.Write(footer_frags[0])
|
||||
w.Write([]byte(common.BuildWidget("footer",tmpl_forums_vars.Header)))
|
||||
w.Write(footer_frags[1])
|
||||
w.Write(phrases[5])
|
||||
w.Write(footer_frags[2])
|
||||
w.Write(phrases[6])
|
||||
w.Write(footer_frags[3])
|
||||
w.Write(phrases[7])
|
||||
w.Write(footer_frags[4])
|
||||
if len(tmpl_forums_vars.Header.Themes) != 0 {
|
||||
for _, item := range tmpl_forums_vars.Header.Themes {
|
||||
if !item.HideFromThemes {
|
||||
w.Write(footer_frags[5])
|
||||
w.Write([]byte(item.Name))
|
||||
w.Write(footer_frags[6])
|
||||
if tmpl_forums_vars.Header.Theme.Name == item.Name {
|
||||
w.Write(footer_frags[7])
|
||||
}
|
||||
w.Write(footer_frags[8])
|
||||
w.Write([]byte(item.FriendlyName))
|
||||
w.Write(footer_frags[9])
|
||||
}
|
||||
}
|
||||
}
|
||||
w.Write(footer_frags[10])
|
||||
w.Write([]byte(common.BuildWidget("rightSidebar",tmpl_forums_vars.Header)))
|
||||
w.Write(footer_frags[11])
|
||||
return nil
|
||||
}
|
|
@ -1,133 +0,0 @@
|
|||
// +build !no_templategen
|
||||
|
||||
// Code generated by Gosora. More below:
|
||||
/* This file was automatically generated by the software. Please don't edit it as your changes may be overwritten at any moment. */
|
||||
package main
|
||||
import "io"
|
||||
import "./common"
|
||||
import "./extend/guilds/lib"
|
||||
import "strconv"
|
||||
|
||||
var guilds_guild_list_tmpl_phrase_id int
|
||||
|
||||
// nolint
|
||||
func init() {
|
||||
common.TmplPtrMap["o_guilds_guild_list"] = Template_guilds_guild_list
|
||||
guilds_guild_list_tmpl_phrase_id = common.RegisterTmplPhraseNames([]string{
|
||||
"menu_hamburger_tooltip",
|
||||
"footer_powered_by",
|
||||
"footer_made_with_love",
|
||||
"footer_theme_selector_aria",
|
||||
})
|
||||
}
|
||||
|
||||
// nolint
|
||||
func Template_guilds_guild_list(tmpl_guilds_guild_list_vars guilds.ListPage, w io.Writer) error {
|
||||
var phrases = common.GetTmplPhrasesBytes(guilds_guild_list_tmpl_phrase_id)
|
||||
w.Write(header_frags[0])
|
||||
w.Write([]byte(tmpl_guilds_guild_list_vars.Title))
|
||||
w.Write(header_frags[1])
|
||||
w.Write([]byte(tmpl_guilds_guild_list_vars.Header.Site.Name))
|
||||
w.Write(header_frags[2])
|
||||
w.Write([]byte(tmpl_guilds_guild_list_vars.Header.Theme.Name))
|
||||
w.Write(header_frags[3])
|
||||
if len(tmpl_guilds_guild_list_vars.Header.Stylesheets) != 0 {
|
||||
for _, item := range tmpl_guilds_guild_list_vars.Header.Stylesheets {
|
||||
w.Write(header_frags[4])
|
||||
w.Write([]byte(item))
|
||||
w.Write(header_frags[5])
|
||||
}
|
||||
}
|
||||
w.Write(header_frags[6])
|
||||
if len(tmpl_guilds_guild_list_vars.Header.Scripts) != 0 {
|
||||
for _, item := range tmpl_guilds_guild_list_vars.Header.Scripts {
|
||||
w.Write(header_frags[7])
|
||||
w.Write([]byte(item))
|
||||
w.Write(header_frags[8])
|
||||
}
|
||||
}
|
||||
w.Write(header_frags[9])
|
||||
w.Write([]byte(tmpl_guilds_guild_list_vars.CurrentUser.Session))
|
||||
w.Write(header_frags[10])
|
||||
w.Write([]byte(tmpl_guilds_guild_list_vars.Header.Site.URL))
|
||||
w.Write(header_frags[11])
|
||||
if tmpl_guilds_guild_list_vars.Header.MetaDesc != "" {
|
||||
w.Write(header_frags[12])
|
||||
w.Write([]byte(tmpl_guilds_guild_list_vars.Header.MetaDesc))
|
||||
w.Write(header_frags[13])
|
||||
}
|
||||
w.Write(header_frags[14])
|
||||
if !tmpl_guilds_guild_list_vars.CurrentUser.IsSuperMod {
|
||||
w.Write(header_frags[15])
|
||||
}
|
||||
w.Write(header_frags[16])
|
||||
w.Write([]byte(common.BuildWidget("leftOfNav",tmpl_guilds_guild_list_vars.Header)))
|
||||
w.Write(header_frags[17])
|
||||
w.Write([]byte(tmpl_guilds_guild_list_vars.Header.Site.ShortName))
|
||||
w.Write(header_frags[18])
|
||||
w.Write([]byte(common.BuildWidget("topMenu",tmpl_guilds_guild_list_vars.Header)))
|
||||
w.Write(header_frags[19])
|
||||
w.Write(phrases[0])
|
||||
w.Write(header_frags[20])
|
||||
w.Write([]byte(common.BuildWidget("rightOfNav",tmpl_guilds_guild_list_vars.Header)))
|
||||
w.Write(header_frags[21])
|
||||
if tmpl_guilds_guild_list_vars.Header.Widgets.RightSidebar != "" {
|
||||
w.Write(header_frags[22])
|
||||
}
|
||||
w.Write(header_frags[23])
|
||||
if len(tmpl_guilds_guild_list_vars.Header.NoticeList) != 0 {
|
||||
for _, item := range tmpl_guilds_guild_list_vars.Header.NoticeList {
|
||||
w.Write(notice_frags[0])
|
||||
w.Write([]byte(item))
|
||||
w.Write(notice_frags[1])
|
||||
}
|
||||
}
|
||||
w.Write(header_frags[24])
|
||||
w.Write(guilds_guild_list_frags[0])
|
||||
if len(tmpl_guilds_guild_list_vars.GuildList) != 0 {
|
||||
for _, item := range tmpl_guilds_guild_list_vars.GuildList {
|
||||
w.Write(guilds_guild_list_frags[1])
|
||||
w.Write([]byte(item.Link))
|
||||
w.Write(guilds_guild_list_frags[2])
|
||||
w.Write([]byte(item.Name))
|
||||
w.Write(guilds_guild_list_frags[3])
|
||||
w.Write([]byte(item.Desc))
|
||||
w.Write(guilds_guild_list_frags[4])
|
||||
w.Write([]byte(strconv.Itoa(item.MemberCount)))
|
||||
w.Write(guilds_guild_list_frags[5])
|
||||
w.Write([]byte(item.LastUpdateTime))
|
||||
w.Write(guilds_guild_list_frags[6])
|
||||
}
|
||||
} else {
|
||||
w.Write(guilds_guild_list_frags[7])
|
||||
}
|
||||
w.Write(guilds_guild_list_frags[8])
|
||||
w.Write(footer_frags[0])
|
||||
w.Write([]byte(common.BuildWidget("footer",tmpl_guilds_guild_list_vars.Header)))
|
||||
w.Write(footer_frags[1])
|
||||
w.Write(phrases[1])
|
||||
w.Write(footer_frags[2])
|
||||
w.Write(phrases[2])
|
||||
w.Write(footer_frags[3])
|
||||
w.Write(phrases[3])
|
||||
w.Write(footer_frags[4])
|
||||
if len(tmpl_guilds_guild_list_vars.Header.Themes) != 0 {
|
||||
for _, item := range tmpl_guilds_guild_list_vars.Header.Themes {
|
||||
if !item.HideFromThemes {
|
||||
w.Write(footer_frags[5])
|
||||
w.Write([]byte(item.Name))
|
||||
w.Write(footer_frags[6])
|
||||
if tmpl_guilds_guild_list_vars.Header.Theme.Name == item.Name {
|
||||
w.Write(footer_frags[7])
|
||||
}
|
||||
w.Write(footer_frags[8])
|
||||
w.Write([]byte(item.FriendlyName))
|
||||
w.Write(footer_frags[9])
|
||||
}
|
||||
}
|
||||
}
|
||||
w.Write(footer_frags[10])
|
||||
w.Write([]byte(common.BuildWidget("rightSidebar",tmpl_guilds_guild_list_vars.Header)))
|
||||
w.Write(footer_frags[11])
|
||||
return nil
|
||||
}
|
|
@ -1,154 +0,0 @@
|
|||
// +build !no_templategen
|
||||
|
||||
// Code generated by Gosora. More below:
|
||||
/* This file was automatically generated by the software. Please don't edit it as your changes may be overwritten at any moment. */
|
||||
package main
|
||||
import "io"
|
||||
import "./common"
|
||||
|
||||
var ip_search_tmpl_phrase_id int
|
||||
|
||||
// nolint
|
||||
func init() {
|
||||
common.Template_ip_search_handle = Template_ip_search
|
||||
common.Ctemplates = append(common.Ctemplates,"ip_search")
|
||||
common.TmplPtrMap["ip_search"] = &common.Template_ip_search_handle
|
||||
common.TmplPtrMap["o_ip_search"] = Template_ip_search
|
||||
ip_search_tmpl_phrase_id = common.RegisterTmplPhraseNames([]string{
|
||||
"menu_hamburger_tooltip",
|
||||
"ip_search_head",
|
||||
"ip_search_search_button",
|
||||
"ip_search_no_users",
|
||||
"footer_powered_by",
|
||||
"footer_made_with_love",
|
||||
"footer_theme_selector_aria",
|
||||
})
|
||||
}
|
||||
|
||||
// nolint
|
||||
func Template_ip_search(tmpl_ip_search_vars common.IPSearchPage, w io.Writer) error {
|
||||
var phrases = common.GetTmplPhrasesBytes(ip_search_tmpl_phrase_id)
|
||||
w.Write(header_frags[0])
|
||||
w.Write([]byte(tmpl_ip_search_vars.Title))
|
||||
w.Write(header_frags[1])
|
||||
w.Write([]byte(tmpl_ip_search_vars.Header.Site.Name))
|
||||
w.Write(header_frags[2])
|
||||
w.Write([]byte(tmpl_ip_search_vars.Header.Theme.Name))
|
||||
w.Write(header_frags[3])
|
||||
if len(tmpl_ip_search_vars.Header.Stylesheets) != 0 {
|
||||
for _, item := range tmpl_ip_search_vars.Header.Stylesheets {
|
||||
w.Write(header_frags[4])
|
||||
w.Write([]byte(item))
|
||||
w.Write(header_frags[5])
|
||||
}
|
||||
}
|
||||
w.Write(header_frags[6])
|
||||
if len(tmpl_ip_search_vars.Header.Scripts) != 0 {
|
||||
for _, item := range tmpl_ip_search_vars.Header.Scripts {
|
||||
w.Write(header_frags[7])
|
||||
w.Write([]byte(item))
|
||||
w.Write(header_frags[8])
|
||||
}
|
||||
}
|
||||
w.Write(header_frags[9])
|
||||
w.Write([]byte(tmpl_ip_search_vars.CurrentUser.Session))
|
||||
w.Write(header_frags[10])
|
||||
w.Write([]byte(tmpl_ip_search_vars.Header.Site.URL))
|
||||
w.Write(header_frags[11])
|
||||
if tmpl_ip_search_vars.Header.MetaDesc != "" {
|
||||
w.Write(header_frags[12])
|
||||
w.Write([]byte(tmpl_ip_search_vars.Header.MetaDesc))
|
||||
w.Write(header_frags[13])
|
||||
}
|
||||
w.Write(header_frags[14])
|
||||
if !tmpl_ip_search_vars.CurrentUser.IsSuperMod {
|
||||
w.Write(header_frags[15])
|
||||
}
|
||||
w.Write(header_frags[16])
|
||||
w.Write([]byte(common.BuildWidget("leftOfNav",tmpl_ip_search_vars.Header)))
|
||||
w.Write(header_frags[17])
|
||||
w.Write([]byte(tmpl_ip_search_vars.Header.Site.ShortName))
|
||||
w.Write(header_frags[18])
|
||||
w.Write([]byte(common.BuildWidget("topMenu",tmpl_ip_search_vars.Header)))
|
||||
w.Write(header_frags[19])
|
||||
w.Write(phrases[0])
|
||||
w.Write(header_frags[20])
|
||||
w.Write([]byte(common.BuildWidget("rightOfNav",tmpl_ip_search_vars.Header)))
|
||||
w.Write(header_frags[21])
|
||||
if tmpl_ip_search_vars.Header.Widgets.RightSidebar != "" {
|
||||
w.Write(header_frags[22])
|
||||
}
|
||||
w.Write(header_frags[23])
|
||||
if len(tmpl_ip_search_vars.Header.NoticeList) != 0 {
|
||||
for _, item := range tmpl_ip_search_vars.Header.NoticeList {
|
||||
w.Write(notice_frags[0])
|
||||
w.Write([]byte(item))
|
||||
w.Write(notice_frags[1])
|
||||
}
|
||||
}
|
||||
w.Write(header_frags[24])
|
||||
w.Write(ip_search_frags[0])
|
||||
w.Write(phrases[1])
|
||||
w.Write(ip_search_frags[1])
|
||||
if tmpl_ip_search_vars.IP != "" {
|
||||
w.Write(ip_search_frags[2])
|
||||
w.Write([]byte(tmpl_ip_search_vars.IP))
|
||||
w.Write(ip_search_frags[3])
|
||||
}
|
||||
w.Write(ip_search_frags[4])
|
||||
w.Write(phrases[2])
|
||||
w.Write(ip_search_frags[5])
|
||||
if tmpl_ip_search_vars.IP != "" {
|
||||
w.Write(ip_search_frags[6])
|
||||
if len(tmpl_ip_search_vars.ItemList) != 0 {
|
||||
for _, item := range tmpl_ip_search_vars.ItemList {
|
||||
w.Write(ip_search_frags[7])
|
||||
w.Write([]byte(item.Avatar))
|
||||
w.Write(ip_search_frags[8])
|
||||
w.Write([]byte(item.Avatar))
|
||||
w.Write(ip_search_frags[9])
|
||||
w.Write([]byte(item.Name))
|
||||
w.Write(ip_search_frags[10])
|
||||
w.Write([]byte(item.Link))
|
||||
w.Write(ip_search_frags[11])
|
||||
w.Write([]byte(item.Name))
|
||||
w.Write(ip_search_frags[12])
|
||||
}
|
||||
} else {
|
||||
w.Write(ip_search_frags[13])
|
||||
w.Write(phrases[3])
|
||||
w.Write(ip_search_frags[14])
|
||||
}
|
||||
|
||||
w.Write(ip_search_frags[15])
|
||||
}
|
||||
w.Write(ip_search_frags[16])
|
||||
w.Write(footer_frags[0])
|
||||
w.Write([]byte(common.BuildWidget("footer",tmpl_ip_search_vars.Header)))
|
||||
w.Write(footer_frags[1])
|
||||
w.Write(phrases[4])
|
||||
w.Write(footer_frags[2])
|
||||
w.Write(phrases[5])
|
||||
w.Write(footer_frags[3])
|
||||
w.Write(phrases[6])
|
||||
w.Write(footer_frags[4])
|
||||
if len(tmpl_ip_search_vars.Header.Themes) != 0 {
|
||||
for _, item := range tmpl_ip_search_vars.Header.Themes {
|
||||
if !item.HideFromThemes {
|
||||
w.Write(footer_frags[5])
|
||||
w.Write([]byte(item.Name))
|
||||
w.Write(footer_frags[6])
|
||||
if tmpl_ip_search_vars.Header.Theme.Name == item.Name {
|
||||
w.Write(footer_frags[7])
|
||||
}
|
||||
w.Write(footer_frags[8])
|
||||
w.Write([]byte(item.FriendlyName))
|
||||
w.Write(footer_frags[9])
|
||||
}
|
||||
}
|
||||
}
|
||||
w.Write(footer_frags[10])
|
||||
w.Write([]byte(common.BuildWidget("rightSidebar",tmpl_ip_search_vars.Header)))
|
||||
w.Write(footer_frags[11])
|
||||
return nil
|
||||
}
|
1720
template_list.go
1720
template_list.go
File diff suppressed because it is too large
Load Diff
|
@ -1,134 +0,0 @@
|
|||
// +build !no_templategen
|
||||
|
||||
// Code generated by Gosora. More below:
|
||||
/* This file was automatically generated by the software. Please don't edit it as your changes may be overwritten at any moment. */
|
||||
package main
|
||||
import "io"
|
||||
import "./common"
|
||||
|
||||
var login_tmpl_phrase_id int
|
||||
|
||||
// nolint
|
||||
func init() {
|
||||
common.Template_login_handle = Template_login
|
||||
common.Ctemplates = append(common.Ctemplates,"login")
|
||||
common.TmplPtrMap["login"] = &common.Template_login_handle
|
||||
common.TmplPtrMap["o_login"] = Template_login
|
||||
login_tmpl_phrase_id = common.RegisterTmplPhraseNames([]string{
|
||||
"menu_hamburger_tooltip",
|
||||
"login_head",
|
||||
"login_account_name",
|
||||
"login_account_name",
|
||||
"login_account_password",
|
||||
"login_submit_button",
|
||||
"login_no_account",
|
||||
"footer_powered_by",
|
||||
"footer_made_with_love",
|
||||
"footer_theme_selector_aria",
|
||||
})
|
||||
}
|
||||
|
||||
// nolint
|
||||
func Template_login(tmpl_login_vars common.Page, w io.Writer) error {
|
||||
var phrases = common.GetTmplPhrasesBytes(login_tmpl_phrase_id)
|
||||
w.Write(header_frags[0])
|
||||
w.Write([]byte(tmpl_login_vars.Title))
|
||||
w.Write(header_frags[1])
|
||||
w.Write([]byte(tmpl_login_vars.Header.Site.Name))
|
||||
w.Write(header_frags[2])
|
||||
w.Write([]byte(tmpl_login_vars.Header.Theme.Name))
|
||||
w.Write(header_frags[3])
|
||||
if len(tmpl_login_vars.Header.Stylesheets) != 0 {
|
||||
for _, item := range tmpl_login_vars.Header.Stylesheets {
|
||||
w.Write(header_frags[4])
|
||||
w.Write([]byte(item))
|
||||
w.Write(header_frags[5])
|
||||
}
|
||||
}
|
||||
w.Write(header_frags[6])
|
||||
if len(tmpl_login_vars.Header.Scripts) != 0 {
|
||||
for _, item := range tmpl_login_vars.Header.Scripts {
|
||||
w.Write(header_frags[7])
|
||||
w.Write([]byte(item))
|
||||
w.Write(header_frags[8])
|
||||
}
|
||||
}
|
||||
w.Write(header_frags[9])
|
||||
w.Write([]byte(tmpl_login_vars.CurrentUser.Session))
|
||||
w.Write(header_frags[10])
|
||||
w.Write([]byte(tmpl_login_vars.Header.Site.URL))
|
||||
w.Write(header_frags[11])
|
||||
if tmpl_login_vars.Header.MetaDesc != "" {
|
||||
w.Write(header_frags[12])
|
||||
w.Write([]byte(tmpl_login_vars.Header.MetaDesc))
|
||||
w.Write(header_frags[13])
|
||||
}
|
||||
w.Write(header_frags[14])
|
||||
if !tmpl_login_vars.CurrentUser.IsSuperMod {
|
||||
w.Write(header_frags[15])
|
||||
}
|
||||
w.Write(header_frags[16])
|
||||
w.Write([]byte(common.BuildWidget("leftOfNav",tmpl_login_vars.Header)))
|
||||
w.Write(header_frags[17])
|
||||
w.Write([]byte(tmpl_login_vars.Header.Site.ShortName))
|
||||
w.Write(header_frags[18])
|
||||
w.Write([]byte(common.BuildWidget("topMenu",tmpl_login_vars.Header)))
|
||||
w.Write(header_frags[19])
|
||||
w.Write(phrases[0])
|
||||
w.Write(header_frags[20])
|
||||
w.Write([]byte(common.BuildWidget("rightOfNav",tmpl_login_vars.Header)))
|
||||
w.Write(header_frags[21])
|
||||
if tmpl_login_vars.Header.Widgets.RightSidebar != "" {
|
||||
w.Write(header_frags[22])
|
||||
}
|
||||
w.Write(header_frags[23])
|
||||
if len(tmpl_login_vars.Header.NoticeList) != 0 {
|
||||
for _, item := range tmpl_login_vars.Header.NoticeList {
|
||||
w.Write(notice_frags[0])
|
||||
w.Write([]byte(item))
|
||||
w.Write(notice_frags[1])
|
||||
}
|
||||
}
|
||||
w.Write(header_frags[24])
|
||||
w.Write(login_frags[0])
|
||||
w.Write(phrases[1])
|
||||
w.Write(login_frags[1])
|
||||
w.Write(phrases[2])
|
||||
w.Write(login_frags[2])
|
||||
w.Write(phrases[3])
|
||||
w.Write(login_frags[3])
|
||||
w.Write(phrases[4])
|
||||
w.Write(login_frags[4])
|
||||
w.Write(phrases[5])
|
||||
w.Write(login_frags[5])
|
||||
w.Write(phrases[6])
|
||||
w.Write(login_frags[6])
|
||||
w.Write(footer_frags[0])
|
||||
w.Write([]byte(common.BuildWidget("footer",tmpl_login_vars.Header)))
|
||||
w.Write(footer_frags[1])
|
||||
w.Write(phrases[7])
|
||||
w.Write(footer_frags[2])
|
||||
w.Write(phrases[8])
|
||||
w.Write(footer_frags[3])
|
||||
w.Write(phrases[9])
|
||||
w.Write(footer_frags[4])
|
||||
if len(tmpl_login_vars.Header.Themes) != 0 {
|
||||
for _, item := range tmpl_login_vars.Header.Themes {
|
||||
if !item.HideFromThemes {
|
||||
w.Write(footer_frags[5])
|
||||
w.Write([]byte(item.Name))
|
||||
w.Write(footer_frags[6])
|
||||
if tmpl_login_vars.Header.Theme.Name == item.Name {
|
||||
w.Write(footer_frags[7])
|
||||
}
|
||||
w.Write(footer_frags[8])
|
||||
w.Write([]byte(item.FriendlyName))
|
||||
w.Write(footer_frags[9])
|
||||
}
|
||||
}
|
||||
}
|
||||
w.Write(footer_frags[10])
|
||||
w.Write([]byte(common.BuildWidget("rightSidebar",tmpl_login_vars.Header)))
|
||||
w.Write(footer_frags[11])
|
||||
return nil
|
||||
}
|
|
@ -1,347 +0,0 @@
|
|||
// +build !no_templategen
|
||||
|
||||
// Code generated by Gosora. More below:
|
||||
/* This file was automatically generated by the software. Please don't edit it as your changes may be overwritten at any moment. */
|
||||
package main
|
||||
import "strconv"
|
||||
import "io"
|
||||
import "./common"
|
||||
|
||||
var profile_tmpl_phrase_id int
|
||||
|
||||
// nolint
|
||||
func init() {
|
||||
common.Template_profile_handle = Template_profile
|
||||
common.Ctemplates = append(common.Ctemplates,"profile")
|
||||
common.TmplPtrMap["profile"] = &common.Template_profile_handle
|
||||
common.TmplPtrMap["o_profile"] = Template_profile
|
||||
profile_tmpl_phrase_id = common.RegisterTmplPhraseNames([]string{
|
||||
"menu_hamburger_tooltip",
|
||||
"profile_login_for_options",
|
||||
"profile_add_friend",
|
||||
"profile_unban",
|
||||
"profile_ban",
|
||||
"profile_report_user_aria",
|
||||
"profile_report_user_tooltip",
|
||||
"profile_ban_user_head",
|
||||
"profile_ban_user_notice",
|
||||
"profile_ban_user_days",
|
||||
"profile_ban_user_weeks",
|
||||
"profile_ban_user_months",
|
||||
"profile_ban_user_reason",
|
||||
"profile_ban_user_button",
|
||||
"profile_comments_head",
|
||||
"profile_comments_edit_tooltip",
|
||||
"profile_comments_edit_aria",
|
||||
"profile_comments_delete_tooltip",
|
||||
"profile_comments_delete_aria",
|
||||
"profile_comments_report_tooltip",
|
||||
"profile_comments_report_aria",
|
||||
"profile_comments_edit_tooltip",
|
||||
"profile_comments_edit_aria",
|
||||
"profile_comments_delete_tooltip",
|
||||
"profile_comments_delete_aria",
|
||||
"profile_comments_report_tooltip",
|
||||
"profile_comments_report_aria",
|
||||
"profile_comments_form_content",
|
||||
"profile_comments_form_button",
|
||||
"footer_powered_by",
|
||||
"footer_made_with_love",
|
||||
"footer_theme_selector_aria",
|
||||
})
|
||||
}
|
||||
|
||||
// nolint
|
||||
func Template_profile(tmpl_profile_vars common.ProfilePage, w io.Writer) error {
|
||||
var phrases = common.GetTmplPhrasesBytes(profile_tmpl_phrase_id)
|
||||
w.Write(header_frags[0])
|
||||
w.Write([]byte(tmpl_profile_vars.Title))
|
||||
w.Write(header_frags[1])
|
||||
w.Write([]byte(tmpl_profile_vars.Header.Site.Name))
|
||||
w.Write(header_frags[2])
|
||||
w.Write([]byte(tmpl_profile_vars.Header.Theme.Name))
|
||||
w.Write(header_frags[3])
|
||||
if len(tmpl_profile_vars.Header.Stylesheets) != 0 {
|
||||
for _, item := range tmpl_profile_vars.Header.Stylesheets {
|
||||
w.Write(header_frags[4])
|
||||
w.Write([]byte(item))
|
||||
w.Write(header_frags[5])
|
||||
}
|
||||
}
|
||||
w.Write(header_frags[6])
|
||||
if len(tmpl_profile_vars.Header.Scripts) != 0 {
|
||||
for _, item := range tmpl_profile_vars.Header.Scripts {
|
||||
w.Write(header_frags[7])
|
||||
w.Write([]byte(item))
|
||||
w.Write(header_frags[8])
|
||||
}
|
||||
}
|
||||
w.Write(header_frags[9])
|
||||
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
|
||||
w.Write(header_frags[10])
|
||||
w.Write([]byte(tmpl_profile_vars.Header.Site.URL))
|
||||
w.Write(header_frags[11])
|
||||
if tmpl_profile_vars.Header.MetaDesc != "" {
|
||||
w.Write(header_frags[12])
|
||||
w.Write([]byte(tmpl_profile_vars.Header.MetaDesc))
|
||||
w.Write(header_frags[13])
|
||||
}
|
||||
w.Write(header_frags[14])
|
||||
if !tmpl_profile_vars.CurrentUser.IsSuperMod {
|
||||
w.Write(header_frags[15])
|
||||
}
|
||||
w.Write(header_frags[16])
|
||||
w.Write([]byte(common.BuildWidget("leftOfNav",tmpl_profile_vars.Header)))
|
||||
w.Write(header_frags[17])
|
||||
w.Write([]byte(tmpl_profile_vars.Header.Site.ShortName))
|
||||
w.Write(header_frags[18])
|
||||
w.Write([]byte(common.BuildWidget("topMenu",tmpl_profile_vars.Header)))
|
||||
w.Write(header_frags[19])
|
||||
w.Write(phrases[0])
|
||||
w.Write(header_frags[20])
|
||||
w.Write([]byte(common.BuildWidget("rightOfNav",tmpl_profile_vars.Header)))
|
||||
w.Write(header_frags[21])
|
||||
if tmpl_profile_vars.Header.Widgets.RightSidebar != "" {
|
||||
w.Write(header_frags[22])
|
||||
}
|
||||
w.Write(header_frags[23])
|
||||
if len(tmpl_profile_vars.Header.NoticeList) != 0 {
|
||||
for _, item := range tmpl_profile_vars.Header.NoticeList {
|
||||
w.Write(notice_frags[0])
|
||||
w.Write([]byte(item))
|
||||
w.Write(notice_frags[1])
|
||||
}
|
||||
}
|
||||
w.Write(header_frags[24])
|
||||
w.Write(profile_frags[0])
|
||||
w.Write([]byte(tmpl_profile_vars.ProfileOwner.Avatar))
|
||||
w.Write(profile_frags[1])
|
||||
w.Write([]byte(tmpl_profile_vars.ProfileOwner.Name))
|
||||
w.Write(profile_frags[2])
|
||||
w.Write([]byte(tmpl_profile_vars.ProfileOwner.Name))
|
||||
w.Write(profile_frags[3])
|
||||
w.Write([]byte(tmpl_profile_vars.ProfileOwner.Name))
|
||||
w.Write(profile_frags[4])
|
||||
w.Write([]byte(tmpl_profile_vars.ProfileOwner.Name))
|
||||
w.Write(profile_frags[5])
|
||||
if tmpl_profile_vars.ProfileOwner.Tag != "" {
|
||||
w.Write(profile_frags[6])
|
||||
w.Write([]byte(tmpl_profile_vars.ProfileOwner.Tag))
|
||||
w.Write(profile_frags[7])
|
||||
w.Write([]byte(tmpl_profile_vars.ProfileOwner.Tag))
|
||||
w.Write(profile_frags[8])
|
||||
}
|
||||
w.Write(profile_frags[9])
|
||||
if !tmpl_profile_vars.CurrentUser.Loggedin {
|
||||
w.Write(profile_frags[10])
|
||||
w.Write(phrases[1])
|
||||
w.Write(profile_frags[11])
|
||||
} else {
|
||||
w.Write(profile_frags[12])
|
||||
w.Write(phrases[2])
|
||||
w.Write(profile_frags[13])
|
||||
if tmpl_profile_vars.CurrentUser.IsSuperMod && !tmpl_profile_vars.ProfileOwner.IsSuperMod {
|
||||
w.Write(profile_frags[14])
|
||||
if tmpl_profile_vars.ProfileOwner.IsBanned {
|
||||
w.Write(profile_frags[15])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_profile_vars.ProfileOwner.ID)))
|
||||
w.Write(profile_frags[16])
|
||||
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
|
||||
w.Write(profile_frags[17])
|
||||
w.Write(phrases[3])
|
||||
w.Write(profile_frags[18])
|
||||
} else {
|
||||
w.Write(profile_frags[19])
|
||||
w.Write(phrases[4])
|
||||
w.Write(profile_frags[20])
|
||||
}
|
||||
w.Write(profile_frags[21])
|
||||
}
|
||||
w.Write(profile_frags[22])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_profile_vars.ProfileOwner.ID)))
|
||||
w.Write(profile_frags[23])
|
||||
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
|
||||
w.Write(profile_frags[24])
|
||||
w.Write(phrases[5])
|
||||
w.Write(profile_frags[25])
|
||||
w.Write(phrases[6])
|
||||
w.Write(profile_frags[26])
|
||||
}
|
||||
w.Write(profile_frags[27])
|
||||
if tmpl_profile_vars.CurrentUser.Perms.BanUsers {
|
||||
w.Write(profile_frags[28])
|
||||
w.Write(phrases[7])
|
||||
w.Write(profile_frags[29])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_profile_vars.ProfileOwner.ID)))
|
||||
w.Write(profile_frags[30])
|
||||
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
|
||||
w.Write(profile_frags[31])
|
||||
w.Write(profile_frags[32])
|
||||
w.Write(phrases[8])
|
||||
w.Write(profile_frags[33])
|
||||
w.Write(phrases[9])
|
||||
w.Write(profile_frags[34])
|
||||
w.Write(phrases[10])
|
||||
w.Write(profile_frags[35])
|
||||
w.Write(phrases[11])
|
||||
w.Write(profile_frags[36])
|
||||
w.Write(phrases[12])
|
||||
w.Write(profile_frags[37])
|
||||
w.Write(phrases[13])
|
||||
w.Write(profile_frags[38])
|
||||
}
|
||||
w.Write(profile_frags[39])
|
||||
w.Write(phrases[14])
|
||||
w.Write(profile_frags[40])
|
||||
if tmpl_profile_vars.Header.Theme.BgAvatars {
|
||||
if len(tmpl_profile_vars.ItemList) != 0 {
|
||||
for _, item := range tmpl_profile_vars.ItemList {
|
||||
w.Write(profile_comments_row_frags[0])
|
||||
w.Write([]byte(item.ClassName))
|
||||
w.Write(profile_comments_row_frags[1])
|
||||
w.Write([]byte(item.Avatar))
|
||||
w.Write(profile_comments_row_frags[2])
|
||||
if item.ContentLines <= 5 {
|
||||
w.Write(profile_comments_row_frags[3])
|
||||
}
|
||||
w.Write(profile_comments_row_frags[4])
|
||||
w.Write([]byte(item.ContentHtml))
|
||||
w.Write(profile_comments_row_frags[5])
|
||||
w.Write([]byte(item.UserLink))
|
||||
w.Write(profile_comments_row_frags[6])
|
||||
w.Write([]byte(item.CreatedByName))
|
||||
w.Write(profile_comments_row_frags[7])
|
||||
if tmpl_profile_vars.CurrentUser.IsMod {
|
||||
w.Write(profile_comments_row_frags[8])
|
||||
w.Write([]byte(strconv.Itoa(item.ID)))
|
||||
w.Write(profile_comments_row_frags[9])
|
||||
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
|
||||
w.Write(profile_comments_row_frags[10])
|
||||
w.Write(phrases[15])
|
||||
w.Write(profile_comments_row_frags[11])
|
||||
w.Write(phrases[16])
|
||||
w.Write(profile_comments_row_frags[12])
|
||||
w.Write([]byte(strconv.Itoa(item.ID)))
|
||||
w.Write(profile_comments_row_frags[13])
|
||||
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
|
||||
w.Write(profile_comments_row_frags[14])
|
||||
w.Write(phrases[17])
|
||||
w.Write(profile_comments_row_frags[15])
|
||||
w.Write(phrases[18])
|
||||
w.Write(profile_comments_row_frags[16])
|
||||
}
|
||||
w.Write(profile_comments_row_frags[17])
|
||||
w.Write([]byte(strconv.Itoa(item.ID)))
|
||||
w.Write(profile_comments_row_frags[18])
|
||||
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
|
||||
w.Write(profile_comments_row_frags[19])
|
||||
w.Write(phrases[19])
|
||||
w.Write(profile_comments_row_frags[20])
|
||||
w.Write(phrases[20])
|
||||
w.Write(profile_comments_row_frags[21])
|
||||
if item.Tag != "" {
|
||||
w.Write(profile_comments_row_frags[22])
|
||||
w.Write([]byte(item.Tag))
|
||||
w.Write(profile_comments_row_frags[23])
|
||||
}
|
||||
w.Write(profile_comments_row_frags[24])
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if len(tmpl_profile_vars.ItemList) != 0 {
|
||||
for _, item := range tmpl_profile_vars.ItemList {
|
||||
w.Write(profile_comments_row_frags[25])
|
||||
w.Write([]byte(item.ClassName))
|
||||
w.Write(profile_comments_row_frags[26])
|
||||
w.Write([]byte(item.Avatar))
|
||||
w.Write(profile_comments_row_frags[27])
|
||||
w.Write([]byte(item.CreatedByName))
|
||||
w.Write(profile_comments_row_frags[28])
|
||||
w.Write([]byte(item.CreatedByName))
|
||||
w.Write(profile_comments_row_frags[29])
|
||||
w.Write([]byte(item.UserLink))
|
||||
w.Write(profile_comments_row_frags[30])
|
||||
w.Write([]byte(item.CreatedByName))
|
||||
w.Write(profile_comments_row_frags[31])
|
||||
if item.Tag != "" {
|
||||
w.Write(profile_comments_row_frags[32])
|
||||
w.Write([]byte(item.Tag))
|
||||
w.Write(profile_comments_row_frags[33])
|
||||
}
|
||||
w.Write(profile_comments_row_frags[34])
|
||||
if tmpl_profile_vars.CurrentUser.IsMod {
|
||||
w.Write(profile_comments_row_frags[35])
|
||||
w.Write([]byte(strconv.Itoa(item.ID)))
|
||||
w.Write(profile_comments_row_frags[36])
|
||||
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
|
||||
w.Write(profile_comments_row_frags[37])
|
||||
w.Write(phrases[21])
|
||||
w.Write(profile_comments_row_frags[38])
|
||||
w.Write(phrases[22])
|
||||
w.Write(profile_comments_row_frags[39])
|
||||
w.Write([]byte(strconv.Itoa(item.ID)))
|
||||
w.Write(profile_comments_row_frags[40])
|
||||
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
|
||||
w.Write(profile_comments_row_frags[41])
|
||||
w.Write(phrases[23])
|
||||
w.Write(profile_comments_row_frags[42])
|
||||
w.Write(phrases[24])
|
||||
w.Write(profile_comments_row_frags[43])
|
||||
}
|
||||
w.Write(profile_comments_row_frags[44])
|
||||
w.Write([]byte(strconv.Itoa(item.ID)))
|
||||
w.Write(profile_comments_row_frags[45])
|
||||
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
|
||||
w.Write(profile_comments_row_frags[46])
|
||||
w.Write(phrases[25])
|
||||
w.Write(profile_comments_row_frags[47])
|
||||
w.Write(phrases[26])
|
||||
w.Write(profile_comments_row_frags[48])
|
||||
w.Write([]byte(item.ContentHtml))
|
||||
w.Write(profile_comments_row_frags[49])
|
||||
}
|
||||
}
|
||||
}
|
||||
w.Write(profile_frags[41])
|
||||
if !tmpl_profile_vars.CurrentUser.IsBanned {
|
||||
w.Write(profile_frags[42])
|
||||
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
|
||||
w.Write(profile_frags[43])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_profile_vars.ProfileOwner.ID)))
|
||||
w.Write(profile_frags[44])
|
||||
w.Write(phrases[27])
|
||||
w.Write(profile_frags[45])
|
||||
w.Write(phrases[28])
|
||||
w.Write(profile_frags[46])
|
||||
}
|
||||
w.Write(profile_frags[47])
|
||||
w.Write(profile_frags[48])
|
||||
w.Write(footer_frags[0])
|
||||
w.Write([]byte(common.BuildWidget("footer",tmpl_profile_vars.Header)))
|
||||
w.Write(footer_frags[1])
|
||||
w.Write(phrases[29])
|
||||
w.Write(footer_frags[2])
|
||||
w.Write(phrases[30])
|
||||
w.Write(footer_frags[3])
|
||||
w.Write(phrases[31])
|
||||
w.Write(footer_frags[4])
|
||||
if len(tmpl_profile_vars.Header.Themes) != 0 {
|
||||
for _, item := range tmpl_profile_vars.Header.Themes {
|
||||
if !item.HideFromThemes {
|
||||
w.Write(footer_frags[5])
|
||||
w.Write([]byte(item.Name))
|
||||
w.Write(footer_frags[6])
|
||||
if tmpl_profile_vars.Header.Theme.Name == item.Name {
|
||||
w.Write(footer_frags[7])
|
||||
}
|
||||
w.Write(footer_frags[8])
|
||||
w.Write([]byte(item.FriendlyName))
|
||||
w.Write(footer_frags[9])
|
||||
}
|
||||
}
|
||||
}
|
||||
w.Write(footer_frags[10])
|
||||
w.Write([]byte(common.BuildWidget("rightSidebar",tmpl_profile_vars.Header)))
|
||||
w.Write(footer_frags[11])
|
||||
return nil
|
||||
}
|
|
@ -1,137 +0,0 @@
|
|||
// +build !no_templategen
|
||||
|
||||
// Code generated by Gosora. More below:
|
||||
/* This file was automatically generated by the software. Please don't edit it as your changes may be overwritten at any moment. */
|
||||
package main
|
||||
import "io"
|
||||
import "./common"
|
||||
|
||||
var register_tmpl_phrase_id int
|
||||
|
||||
// nolint
|
||||
func init() {
|
||||
common.Template_register_handle = Template_register
|
||||
common.Ctemplates = append(common.Ctemplates,"register")
|
||||
common.TmplPtrMap["register"] = &common.Template_register_handle
|
||||
common.TmplPtrMap["o_register"] = Template_register
|
||||
register_tmpl_phrase_id = common.RegisterTmplPhraseNames([]string{
|
||||
"menu_hamburger_tooltip",
|
||||
"register_head",
|
||||
"register_account_name",
|
||||
"register_account_name",
|
||||
"register_account_email",
|
||||
"register_account_password",
|
||||
"register_account_confirm_password",
|
||||
"register_submit_button",
|
||||
"footer_powered_by",
|
||||
"footer_made_with_love",
|
||||
"footer_theme_selector_aria",
|
||||
})
|
||||
}
|
||||
|
||||
// nolint
|
||||
func Template_register(tmpl_register_vars common.Page, w io.Writer) error {
|
||||
var phrases = common.GetTmplPhrasesBytes(register_tmpl_phrase_id)
|
||||
w.Write(header_frags[0])
|
||||
w.Write([]byte(tmpl_register_vars.Title))
|
||||
w.Write(header_frags[1])
|
||||
w.Write([]byte(tmpl_register_vars.Header.Site.Name))
|
||||
w.Write(header_frags[2])
|
||||
w.Write([]byte(tmpl_register_vars.Header.Theme.Name))
|
||||
w.Write(header_frags[3])
|
||||
if len(tmpl_register_vars.Header.Stylesheets) != 0 {
|
||||
for _, item := range tmpl_register_vars.Header.Stylesheets {
|
||||
w.Write(header_frags[4])
|
||||
w.Write([]byte(item))
|
||||
w.Write(header_frags[5])
|
||||
}
|
||||
}
|
||||
w.Write(header_frags[6])
|
||||
if len(tmpl_register_vars.Header.Scripts) != 0 {
|
||||
for _, item := range tmpl_register_vars.Header.Scripts {
|
||||
w.Write(header_frags[7])
|
||||
w.Write([]byte(item))
|
||||
w.Write(header_frags[8])
|
||||
}
|
||||
}
|
||||
w.Write(header_frags[9])
|
||||
w.Write([]byte(tmpl_register_vars.CurrentUser.Session))
|
||||
w.Write(header_frags[10])
|
||||
w.Write([]byte(tmpl_register_vars.Header.Site.URL))
|
||||
w.Write(header_frags[11])
|
||||
if tmpl_register_vars.Header.MetaDesc != "" {
|
||||
w.Write(header_frags[12])
|
||||
w.Write([]byte(tmpl_register_vars.Header.MetaDesc))
|
||||
w.Write(header_frags[13])
|
||||
}
|
||||
w.Write(header_frags[14])
|
||||
if !tmpl_register_vars.CurrentUser.IsSuperMod {
|
||||
w.Write(header_frags[15])
|
||||
}
|
||||
w.Write(header_frags[16])
|
||||
w.Write([]byte(common.BuildWidget("leftOfNav",tmpl_register_vars.Header)))
|
||||
w.Write(header_frags[17])
|
||||
w.Write([]byte(tmpl_register_vars.Header.Site.ShortName))
|
||||
w.Write(header_frags[18])
|
||||
w.Write([]byte(common.BuildWidget("topMenu",tmpl_register_vars.Header)))
|
||||
w.Write(header_frags[19])
|
||||
w.Write(phrases[0])
|
||||
w.Write(header_frags[20])
|
||||
w.Write([]byte(common.BuildWidget("rightOfNav",tmpl_register_vars.Header)))
|
||||
w.Write(header_frags[21])
|
||||
if tmpl_register_vars.Header.Widgets.RightSidebar != "" {
|
||||
w.Write(header_frags[22])
|
||||
}
|
||||
w.Write(header_frags[23])
|
||||
if len(tmpl_register_vars.Header.NoticeList) != 0 {
|
||||
for _, item := range tmpl_register_vars.Header.NoticeList {
|
||||
w.Write(notice_frags[0])
|
||||
w.Write([]byte(item))
|
||||
w.Write(notice_frags[1])
|
||||
}
|
||||
}
|
||||
w.Write(header_frags[24])
|
||||
w.Write(register_frags[0])
|
||||
w.Write(phrases[1])
|
||||
w.Write(register_frags[1])
|
||||
w.Write(phrases[2])
|
||||
w.Write(register_frags[2])
|
||||
w.Write(phrases[3])
|
||||
w.Write(register_frags[3])
|
||||
w.Write(phrases[4])
|
||||
w.Write(register_frags[4])
|
||||
w.Write(phrases[5])
|
||||
w.Write(register_frags[5])
|
||||
w.Write(phrases[6])
|
||||
w.Write(register_frags[6])
|
||||
w.Write(phrases[7])
|
||||
w.Write(register_frags[7])
|
||||
w.Write(footer_frags[0])
|
||||
w.Write([]byte(common.BuildWidget("footer",tmpl_register_vars.Header)))
|
||||
w.Write(footer_frags[1])
|
||||
w.Write(phrases[8])
|
||||
w.Write(footer_frags[2])
|
||||
w.Write(phrases[9])
|
||||
w.Write(footer_frags[3])
|
||||
w.Write(phrases[10])
|
||||
w.Write(footer_frags[4])
|
||||
if len(tmpl_register_vars.Header.Themes) != 0 {
|
||||
for _, item := range tmpl_register_vars.Header.Themes {
|
||||
if !item.HideFromThemes {
|
||||
w.Write(footer_frags[5])
|
||||
w.Write([]byte(item.Name))
|
||||
w.Write(footer_frags[6])
|
||||
if tmpl_register_vars.Header.Theme.Name == item.Name {
|
||||
w.Write(footer_frags[7])
|
||||
}
|
||||
w.Write(footer_frags[8])
|
||||
w.Write([]byte(item.FriendlyName))
|
||||
w.Write(footer_frags[9])
|
||||
}
|
||||
}
|
||||
}
|
||||
w.Write(footer_frags[10])
|
||||
w.Write([]byte(common.BuildWidget("rightSidebar",tmpl_register_vars.Header)))
|
||||
w.Write(footer_frags[11])
|
||||
return nil
|
||||
}
|
|
@ -1,590 +0,0 @@
|
|||
// +build !no_templategen
|
||||
|
||||
// Code generated by Gosora. More below:
|
||||
/* This file was automatically generated by the software. Please don't edit it as your changes may be overwritten at any moment. */
|
||||
package main
|
||||
import "strconv"
|
||||
import "io"
|
||||
import "./common"
|
||||
|
||||
var topic_tmpl_phrase_id int
|
||||
|
||||
// nolint
|
||||
func init() {
|
||||
common.Template_topic_handle = Template_topic
|
||||
common.Ctemplates = append(common.Ctemplates,"topic")
|
||||
common.TmplPtrMap["topic"] = &common.Template_topic_handle
|
||||
common.TmplPtrMap["o_topic"] = Template_topic
|
||||
topic_tmpl_phrase_id = common.RegisterTmplPhraseNames([]string{
|
||||
"menu_hamburger_tooltip",
|
||||
"paginator_prev_page_aria",
|
||||
"paginator_less_than",
|
||||
"paginator_next_page_aria",
|
||||
"paginator_greater_than",
|
||||
"topic_opening_post_aria",
|
||||
"status_closed_tooltip",
|
||||
"topic_status_closed_aria",
|
||||
"topic_title_input_aria",
|
||||
"topic_update_button",
|
||||
"topic_poll_aria",
|
||||
"topic_poll_vote",
|
||||
"topic_poll_results",
|
||||
"topic_poll_cancel",
|
||||
"topic_opening_post_aria",
|
||||
"topic_post_controls_aria",
|
||||
"topic_unlike_tooltip",
|
||||
"topic_unlike_aria",
|
||||
"topic_like_tooltip",
|
||||
"topic_like_aria",
|
||||
"topic_edit_tooltip",
|
||||
"topic_edit_aria",
|
||||
"topic_delete_tooltip",
|
||||
"topic_delete_aria",
|
||||
"topic_unlock_tooltip",
|
||||
"topic_unlock_aria",
|
||||
"topic_lock_tooltip",
|
||||
"topic_lock_aria",
|
||||
"topic_unpin_tooltip",
|
||||
"topic_unpin_aria",
|
||||
"topic_pin_tooltip",
|
||||
"topic_pin_aria",
|
||||
"topic_ip_tooltip",
|
||||
"topic_flag_tooltip",
|
||||
"topic_flag_aria",
|
||||
"topic_like_count_aria",
|
||||
"topic_like_count_tooltip",
|
||||
"topic_level_aria",
|
||||
"topic_level_tooltip",
|
||||
"topic_current_page_aria",
|
||||
"topic_post_like_tooltip",
|
||||
"topic_post_like_aria",
|
||||
"topic_post_unlike_tooltip",
|
||||
"topic_post_unlike_aria",
|
||||
"topic_post_edit_tooltip",
|
||||
"topic_post_edit_aria",
|
||||
"topic_post_delete_tooltip",
|
||||
"topic_post_delete_aria",
|
||||
"topic_post_ip_tooltip",
|
||||
"topic_post_flag_tooltip",
|
||||
"topic_post_flag_aria",
|
||||
"topic_post_like_count_tooltip",
|
||||
"topic_post_level_aria",
|
||||
"topic_post_level_tooltip",
|
||||
"topic_reply_aria",
|
||||
"topic_reply_content",
|
||||
"topic_reply_add_poll_option",
|
||||
"topic_reply_button",
|
||||
"topic_reply_add_poll_button",
|
||||
"topic_reply_add_file_button",
|
||||
"footer_powered_by",
|
||||
"footer_made_with_love",
|
||||
"footer_theme_selector_aria",
|
||||
})
|
||||
}
|
||||
|
||||
// nolint
|
||||
func Template_topic(tmpl_topic_vars common.TopicPage, w io.Writer) error {
|
||||
var phrases = common.GetTmplPhrasesBytes(topic_tmpl_phrase_id)
|
||||
w.Write(header_frags[0])
|
||||
w.Write([]byte(tmpl_topic_vars.Title))
|
||||
w.Write(header_frags[1])
|
||||
w.Write([]byte(tmpl_topic_vars.Header.Site.Name))
|
||||
w.Write(header_frags[2])
|
||||
w.Write([]byte(tmpl_topic_vars.Header.Theme.Name))
|
||||
w.Write(header_frags[3])
|
||||
if len(tmpl_topic_vars.Header.Stylesheets) != 0 {
|
||||
for _, item := range tmpl_topic_vars.Header.Stylesheets {
|
||||
w.Write(header_frags[4])
|
||||
w.Write([]byte(item))
|
||||
w.Write(header_frags[5])
|
||||
}
|
||||
}
|
||||
w.Write(header_frags[6])
|
||||
if len(tmpl_topic_vars.Header.Scripts) != 0 {
|
||||
for _, item := range tmpl_topic_vars.Header.Scripts {
|
||||
w.Write(header_frags[7])
|
||||
w.Write([]byte(item))
|
||||
w.Write(header_frags[8])
|
||||
}
|
||||
}
|
||||
w.Write(header_frags[9])
|
||||
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
|
||||
w.Write(header_frags[10])
|
||||
w.Write([]byte(tmpl_topic_vars.Header.Site.URL))
|
||||
w.Write(header_frags[11])
|
||||
if tmpl_topic_vars.Header.MetaDesc != "" {
|
||||
w.Write(header_frags[12])
|
||||
w.Write([]byte(tmpl_topic_vars.Header.MetaDesc))
|
||||
w.Write(header_frags[13])
|
||||
}
|
||||
w.Write(header_frags[14])
|
||||
if !tmpl_topic_vars.CurrentUser.IsSuperMod {
|
||||
w.Write(header_frags[15])
|
||||
}
|
||||
w.Write(header_frags[16])
|
||||
w.Write([]byte(common.BuildWidget("leftOfNav",tmpl_topic_vars.Header)))
|
||||
w.Write(header_frags[17])
|
||||
w.Write([]byte(tmpl_topic_vars.Header.Site.ShortName))
|
||||
w.Write(header_frags[18])
|
||||
w.Write([]byte(common.BuildWidget("topMenu",tmpl_topic_vars.Header)))
|
||||
w.Write(header_frags[19])
|
||||
w.Write(phrases[0])
|
||||
w.Write(header_frags[20])
|
||||
w.Write([]byte(common.BuildWidget("rightOfNav",tmpl_topic_vars.Header)))
|
||||
w.Write(header_frags[21])
|
||||
if tmpl_topic_vars.Header.Widgets.RightSidebar != "" {
|
||||
w.Write(header_frags[22])
|
||||
}
|
||||
w.Write(header_frags[23])
|
||||
if len(tmpl_topic_vars.Header.NoticeList) != 0 {
|
||||
for _, item := range tmpl_topic_vars.Header.NoticeList {
|
||||
w.Write(notice_frags[0])
|
||||
w.Write([]byte(item))
|
||||
w.Write(notice_frags[1])
|
||||
}
|
||||
}
|
||||
w.Write(header_frags[24])
|
||||
w.Write(topic_frags[0])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
|
||||
w.Write(topic_frags[1])
|
||||
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
|
||||
w.Write(topic_frags[2])
|
||||
if tmpl_topic_vars.Page > 1 {
|
||||
w.Write(topic_frags[3])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
|
||||
w.Write(topic_frags[4])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Page - 1)))
|
||||
w.Write(topic_frags[5])
|
||||
w.Write(phrases[1])
|
||||
w.Write(topic_frags[6])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
|
||||
w.Write(topic_frags[7])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Page - 1)))
|
||||
w.Write(topic_frags[8])
|
||||
w.Write(phrases[2])
|
||||
w.Write(topic_frags[9])
|
||||
}
|
||||
if tmpl_topic_vars.LastPage != tmpl_topic_vars.Page {
|
||||
w.Write(topic_frags[10])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
|
||||
w.Write(topic_frags[11])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Page + 1)))
|
||||
w.Write(topic_frags[12])
|
||||
w.Write(phrases[3])
|
||||
w.Write(topic_frags[13])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
|
||||
w.Write(topic_frags[14])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Page + 1)))
|
||||
w.Write(topic_frags[15])
|
||||
w.Write(phrases[4])
|
||||
w.Write(topic_frags[16])
|
||||
}
|
||||
w.Write(topic_frags[17])
|
||||
w.Write(topic_frags[18])
|
||||
w.Write(phrases[5])
|
||||
w.Write(topic_frags[19])
|
||||
if tmpl_topic_vars.Topic.Sticky {
|
||||
w.Write(topic_frags[20])
|
||||
} else {
|
||||
if tmpl_topic_vars.Topic.IsClosed {
|
||||
w.Write(topic_frags[21])
|
||||
}
|
||||
}
|
||||
w.Write(topic_frags[22])
|
||||
w.Write([]byte(tmpl_topic_vars.Topic.Title))
|
||||
w.Write(topic_frags[23])
|
||||
w.Write([]byte(tmpl_topic_vars.Topic.Title))
|
||||
w.Write(topic_frags[24])
|
||||
if tmpl_topic_vars.Topic.IsClosed {
|
||||
w.Write(topic_frags[25])
|
||||
w.Write(phrases[6])
|
||||
w.Write(topic_frags[26])
|
||||
w.Write(phrases[7])
|
||||
w.Write(topic_frags[27])
|
||||
}
|
||||
if tmpl_topic_vars.CurrentUser.Perms.EditTopic {
|
||||
w.Write(topic_frags[28])
|
||||
w.Write([]byte(tmpl_topic_vars.Topic.Title))
|
||||
w.Write(topic_frags[29])
|
||||
w.Write(phrases[8])
|
||||
w.Write(topic_frags[30])
|
||||
w.Write(phrases[9])
|
||||
w.Write(topic_frags[31])
|
||||
}
|
||||
w.Write(topic_frags[32])
|
||||
if tmpl_topic_vars.Poll.ID > 0 {
|
||||
w.Write(topic_frags[33])
|
||||
w.Write(phrases[10])
|
||||
w.Write(topic_frags[34])
|
||||
w.Write([]byte(tmpl_topic_vars.Topic.ClassName))
|
||||
w.Write(topic_frags[35])
|
||||
w.Write([]byte(tmpl_topic_vars.Topic.Avatar))
|
||||
w.Write(topic_frags[36])
|
||||
w.Write([]byte(tmpl_topic_vars.Header.Theme.Name))
|
||||
w.Write(topic_frags[37])
|
||||
if tmpl_topic_vars.Topic.ContentLines <= 5 {
|
||||
w.Write(topic_frags[38])
|
||||
}
|
||||
w.Write(topic_frags[39])
|
||||
if len(tmpl_topic_vars.Poll.QuickOptions) != 0 {
|
||||
for _, item := range tmpl_topic_vars.Poll.QuickOptions {
|
||||
w.Write(topic_frags[40])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Poll.ID)))
|
||||
w.Write(topic_frags[41])
|
||||
w.Write([]byte(strconv.Itoa(item.ID)))
|
||||
w.Write(topic_frags[42])
|
||||
w.Write([]byte(strconv.Itoa(item.ID)))
|
||||
w.Write(topic_frags[43])
|
||||
w.Write([]byte(strconv.Itoa(item.ID)))
|
||||
w.Write(topic_frags[44])
|
||||
w.Write([]byte(strconv.Itoa(item.ID)))
|
||||
w.Write(topic_frags[45])
|
||||
w.Write([]byte(item.Value))
|
||||
w.Write(topic_frags[46])
|
||||
}
|
||||
}
|
||||
w.Write(topic_frags[47])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Poll.ID)))
|
||||
w.Write(topic_frags[48])
|
||||
w.Write(phrases[11])
|
||||
w.Write(topic_frags[49])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Poll.ID)))
|
||||
w.Write(topic_frags[50])
|
||||
w.Write(phrases[12])
|
||||
w.Write(topic_frags[51])
|
||||
w.Write(phrases[13])
|
||||
w.Write(topic_frags[52])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Poll.ID)))
|
||||
w.Write(topic_frags[53])
|
||||
}
|
||||
w.Write(topic_frags[54])
|
||||
w.Write(topic_frags[55])
|
||||
w.Write(phrases[14])
|
||||
w.Write(topic_frags[56])
|
||||
w.Write([]byte(tmpl_topic_vars.Topic.ClassName))
|
||||
w.Write(topic_frags[57])
|
||||
w.Write([]byte(tmpl_topic_vars.Topic.Avatar))
|
||||
w.Write(topic_frags[58])
|
||||
w.Write([]byte(tmpl_topic_vars.Header.Theme.Name))
|
||||
w.Write(topic_frags[59])
|
||||
if tmpl_topic_vars.Topic.ContentLines <= 5 {
|
||||
w.Write(topic_frags[60])
|
||||
}
|
||||
w.Write(topic_frags[61])
|
||||
w.Write([]byte(tmpl_topic_vars.Topic.ContentHTML))
|
||||
w.Write(topic_frags[62])
|
||||
w.Write([]byte(tmpl_topic_vars.Topic.Content))
|
||||
w.Write(topic_frags[63])
|
||||
if tmpl_topic_vars.Topic.LikeCount > 0 {
|
||||
w.Write(topic_frags[64])
|
||||
}
|
||||
w.Write(topic_frags[65])
|
||||
w.Write(phrases[15])
|
||||
w.Write(topic_frags[66])
|
||||
w.Write([]byte(tmpl_topic_vars.Topic.UserLink))
|
||||
w.Write(topic_frags[67])
|
||||
w.Write([]byte(tmpl_topic_vars.Topic.CreatedByName))
|
||||
w.Write(topic_frags[68])
|
||||
if tmpl_topic_vars.CurrentUser.Perms.LikeItem {
|
||||
w.Write(topic_frags[69])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
|
||||
w.Write(topic_frags[70])
|
||||
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
|
||||
w.Write(topic_frags[71])
|
||||
if tmpl_topic_vars.Topic.Liked {
|
||||
w.Write(topic_frags[72])
|
||||
w.Write(phrases[16])
|
||||
w.Write(topic_frags[73])
|
||||
w.Write(phrases[17])
|
||||
w.Write(topic_frags[74])
|
||||
} else {
|
||||
w.Write(topic_frags[75])
|
||||
w.Write(phrases[18])
|
||||
w.Write(topic_frags[76])
|
||||
w.Write(phrases[19])
|
||||
w.Write(topic_frags[77])
|
||||
}
|
||||
w.Write(topic_frags[78])
|
||||
if tmpl_topic_vars.Topic.Liked {
|
||||
w.Write(topic_frags[79])
|
||||
} else {
|
||||
w.Write(topic_frags[80])
|
||||
}
|
||||
w.Write(topic_frags[81])
|
||||
}
|
||||
if tmpl_topic_vars.CurrentUser.Perms.EditTopic {
|
||||
w.Write(topic_frags[82])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
|
||||
w.Write(topic_frags[83])
|
||||
w.Write(phrases[20])
|
||||
w.Write(topic_frags[84])
|
||||
w.Write(phrases[21])
|
||||
w.Write(topic_frags[85])
|
||||
}
|
||||
if tmpl_topic_vars.CurrentUser.Perms.DeleteTopic {
|
||||
w.Write(topic_frags[86])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
|
||||
w.Write(topic_frags[87])
|
||||
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
|
||||
w.Write(topic_frags[88])
|
||||
w.Write(phrases[22])
|
||||
w.Write(topic_frags[89])
|
||||
w.Write(phrases[23])
|
||||
w.Write(topic_frags[90])
|
||||
}
|
||||
if tmpl_topic_vars.CurrentUser.Perms.CloseTopic {
|
||||
if tmpl_topic_vars.Topic.IsClosed {
|
||||
w.Write(topic_frags[91])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
|
||||
w.Write(topic_frags[92])
|
||||
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
|
||||
w.Write(topic_frags[93])
|
||||
w.Write(phrases[24])
|
||||
w.Write(topic_frags[94])
|
||||
w.Write(phrases[25])
|
||||
w.Write(topic_frags[95])
|
||||
} else {
|
||||
w.Write(topic_frags[96])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
|
||||
w.Write(topic_frags[97])
|
||||
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
|
||||
w.Write(topic_frags[98])
|
||||
w.Write(phrases[26])
|
||||
w.Write(topic_frags[99])
|
||||
w.Write(phrases[27])
|
||||
w.Write(topic_frags[100])
|
||||
}
|
||||
}
|
||||
if tmpl_topic_vars.CurrentUser.Perms.PinTopic {
|
||||
if tmpl_topic_vars.Topic.Sticky {
|
||||
w.Write(topic_frags[101])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
|
||||
w.Write(topic_frags[102])
|
||||
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
|
||||
w.Write(topic_frags[103])
|
||||
w.Write(phrases[28])
|
||||
w.Write(topic_frags[104])
|
||||
w.Write(phrases[29])
|
||||
w.Write(topic_frags[105])
|
||||
} else {
|
||||
w.Write(topic_frags[106])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
|
||||
w.Write(topic_frags[107])
|
||||
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
|
||||
w.Write(topic_frags[108])
|
||||
w.Write(phrases[30])
|
||||
w.Write(topic_frags[109])
|
||||
w.Write(phrases[31])
|
||||
w.Write(topic_frags[110])
|
||||
}
|
||||
}
|
||||
if tmpl_topic_vars.CurrentUser.Perms.ViewIPs {
|
||||
w.Write(topic_frags[111])
|
||||
w.Write([]byte(tmpl_topic_vars.Topic.IPAddress))
|
||||
w.Write(topic_frags[112])
|
||||
w.Write(phrases[32])
|
||||
w.Write(topic_frags[113])
|
||||
w.Write([]byte(tmpl_topic_vars.Topic.IPAddress))
|
||||
w.Write(topic_frags[114])
|
||||
}
|
||||
w.Write(topic_frags[115])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
|
||||
w.Write(topic_frags[116])
|
||||
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
|
||||
w.Write(topic_frags[117])
|
||||
w.Write(phrases[33])
|
||||
w.Write(topic_frags[118])
|
||||
w.Write(phrases[34])
|
||||
w.Write(topic_frags[119])
|
||||
w.Write(phrases[35])
|
||||
w.Write(topic_frags[120])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.LikeCount)))
|
||||
w.Write(topic_frags[121])
|
||||
w.Write(phrases[36])
|
||||
w.Write(topic_frags[122])
|
||||
if tmpl_topic_vars.Topic.Tag != "" {
|
||||
w.Write(topic_frags[123])
|
||||
w.Write([]byte(tmpl_topic_vars.Topic.Tag))
|
||||
w.Write(topic_frags[124])
|
||||
} else {
|
||||
w.Write(topic_frags[125])
|
||||
w.Write(phrases[37])
|
||||
w.Write(topic_frags[126])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.Level)))
|
||||
w.Write(topic_frags[127])
|
||||
w.Write(phrases[38])
|
||||
w.Write(topic_frags[128])
|
||||
}
|
||||
w.Write(topic_frags[129])
|
||||
w.Write(phrases[39])
|
||||
w.Write(topic_frags[130])
|
||||
if len(tmpl_topic_vars.ItemList) != 0 {
|
||||
for _, item := range tmpl_topic_vars.ItemList {
|
||||
if item.ActionType != "" {
|
||||
w.Write(topic_frags[131])
|
||||
w.Write([]byte(item.ActionIcon))
|
||||
w.Write(topic_frags[132])
|
||||
w.Write([]byte(item.ActionType))
|
||||
w.Write(topic_frags[133])
|
||||
} else {
|
||||
w.Write(topic_frags[134])
|
||||
w.Write(topic_frags[135])
|
||||
w.Write([]byte(item.ClassName))
|
||||
w.Write(topic_frags[136])
|
||||
w.Write([]byte(item.Avatar))
|
||||
w.Write(topic_frags[137])
|
||||
w.Write([]byte(tmpl_topic_vars.Header.Theme.Name))
|
||||
w.Write(topic_frags[138])
|
||||
if item.ContentLines <= 5 {
|
||||
w.Write(topic_frags[139])
|
||||
}
|
||||
w.Write(topic_frags[140])
|
||||
w.Write(topic_frags[141])
|
||||
w.Write([]byte(item.ContentHtml))
|
||||
w.Write(topic_frags[142])
|
||||
if item.LikeCount > 0 {
|
||||
w.Write(topic_frags[143])
|
||||
}
|
||||
w.Write(topic_frags[144])
|
||||
w.Write([]byte(item.UserLink))
|
||||
w.Write(topic_frags[145])
|
||||
w.Write([]byte(item.CreatedByName))
|
||||
w.Write(topic_frags[146])
|
||||
if tmpl_topic_vars.CurrentUser.Perms.LikeItem {
|
||||
if item.Liked {
|
||||
w.Write(topic_frags[147])
|
||||
w.Write([]byte(strconv.Itoa(item.ID)))
|
||||
w.Write(topic_frags[148])
|
||||
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
|
||||
w.Write(topic_frags[149])
|
||||
w.Write(phrases[40])
|
||||
w.Write(topic_frags[150])
|
||||
w.Write(phrases[41])
|
||||
w.Write(topic_frags[151])
|
||||
} else {
|
||||
w.Write(topic_frags[152])
|
||||
w.Write([]byte(strconv.Itoa(item.ID)))
|
||||
w.Write(topic_frags[153])
|
||||
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
|
||||
w.Write(topic_frags[154])
|
||||
w.Write(phrases[42])
|
||||
w.Write(topic_frags[155])
|
||||
w.Write(phrases[43])
|
||||
w.Write(topic_frags[156])
|
||||
}
|
||||
}
|
||||
if tmpl_topic_vars.CurrentUser.Perms.EditReply {
|
||||
w.Write(topic_frags[157])
|
||||
w.Write([]byte(strconv.Itoa(item.ID)))
|
||||
w.Write(topic_frags[158])
|
||||
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
|
||||
w.Write(topic_frags[159])
|
||||
w.Write(phrases[44])
|
||||
w.Write(topic_frags[160])
|
||||
w.Write(phrases[45])
|
||||
w.Write(topic_frags[161])
|
||||
}
|
||||
if tmpl_topic_vars.CurrentUser.Perms.DeleteReply {
|
||||
w.Write(topic_frags[162])
|
||||
w.Write([]byte(strconv.Itoa(item.ID)))
|
||||
w.Write(topic_frags[163])
|
||||
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
|
||||
w.Write(topic_frags[164])
|
||||
w.Write(phrases[46])
|
||||
w.Write(topic_frags[165])
|
||||
w.Write(phrases[47])
|
||||
w.Write(topic_frags[166])
|
||||
}
|
||||
if tmpl_topic_vars.CurrentUser.Perms.ViewIPs {
|
||||
w.Write(topic_frags[167])
|
||||
w.Write([]byte(item.IPAddress))
|
||||
w.Write(topic_frags[168])
|
||||
w.Write(phrases[48])
|
||||
w.Write(topic_frags[169])
|
||||
w.Write([]byte(item.IPAddress))
|
||||
w.Write(topic_frags[170])
|
||||
}
|
||||
w.Write(topic_frags[171])
|
||||
w.Write([]byte(strconv.Itoa(item.ID)))
|
||||
w.Write(topic_frags[172])
|
||||
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
|
||||
w.Write(topic_frags[173])
|
||||
w.Write(phrases[49])
|
||||
w.Write(topic_frags[174])
|
||||
w.Write(phrases[50])
|
||||
w.Write(topic_frags[175])
|
||||
w.Write([]byte(strconv.Itoa(item.LikeCount)))
|
||||
w.Write(topic_frags[176])
|
||||
w.Write(phrases[51])
|
||||
w.Write(topic_frags[177])
|
||||
if item.Tag != "" {
|
||||
w.Write(topic_frags[178])
|
||||
w.Write([]byte(item.Tag))
|
||||
w.Write(topic_frags[179])
|
||||
} else {
|
||||
w.Write(topic_frags[180])
|
||||
w.Write(phrases[52])
|
||||
w.Write(topic_frags[181])
|
||||
w.Write([]byte(strconv.Itoa(item.Level)))
|
||||
w.Write(topic_frags[182])
|
||||
w.Write(phrases[53])
|
||||
w.Write(topic_frags[183])
|
||||
}
|
||||
w.Write(topic_frags[184])
|
||||
}
|
||||
}
|
||||
}
|
||||
w.Write(topic_frags[185])
|
||||
if tmpl_topic_vars.CurrentUser.Perms.CreateReply {
|
||||
w.Write(topic_frags[186])
|
||||
w.Write(phrases[54])
|
||||
w.Write(topic_frags[187])
|
||||
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
|
||||
w.Write(topic_frags[188])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
|
||||
w.Write(topic_frags[189])
|
||||
w.Write(phrases[55])
|
||||
w.Write(topic_frags[190])
|
||||
w.Write(phrases[56])
|
||||
w.Write(topic_frags[191])
|
||||
w.Write(phrases[57])
|
||||
w.Write(topic_frags[192])
|
||||
w.Write(phrases[58])
|
||||
w.Write(topic_frags[193])
|
||||
if tmpl_topic_vars.CurrentUser.Perms.UploadFiles {
|
||||
w.Write(topic_frags[194])
|
||||
w.Write(phrases[59])
|
||||
w.Write(topic_frags[195])
|
||||
}
|
||||
w.Write(topic_frags[196])
|
||||
}
|
||||
w.Write(topic_frags[197])
|
||||
w.Write(footer_frags[0])
|
||||
w.Write([]byte(common.BuildWidget("footer",tmpl_topic_vars.Header)))
|
||||
w.Write(footer_frags[1])
|
||||
w.Write(phrases[60])
|
||||
w.Write(footer_frags[2])
|
||||
w.Write(phrases[61])
|
||||
w.Write(footer_frags[3])
|
||||
w.Write(phrases[62])
|
||||
w.Write(footer_frags[4])
|
||||
if len(tmpl_topic_vars.Header.Themes) != 0 {
|
||||
for _, item := range tmpl_topic_vars.Header.Themes {
|
||||
if !item.HideFromThemes {
|
||||
w.Write(footer_frags[5])
|
||||
w.Write([]byte(item.Name))
|
||||
w.Write(footer_frags[6])
|
||||
if tmpl_topic_vars.Header.Theme.Name == item.Name {
|
||||
w.Write(footer_frags[7])
|
||||
}
|
||||
w.Write(footer_frags[8])
|
||||
w.Write([]byte(item.FriendlyName))
|
||||
w.Write(footer_frags[9])
|
||||
}
|
||||
}
|
||||
}
|
||||
w.Write(footer_frags[10])
|
||||
w.Write([]byte(common.BuildWidget("rightSidebar",tmpl_topic_vars.Header)))
|
||||
w.Write(footer_frags[11])
|
||||
return nil
|
||||
}
|
|
@ -1,583 +0,0 @@
|
|||
// +build !no_templategen
|
||||
|
||||
// Code generated by Gosora. More below:
|
||||
/* This file was automatically generated by the software. Please don't edit it as your changes may be overwritten at any moment. */
|
||||
package main
|
||||
import "./common"
|
||||
import "strconv"
|
||||
import "io"
|
||||
|
||||
var topic_alt_tmpl_phrase_id int
|
||||
|
||||
// nolint
|
||||
func init() {
|
||||
common.Template_topic_alt_handle = Template_topic_alt
|
||||
common.Ctemplates = append(common.Ctemplates,"topic_alt")
|
||||
common.TmplPtrMap["topic_alt"] = &common.Template_topic_alt_handle
|
||||
common.TmplPtrMap["o_topic_alt"] = Template_topic_alt
|
||||
topic_alt_tmpl_phrase_id = common.RegisterTmplPhraseNames([]string{
|
||||
"menu_hamburger_tooltip",
|
||||
"paginator_prev_page_aria",
|
||||
"paginator_less_than",
|
||||
"paginator_next_page_aria",
|
||||
"paginator_greater_than",
|
||||
"topic_opening_post_aria",
|
||||
"status_closed_tooltip",
|
||||
"topic_status_closed_aria",
|
||||
"topic_title_input_aria",
|
||||
"topic_update_button",
|
||||
"topic_userinfo_aria",
|
||||
"topic_level_prefix",
|
||||
"topic_poll_vote",
|
||||
"topic_poll_results",
|
||||
"topic_poll_cancel",
|
||||
"topic_opening_post_aria",
|
||||
"topic_userinfo_aria",
|
||||
"topic_level_prefix",
|
||||
"topic_like_aria",
|
||||
"topic_edit_aria",
|
||||
"topic_delete_aria",
|
||||
"topic_unlock_aria",
|
||||
"topic_lock_aria",
|
||||
"topic_unpin_aria",
|
||||
"topic_pin_aria",
|
||||
"topic_ip_full_tooltip",
|
||||
"topic_ip_full_aria",
|
||||
"topic_report_aria",
|
||||
"topic_like_count_aria",
|
||||
"topic_ip_full_tooltip",
|
||||
"topic_userinfo_aria",
|
||||
"topic_level_prefix",
|
||||
"topic_post_like_aria",
|
||||
"topic_post_edit_aria",
|
||||
"topic_post_delete_aria",
|
||||
"topic_ip_full_tooltip",
|
||||
"topic_ip_full_aria",
|
||||
"topic_report_aria",
|
||||
"topic_post_like_count_tooltip",
|
||||
"topic_your_information",
|
||||
"topic_level_prefix",
|
||||
"topic_reply_aria",
|
||||
"topic_reply_content_alt",
|
||||
"topic_reply_add_poll_option",
|
||||
"topic_reply_button",
|
||||
"topic_reply_add_poll_button",
|
||||
"topic_reply_add_file_button",
|
||||
"footer_powered_by",
|
||||
"footer_made_with_love",
|
||||
"footer_theme_selector_aria",
|
||||
})
|
||||
}
|
||||
|
||||
// nolint
|
||||
func Template_topic_alt(tmpl_topic_alt_vars common.TopicPage, w io.Writer) error {
|
||||
var phrases = common.GetTmplPhrasesBytes(topic_alt_tmpl_phrase_id)
|
||||
w.Write(header_frags[0])
|
||||
w.Write([]byte(tmpl_topic_alt_vars.Title))
|
||||
w.Write(header_frags[1])
|
||||
w.Write([]byte(tmpl_topic_alt_vars.Header.Site.Name))
|
||||
w.Write(header_frags[2])
|
||||
w.Write([]byte(tmpl_topic_alt_vars.Header.Theme.Name))
|
||||
w.Write(header_frags[3])
|
||||
if len(tmpl_topic_alt_vars.Header.Stylesheets) != 0 {
|
||||
for _, item := range tmpl_topic_alt_vars.Header.Stylesheets {
|
||||
w.Write(header_frags[4])
|
||||
w.Write([]byte(item))
|
||||
w.Write(header_frags[5])
|
||||
}
|
||||
}
|
||||
w.Write(header_frags[6])
|
||||
if len(tmpl_topic_alt_vars.Header.Scripts) != 0 {
|
||||
for _, item := range tmpl_topic_alt_vars.Header.Scripts {
|
||||
w.Write(header_frags[7])
|
||||
w.Write([]byte(item))
|
||||
w.Write(header_frags[8])
|
||||
}
|
||||
}
|
||||
w.Write(header_frags[9])
|
||||
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
|
||||
w.Write(header_frags[10])
|
||||
w.Write([]byte(tmpl_topic_alt_vars.Header.Site.URL))
|
||||
w.Write(header_frags[11])
|
||||
if tmpl_topic_alt_vars.Header.MetaDesc != "" {
|
||||
w.Write(header_frags[12])
|
||||
w.Write([]byte(tmpl_topic_alt_vars.Header.MetaDesc))
|
||||
w.Write(header_frags[13])
|
||||
}
|
||||
w.Write(header_frags[14])
|
||||
if !tmpl_topic_alt_vars.CurrentUser.IsSuperMod {
|
||||
w.Write(header_frags[15])
|
||||
}
|
||||
w.Write(header_frags[16])
|
||||
w.Write([]byte(common.BuildWidget("leftOfNav",tmpl_topic_alt_vars.Header)))
|
||||
w.Write(header_frags[17])
|
||||
w.Write([]byte(tmpl_topic_alt_vars.Header.Site.ShortName))
|
||||
w.Write(header_frags[18])
|
||||
w.Write([]byte(common.BuildWidget("topMenu",tmpl_topic_alt_vars.Header)))
|
||||
w.Write(header_frags[19])
|
||||
w.Write(phrases[0])
|
||||
w.Write(header_frags[20])
|
||||
w.Write([]byte(common.BuildWidget("rightOfNav",tmpl_topic_alt_vars.Header)))
|
||||
w.Write(header_frags[21])
|
||||
if tmpl_topic_alt_vars.Header.Widgets.RightSidebar != "" {
|
||||
w.Write(header_frags[22])
|
||||
}
|
||||
w.Write(header_frags[23])
|
||||
if len(tmpl_topic_alt_vars.Header.NoticeList) != 0 {
|
||||
for _, item := range tmpl_topic_alt_vars.Header.NoticeList {
|
||||
w.Write(notice_frags[0])
|
||||
w.Write([]byte(item))
|
||||
w.Write(notice_frags[1])
|
||||
}
|
||||
}
|
||||
w.Write(header_frags[24])
|
||||
if tmpl_topic_alt_vars.Page > 1 {
|
||||
w.Write(topic_alt_frags[0])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
|
||||
w.Write(topic_alt_frags[1])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Page - 1)))
|
||||
w.Write(topic_alt_frags[2])
|
||||
w.Write(phrases[1])
|
||||
w.Write(topic_alt_frags[3])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
|
||||
w.Write(topic_alt_frags[4])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Page - 1)))
|
||||
w.Write(topic_alt_frags[5])
|
||||
w.Write(phrases[2])
|
||||
w.Write(topic_alt_frags[6])
|
||||
}
|
||||
if tmpl_topic_alt_vars.LastPage != tmpl_topic_alt_vars.Page {
|
||||
w.Write(topic_alt_frags[7])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
|
||||
w.Write(topic_alt_frags[8])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Page + 1)))
|
||||
w.Write(topic_alt_frags[9])
|
||||
w.Write(phrases[3])
|
||||
w.Write(topic_alt_frags[10])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
|
||||
w.Write(topic_alt_frags[11])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Page + 1)))
|
||||
w.Write(topic_alt_frags[12])
|
||||
w.Write(phrases[4])
|
||||
w.Write(topic_alt_frags[13])
|
||||
}
|
||||
w.Write(topic_alt_frags[14])
|
||||
w.Write(topic_alt_frags[15])
|
||||
w.Write(phrases[5])
|
||||
w.Write(topic_alt_frags[16])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
|
||||
w.Write(topic_alt_frags[17])
|
||||
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
|
||||
w.Write(topic_alt_frags[18])
|
||||
if tmpl_topic_alt_vars.Topic.Sticky {
|
||||
w.Write(topic_alt_frags[19])
|
||||
} else {
|
||||
if tmpl_topic_alt_vars.Topic.IsClosed {
|
||||
w.Write(topic_alt_frags[20])
|
||||
}
|
||||
}
|
||||
w.Write(topic_alt_frags[21])
|
||||
w.Write([]byte(tmpl_topic_alt_vars.Topic.Title))
|
||||
w.Write(topic_alt_frags[22])
|
||||
w.Write([]byte(tmpl_topic_alt_vars.Topic.Title))
|
||||
w.Write(topic_alt_frags[23])
|
||||
if tmpl_topic_alt_vars.Topic.IsClosed {
|
||||
w.Write(topic_alt_frags[24])
|
||||
w.Write(phrases[6])
|
||||
w.Write(topic_alt_frags[25])
|
||||
w.Write(phrases[7])
|
||||
w.Write(topic_alt_frags[26])
|
||||
}
|
||||
if tmpl_topic_alt_vars.CurrentUser.Perms.EditTopic {
|
||||
w.Write(topic_alt_frags[27])
|
||||
w.Write([]byte(tmpl_topic_alt_vars.Topic.Title))
|
||||
w.Write(topic_alt_frags[28])
|
||||
w.Write(phrases[8])
|
||||
w.Write(topic_alt_frags[29])
|
||||
w.Write(phrases[9])
|
||||
w.Write(topic_alt_frags[30])
|
||||
}
|
||||
w.Write(topic_alt_frags[31])
|
||||
if tmpl_topic_alt_vars.Poll.ID > 0 {
|
||||
w.Write(topic_alt_frags[32])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Poll.ID)))
|
||||
w.Write(topic_alt_frags[33])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Poll.ID)))
|
||||
w.Write(topic_alt_frags[34])
|
||||
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
|
||||
w.Write(topic_alt_frags[35])
|
||||
w.Write(phrases[10])
|
||||
w.Write(topic_alt_frags[36])
|
||||
w.Write([]byte(tmpl_topic_alt_vars.Topic.Avatar))
|
||||
w.Write(topic_alt_frags[37])
|
||||
w.Write([]byte(tmpl_topic_alt_vars.Topic.UserLink))
|
||||
w.Write(topic_alt_frags[38])
|
||||
w.Write([]byte(tmpl_topic_alt_vars.Topic.CreatedByName))
|
||||
w.Write(topic_alt_frags[39])
|
||||
if tmpl_topic_alt_vars.Topic.Tag != "" {
|
||||
w.Write(topic_alt_frags[40])
|
||||
w.Write([]byte(tmpl_topic_alt_vars.Topic.Tag))
|
||||
w.Write(topic_alt_frags[41])
|
||||
} else {
|
||||
w.Write(topic_alt_frags[42])
|
||||
w.Write(phrases[11])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.Level)))
|
||||
w.Write(topic_alt_frags[43])
|
||||
}
|
||||
w.Write(topic_alt_frags[44])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Poll.ID)))
|
||||
w.Write(topic_alt_frags[45])
|
||||
if len(tmpl_topic_alt_vars.Poll.QuickOptions) != 0 {
|
||||
for _, item := range tmpl_topic_alt_vars.Poll.QuickOptions {
|
||||
w.Write(topic_alt_frags[46])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Poll.ID)))
|
||||
w.Write(topic_alt_frags[47])
|
||||
w.Write([]byte(strconv.Itoa(item.ID)))
|
||||
w.Write(topic_alt_frags[48])
|
||||
w.Write([]byte(strconv.Itoa(item.ID)))
|
||||
w.Write(topic_alt_frags[49])
|
||||
w.Write([]byte(strconv.Itoa(item.ID)))
|
||||
w.Write(topic_alt_frags[50])
|
||||
w.Write([]byte(strconv.Itoa(item.ID)))
|
||||
w.Write(topic_alt_frags[51])
|
||||
w.Write([]byte(item.Value))
|
||||
w.Write(topic_alt_frags[52])
|
||||
}
|
||||
}
|
||||
w.Write(topic_alt_frags[53])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Poll.ID)))
|
||||
w.Write(topic_alt_frags[54])
|
||||
w.Write(phrases[12])
|
||||
w.Write(topic_alt_frags[55])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Poll.ID)))
|
||||
w.Write(topic_alt_frags[56])
|
||||
w.Write(phrases[13])
|
||||
w.Write(topic_alt_frags[57])
|
||||
w.Write(phrases[14])
|
||||
w.Write(topic_alt_frags[58])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Poll.ID)))
|
||||
w.Write(topic_alt_frags[59])
|
||||
}
|
||||
w.Write(topic_alt_frags[60])
|
||||
w.Write(topic_alt_frags[61])
|
||||
w.Write(phrases[15])
|
||||
w.Write(topic_alt_frags[62])
|
||||
w.Write(phrases[16])
|
||||
w.Write(topic_alt_frags[63])
|
||||
w.Write([]byte(tmpl_topic_alt_vars.Topic.Avatar))
|
||||
w.Write(topic_alt_frags[64])
|
||||
w.Write([]byte(tmpl_topic_alt_vars.Topic.UserLink))
|
||||
w.Write(topic_alt_frags[65])
|
||||
w.Write([]byte(tmpl_topic_alt_vars.Topic.CreatedByName))
|
||||
w.Write(topic_alt_frags[66])
|
||||
if tmpl_topic_alt_vars.Topic.Tag != "" {
|
||||
w.Write(topic_alt_frags[67])
|
||||
w.Write([]byte(tmpl_topic_alt_vars.Topic.Tag))
|
||||
w.Write(topic_alt_frags[68])
|
||||
} else {
|
||||
w.Write(topic_alt_frags[69])
|
||||
w.Write(phrases[17])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.Level)))
|
||||
w.Write(topic_alt_frags[70])
|
||||
}
|
||||
w.Write(topic_alt_frags[71])
|
||||
w.Write([]byte(tmpl_topic_alt_vars.Topic.ContentHTML))
|
||||
w.Write(topic_alt_frags[72])
|
||||
w.Write([]byte(tmpl_topic_alt_vars.Topic.Content))
|
||||
w.Write(topic_alt_frags[73])
|
||||
if tmpl_topic_alt_vars.Topic.LikeCount > 0 {
|
||||
w.Write(topic_alt_frags[74])
|
||||
}
|
||||
w.Write(topic_alt_frags[75])
|
||||
if tmpl_topic_alt_vars.CurrentUser.Loggedin {
|
||||
if tmpl_topic_alt_vars.CurrentUser.Perms.LikeItem {
|
||||
w.Write(topic_alt_frags[76])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
|
||||
w.Write(topic_alt_frags[77])
|
||||
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
|
||||
w.Write(topic_alt_frags[78])
|
||||
if tmpl_topic_alt_vars.Topic.Liked {
|
||||
w.Write(topic_alt_frags[79])
|
||||
} else {
|
||||
w.Write(topic_alt_frags[80])
|
||||
}
|
||||
w.Write(topic_alt_frags[81])
|
||||
w.Write(phrases[18])
|
||||
w.Write(topic_alt_frags[82])
|
||||
}
|
||||
if tmpl_topic_alt_vars.CurrentUser.Perms.EditTopic {
|
||||
w.Write(topic_alt_frags[83])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
|
||||
w.Write(topic_alt_frags[84])
|
||||
w.Write(phrases[19])
|
||||
w.Write(topic_alt_frags[85])
|
||||
}
|
||||
if tmpl_topic_alt_vars.CurrentUser.Perms.DeleteTopic {
|
||||
w.Write(topic_alt_frags[86])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
|
||||
w.Write(topic_alt_frags[87])
|
||||
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
|
||||
w.Write(topic_alt_frags[88])
|
||||
w.Write(phrases[20])
|
||||
w.Write(topic_alt_frags[89])
|
||||
}
|
||||
if tmpl_topic_alt_vars.CurrentUser.Perms.CloseTopic {
|
||||
if tmpl_topic_alt_vars.Topic.IsClosed {
|
||||
w.Write(topic_alt_frags[90])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
|
||||
w.Write(topic_alt_frags[91])
|
||||
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
|
||||
w.Write(topic_alt_frags[92])
|
||||
w.Write(phrases[21])
|
||||
w.Write(topic_alt_frags[93])
|
||||
} else {
|
||||
w.Write(topic_alt_frags[94])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
|
||||
w.Write(topic_alt_frags[95])
|
||||
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
|
||||
w.Write(topic_alt_frags[96])
|
||||
w.Write(phrases[22])
|
||||
w.Write(topic_alt_frags[97])
|
||||
}
|
||||
}
|
||||
if tmpl_topic_alt_vars.CurrentUser.Perms.PinTopic {
|
||||
if tmpl_topic_alt_vars.Topic.Sticky {
|
||||
w.Write(topic_alt_frags[98])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
|
||||
w.Write(topic_alt_frags[99])
|
||||
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
|
||||
w.Write(topic_alt_frags[100])
|
||||
w.Write(phrases[23])
|
||||
w.Write(topic_alt_frags[101])
|
||||
} else {
|
||||
w.Write(topic_alt_frags[102])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
|
||||
w.Write(topic_alt_frags[103])
|
||||
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
|
||||
w.Write(topic_alt_frags[104])
|
||||
w.Write(phrases[24])
|
||||
w.Write(topic_alt_frags[105])
|
||||
}
|
||||
}
|
||||
if tmpl_topic_alt_vars.CurrentUser.Perms.ViewIPs {
|
||||
w.Write(topic_alt_frags[106])
|
||||
w.Write([]byte(tmpl_topic_alt_vars.Topic.IPAddress))
|
||||
w.Write(topic_alt_frags[107])
|
||||
w.Write(phrases[25])
|
||||
w.Write(topic_alt_frags[108])
|
||||
w.Write(phrases[26])
|
||||
w.Write(topic_alt_frags[109])
|
||||
}
|
||||
w.Write(topic_alt_frags[110])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
|
||||
w.Write(topic_alt_frags[111])
|
||||
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
|
||||
w.Write(topic_alt_frags[112])
|
||||
w.Write(phrases[27])
|
||||
w.Write(topic_alt_frags[113])
|
||||
}
|
||||
w.Write(topic_alt_frags[114])
|
||||
w.Write(phrases[28])
|
||||
w.Write(topic_alt_frags[115])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.LikeCount)))
|
||||
w.Write(topic_alt_frags[116])
|
||||
w.Write([]byte(tmpl_topic_alt_vars.Topic.RelativeCreatedAt))
|
||||
w.Write(topic_alt_frags[117])
|
||||
if tmpl_topic_alt_vars.CurrentUser.Perms.ViewIPs {
|
||||
w.Write(topic_alt_frags[118])
|
||||
w.Write([]byte(tmpl_topic_alt_vars.Topic.IPAddress))
|
||||
w.Write(topic_alt_frags[119])
|
||||
w.Write(phrases[29])
|
||||
w.Write(topic_alt_frags[120])
|
||||
w.Write([]byte(tmpl_topic_alt_vars.Topic.IPAddress))
|
||||
w.Write(topic_alt_frags[121])
|
||||
}
|
||||
w.Write(topic_alt_frags[122])
|
||||
if len(tmpl_topic_alt_vars.ItemList) != 0 {
|
||||
for _, item := range tmpl_topic_alt_vars.ItemList {
|
||||
w.Write(topic_alt_frags[123])
|
||||
w.Write(topic_alt_frags[124])
|
||||
if item.ActionType != "" {
|
||||
w.Write(topic_alt_frags[125])
|
||||
}
|
||||
w.Write(topic_alt_frags[126])
|
||||
w.Write(phrases[30])
|
||||
w.Write(topic_alt_frags[127])
|
||||
w.Write([]byte(item.Avatar))
|
||||
w.Write(topic_alt_frags[128])
|
||||
w.Write([]byte(item.UserLink))
|
||||
w.Write(topic_alt_frags[129])
|
||||
w.Write([]byte(item.CreatedByName))
|
||||
w.Write(topic_alt_frags[130])
|
||||
if item.Tag != "" {
|
||||
w.Write(topic_alt_frags[131])
|
||||
w.Write([]byte(item.Tag))
|
||||
w.Write(topic_alt_frags[132])
|
||||
} else {
|
||||
w.Write(topic_alt_frags[133])
|
||||
w.Write(phrases[31])
|
||||
w.Write([]byte(strconv.Itoa(item.Level)))
|
||||
w.Write(topic_alt_frags[134])
|
||||
}
|
||||
w.Write(topic_alt_frags[135])
|
||||
if item.ActionType != "" {
|
||||
w.Write(topic_alt_frags[136])
|
||||
}
|
||||
w.Write(topic_alt_frags[137])
|
||||
if item.ActionType != "" {
|
||||
w.Write(topic_alt_frags[138])
|
||||
w.Write([]byte(item.ActionIcon))
|
||||
w.Write(topic_alt_frags[139])
|
||||
w.Write([]byte(item.ActionType))
|
||||
w.Write(topic_alt_frags[140])
|
||||
} else {
|
||||
w.Write(topic_alt_frags[141])
|
||||
w.Write([]byte(item.ContentHtml))
|
||||
w.Write(topic_alt_frags[142])
|
||||
if item.LikeCount > 0 {
|
||||
w.Write(topic_alt_frags[143])
|
||||
}
|
||||
w.Write(topic_alt_frags[144])
|
||||
if tmpl_topic_alt_vars.CurrentUser.Loggedin {
|
||||
if tmpl_topic_alt_vars.CurrentUser.Perms.LikeItem {
|
||||
w.Write(topic_alt_frags[145])
|
||||
w.Write([]byte(strconv.Itoa(item.ID)))
|
||||
w.Write(topic_alt_frags[146])
|
||||
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
|
||||
w.Write(topic_alt_frags[147])
|
||||
if item.Liked {
|
||||
w.Write(topic_alt_frags[148])
|
||||
} else {
|
||||
w.Write(topic_alt_frags[149])
|
||||
}
|
||||
w.Write(topic_alt_frags[150])
|
||||
w.Write(phrases[32])
|
||||
w.Write(topic_alt_frags[151])
|
||||
}
|
||||
if tmpl_topic_alt_vars.CurrentUser.Perms.EditReply {
|
||||
w.Write(topic_alt_frags[152])
|
||||
w.Write([]byte(strconv.Itoa(item.ID)))
|
||||
w.Write(topic_alt_frags[153])
|
||||
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
|
||||
w.Write(topic_alt_frags[154])
|
||||
w.Write(phrases[33])
|
||||
w.Write(topic_alt_frags[155])
|
||||
}
|
||||
if tmpl_topic_alt_vars.CurrentUser.Perms.DeleteReply {
|
||||
w.Write(topic_alt_frags[156])
|
||||
w.Write([]byte(strconv.Itoa(item.ID)))
|
||||
w.Write(topic_alt_frags[157])
|
||||
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
|
||||
w.Write(topic_alt_frags[158])
|
||||
w.Write(phrases[34])
|
||||
w.Write(topic_alt_frags[159])
|
||||
}
|
||||
if tmpl_topic_alt_vars.CurrentUser.Perms.ViewIPs {
|
||||
w.Write(topic_alt_frags[160])
|
||||
w.Write([]byte(item.IPAddress))
|
||||
w.Write(topic_alt_frags[161])
|
||||
w.Write(phrases[35])
|
||||
w.Write(topic_alt_frags[162])
|
||||
w.Write(phrases[36])
|
||||
w.Write(topic_alt_frags[163])
|
||||
}
|
||||
w.Write(topic_alt_frags[164])
|
||||
w.Write([]byte(strconv.Itoa(item.ID)))
|
||||
w.Write(topic_alt_frags[165])
|
||||
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
|
||||
w.Write(topic_alt_frags[166])
|
||||
w.Write(phrases[37])
|
||||
w.Write(topic_alt_frags[167])
|
||||
}
|
||||
w.Write(topic_alt_frags[168])
|
||||
w.Write(phrases[38])
|
||||
w.Write(topic_alt_frags[169])
|
||||
w.Write([]byte(strconv.Itoa(item.LikeCount)))
|
||||
w.Write(topic_alt_frags[170])
|
||||
w.Write([]byte(item.RelativeCreatedAt))
|
||||
w.Write(topic_alt_frags[171])
|
||||
if tmpl_topic_alt_vars.CurrentUser.Perms.ViewIPs {
|
||||
w.Write(topic_alt_frags[172])
|
||||
w.Write([]byte(item.IPAddress))
|
||||
w.Write(topic_alt_frags[173])
|
||||
w.Write([]byte(item.IPAddress))
|
||||
w.Write(topic_alt_frags[174])
|
||||
}
|
||||
w.Write(topic_alt_frags[175])
|
||||
}
|
||||
w.Write(topic_alt_frags[176])
|
||||
}
|
||||
}
|
||||
w.Write(topic_alt_frags[177])
|
||||
if tmpl_topic_alt_vars.CurrentUser.Perms.CreateReply {
|
||||
w.Write(topic_alt_frags[178])
|
||||
w.Write(phrases[39])
|
||||
w.Write(topic_alt_frags[179])
|
||||
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Avatar))
|
||||
w.Write(topic_alt_frags[180])
|
||||
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Link))
|
||||
w.Write(topic_alt_frags[181])
|
||||
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Name))
|
||||
w.Write(topic_alt_frags[182])
|
||||
if tmpl_topic_alt_vars.CurrentUser.Tag != "" {
|
||||
w.Write(topic_alt_frags[183])
|
||||
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Tag))
|
||||
w.Write(topic_alt_frags[184])
|
||||
} else {
|
||||
w.Write(topic_alt_frags[185])
|
||||
w.Write(phrases[40])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.CurrentUser.Level)))
|
||||
w.Write(topic_alt_frags[186])
|
||||
}
|
||||
w.Write(topic_alt_frags[187])
|
||||
w.Write(phrases[41])
|
||||
w.Write(topic_alt_frags[188])
|
||||
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
|
||||
w.Write(topic_alt_frags[189])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
|
||||
w.Write(topic_alt_frags[190])
|
||||
w.Write(phrases[42])
|
||||
w.Write(topic_alt_frags[191])
|
||||
w.Write(phrases[43])
|
||||
w.Write(topic_alt_frags[192])
|
||||
w.Write(phrases[44])
|
||||
w.Write(topic_alt_frags[193])
|
||||
w.Write(phrases[45])
|
||||
w.Write(topic_alt_frags[194])
|
||||
if tmpl_topic_alt_vars.CurrentUser.Perms.UploadFiles {
|
||||
w.Write(topic_alt_frags[195])
|
||||
w.Write(phrases[46])
|
||||
w.Write(topic_alt_frags[196])
|
||||
}
|
||||
w.Write(topic_alt_frags[197])
|
||||
}
|
||||
w.Write(topic_alt_frags[198])
|
||||
w.Write(footer_frags[0])
|
||||
w.Write([]byte(common.BuildWidget("footer",tmpl_topic_alt_vars.Header)))
|
||||
w.Write(footer_frags[1])
|
||||
w.Write(phrases[47])
|
||||
w.Write(footer_frags[2])
|
||||
w.Write(phrases[48])
|
||||
w.Write(footer_frags[3])
|
||||
w.Write(phrases[49])
|
||||
w.Write(footer_frags[4])
|
||||
if len(tmpl_topic_alt_vars.Header.Themes) != 0 {
|
||||
for _, item := range tmpl_topic_alt_vars.Header.Themes {
|
||||
if !item.HideFromThemes {
|
||||
w.Write(footer_frags[5])
|
||||
w.Write([]byte(item.Name))
|
||||
w.Write(footer_frags[6])
|
||||
if tmpl_topic_alt_vars.Header.Theme.Name == item.Name {
|
||||
w.Write(footer_frags[7])
|
||||
}
|
||||
w.Write(footer_frags[8])
|
||||
w.Write([]byte(item.FriendlyName))
|
||||
w.Write(footer_frags[9])
|
||||
}
|
||||
}
|
||||
}
|
||||
w.Write(footer_frags[10])
|
||||
w.Write([]byte(common.BuildWidget("rightSidebar",tmpl_topic_alt_vars.Header)))
|
||||
w.Write(footer_frags[11])
|
||||
return nil
|
||||
}
|
|
@ -1,388 +0,0 @@
|
|||
// +build !no_templategen
|
||||
|
||||
// Code generated by Gosora. More below:
|
||||
/* This file was automatically generated by the software. Please don't edit it as your changes may be overwritten at any moment. */
|
||||
package main
|
||||
import "io"
|
||||
import "./common"
|
||||
import "strconv"
|
||||
|
||||
var topics_tmpl_phrase_id int
|
||||
|
||||
// nolint
|
||||
func init() {
|
||||
common.Template_topics_handle = Template_topics
|
||||
common.Ctemplates = append(common.Ctemplates,"topics")
|
||||
common.TmplPtrMap["topics"] = &common.Template_topics_handle
|
||||
common.TmplPtrMap["o_topics"] = Template_topics
|
||||
topics_tmpl_phrase_id = common.RegisterTmplPhraseNames([]string{
|
||||
"menu_hamburger_tooltip",
|
||||
"topics_head",
|
||||
"topic_list_create_topic_tooltip",
|
||||
"topic_list_create_topic_aria",
|
||||
"topic_list_moderate_tooltip",
|
||||
"topic_list_moderate_aria",
|
||||
"topics_locked_tooltip",
|
||||
"topics_locked_aria",
|
||||
"topic_list_what_to_do",
|
||||
"topic_list_moderate_delete",
|
||||
"topic_list_moderate_lock",
|
||||
"topic_list_moderate_move",
|
||||
"topic_list_moderate_run",
|
||||
"topic_list_move_head",
|
||||
"topic_list_move_button",
|
||||
"quick_topic_aria",
|
||||
"quick_topic_avatar_alt",
|
||||
"quick_topic_avatar_tooltip",
|
||||
"quick_topic_whatsup",
|
||||
"quick_topic_content_placeholder",
|
||||
"quick_topic_add_poll_option",
|
||||
"quick_topic_create_topic_button",
|
||||
"quick_topic_add_poll_button",
|
||||
"quick_topic_add_file_button",
|
||||
"quick_topic_cancel_button",
|
||||
"topics_list_aria",
|
||||
"status_closed_tooltip",
|
||||
"status_pinned_tooltip",
|
||||
"topics_no_topics",
|
||||
"topics_start_one",
|
||||
"paginator_prev_page_aria",
|
||||
"paginator_prev_page",
|
||||
"paginator_next_page_aria",
|
||||
"paginator_next_page",
|
||||
"footer_powered_by",
|
||||
"footer_made_with_love",
|
||||
"footer_theme_selector_aria",
|
||||
})
|
||||
}
|
||||
|
||||
// nolint
|
||||
func Template_topics(tmpl_topics_vars common.TopicListPage, w io.Writer) error {
|
||||
var phrases = common.GetTmplPhrasesBytes(topics_tmpl_phrase_id)
|
||||
w.Write(header_frags[0])
|
||||
w.Write([]byte(tmpl_topics_vars.Title))
|
||||
w.Write(header_frags[1])
|
||||
w.Write([]byte(tmpl_topics_vars.Header.Site.Name))
|
||||
w.Write(header_frags[2])
|
||||
w.Write([]byte(tmpl_topics_vars.Header.Theme.Name))
|
||||
w.Write(header_frags[3])
|
||||
if len(tmpl_topics_vars.Header.Stylesheets) != 0 {
|
||||
for _, item := range tmpl_topics_vars.Header.Stylesheets {
|
||||
w.Write(header_frags[4])
|
||||
w.Write([]byte(item))
|
||||
w.Write(header_frags[5])
|
||||
}
|
||||
}
|
||||
w.Write(header_frags[6])
|
||||
if len(tmpl_topics_vars.Header.Scripts) != 0 {
|
||||
for _, item := range tmpl_topics_vars.Header.Scripts {
|
||||
w.Write(header_frags[7])
|
||||
w.Write([]byte(item))
|
||||
w.Write(header_frags[8])
|
||||
}
|
||||
}
|
||||
w.Write(header_frags[9])
|
||||
w.Write([]byte(tmpl_topics_vars.CurrentUser.Session))
|
||||
w.Write(header_frags[10])
|
||||
w.Write([]byte(tmpl_topics_vars.Header.Site.URL))
|
||||
w.Write(header_frags[11])
|
||||
if tmpl_topics_vars.Header.MetaDesc != "" {
|
||||
w.Write(header_frags[12])
|
||||
w.Write([]byte(tmpl_topics_vars.Header.MetaDesc))
|
||||
w.Write(header_frags[13])
|
||||
}
|
||||
w.Write(header_frags[14])
|
||||
if !tmpl_topics_vars.CurrentUser.IsSuperMod {
|
||||
w.Write(header_frags[15])
|
||||
}
|
||||
w.Write(header_frags[16])
|
||||
w.Write([]byte(common.BuildWidget("leftOfNav",tmpl_topics_vars.Header)))
|
||||
w.Write(header_frags[17])
|
||||
w.Write([]byte(tmpl_topics_vars.Header.Site.ShortName))
|
||||
w.Write(header_frags[18])
|
||||
w.Write([]byte(common.BuildWidget("topMenu",tmpl_topics_vars.Header)))
|
||||
w.Write(header_frags[19])
|
||||
w.Write(phrases[0])
|
||||
w.Write(header_frags[20])
|
||||
w.Write([]byte(common.BuildWidget("rightOfNav",tmpl_topics_vars.Header)))
|
||||
w.Write(header_frags[21])
|
||||
if tmpl_topics_vars.Header.Widgets.RightSidebar != "" {
|
||||
w.Write(header_frags[22])
|
||||
}
|
||||
w.Write(header_frags[23])
|
||||
if len(tmpl_topics_vars.Header.NoticeList) != 0 {
|
||||
for _, item := range tmpl_topics_vars.Header.NoticeList {
|
||||
w.Write(notice_frags[0])
|
||||
w.Write([]byte(item))
|
||||
w.Write(notice_frags[1])
|
||||
}
|
||||
}
|
||||
w.Write(header_frags[24])
|
||||
w.Write(topics_frags[0])
|
||||
if tmpl_topics_vars.CurrentUser.ID != 0 {
|
||||
w.Write(topics_frags[1])
|
||||
}
|
||||
w.Write(topics_frags[2])
|
||||
w.Write(phrases[1])
|
||||
w.Write(topics_frags[3])
|
||||
if tmpl_topics_vars.CurrentUser.ID != 0 {
|
||||
w.Write(topics_frags[4])
|
||||
if len(tmpl_topics_vars.ForumList) != 0 {
|
||||
w.Write(topics_frags[5])
|
||||
w.Write(phrases[2])
|
||||
w.Write(topics_frags[6])
|
||||
w.Write(phrases[3])
|
||||
w.Write(topics_frags[7])
|
||||
w.Write(topics_frags[8])
|
||||
w.Write(phrases[4])
|
||||
w.Write(topics_frags[9])
|
||||
w.Write(phrases[5])
|
||||
w.Write(topics_frags[10])
|
||||
} else {
|
||||
w.Write(topics_frags[11])
|
||||
w.Write(phrases[6])
|
||||
w.Write(topics_frags[12])
|
||||
w.Write(phrases[7])
|
||||
w.Write(topics_frags[13])
|
||||
}
|
||||
w.Write(topics_frags[14])
|
||||
}
|
||||
w.Write(topics_frags[15])
|
||||
if tmpl_topics_vars.CurrentUser.ID != 0 {
|
||||
w.Write(topics_frags[16])
|
||||
w.Write(phrases[8])
|
||||
w.Write(topics_frags[17])
|
||||
w.Write(phrases[9])
|
||||
w.Write(topics_frags[18])
|
||||
w.Write(phrases[10])
|
||||
w.Write(topics_frags[19])
|
||||
w.Write(phrases[11])
|
||||
w.Write(topics_frags[20])
|
||||
w.Write(phrases[12])
|
||||
w.Write(topics_frags[21])
|
||||
if len(tmpl_topics_vars.ForumList) != 0 {
|
||||
w.Write(topics_frags[22])
|
||||
w.Write([]byte(tmpl_topics_vars.CurrentUser.Session))
|
||||
w.Write(topics_frags[23])
|
||||
w.Write(phrases[13])
|
||||
w.Write(topics_frags[24])
|
||||
if len(tmpl_topics_vars.ForumList) != 0 {
|
||||
for _, item := range tmpl_topics_vars.ForumList {
|
||||
w.Write(topics_frags[25])
|
||||
w.Write([]byte(strconv.Itoa(item.ID)))
|
||||
w.Write(topics_frags[26])
|
||||
w.Write([]byte(strconv.Itoa(item.ID)))
|
||||
w.Write(topics_frags[27])
|
||||
w.Write([]byte(item.Name))
|
||||
w.Write(topics_frags[28])
|
||||
}
|
||||
}
|
||||
w.Write(topics_frags[29])
|
||||
w.Write(phrases[14])
|
||||
w.Write(topics_frags[30])
|
||||
w.Write(phrases[15])
|
||||
w.Write(topics_frags[31])
|
||||
w.Write([]byte(tmpl_topics_vars.CurrentUser.Session))
|
||||
w.Write(topics_frags[32])
|
||||
w.Write([]byte(tmpl_topics_vars.CurrentUser.Avatar))
|
||||
w.Write(topics_frags[33])
|
||||
w.Write(phrases[16])
|
||||
w.Write(topics_frags[34])
|
||||
w.Write(phrases[17])
|
||||
w.Write(topics_frags[35])
|
||||
if len(tmpl_topics_vars.ForumList) != 0 {
|
||||
for _, item := range tmpl_topics_vars.ForumList {
|
||||
w.Write(topics_frags[36])
|
||||
if item.ID == tmpl_topics_vars.DefaultForum {
|
||||
w.Write(topics_frags[37])
|
||||
}
|
||||
w.Write(topics_frags[38])
|
||||
w.Write([]byte(strconv.Itoa(item.ID)))
|
||||
w.Write(topics_frags[39])
|
||||
w.Write([]byte(item.Name))
|
||||
w.Write(topics_frags[40])
|
||||
}
|
||||
}
|
||||
w.Write(topics_frags[41])
|
||||
w.Write(phrases[18])
|
||||
w.Write(topics_frags[42])
|
||||
w.Write(phrases[19])
|
||||
w.Write(topics_frags[43])
|
||||
w.Write(phrases[20])
|
||||
w.Write(topics_frags[44])
|
||||
w.Write(phrases[21])
|
||||
w.Write(topics_frags[45])
|
||||
w.Write(phrases[22])
|
||||
w.Write(topics_frags[46])
|
||||
if tmpl_topics_vars.CurrentUser.Perms.UploadFiles {
|
||||
w.Write(topics_frags[47])
|
||||
w.Write(phrases[23])
|
||||
w.Write(topics_frags[48])
|
||||
}
|
||||
w.Write(topics_frags[49])
|
||||
w.Write(phrases[24])
|
||||
w.Write(topics_frags[50])
|
||||
}
|
||||
}
|
||||
w.Write(topics_frags[51])
|
||||
w.Write(phrases[25])
|
||||
w.Write(topics_frags[52])
|
||||
if len(tmpl_topics_vars.TopicList) != 0 {
|
||||
for _, item := range tmpl_topics_vars.TopicList {
|
||||
w.Write(topics_frags[53])
|
||||
w.Write([]byte(strconv.Itoa(item.ID)))
|
||||
w.Write(topics_frags[54])
|
||||
if item.Sticky {
|
||||
w.Write(topics_frags[55])
|
||||
} else {
|
||||
if item.IsClosed {
|
||||
w.Write(topics_frags[56])
|
||||
}
|
||||
}
|
||||
w.Write(topics_frags[57])
|
||||
w.Write([]byte(item.Creator.Link))
|
||||
w.Write(topics_frags[58])
|
||||
w.Write([]byte(item.Creator.Avatar))
|
||||
w.Write(topics_frags[59])
|
||||
w.Write([]byte(item.Creator.Name))
|
||||
w.Write(topics_frags[60])
|
||||
w.Write([]byte(item.Creator.Name))
|
||||
w.Write(topics_frags[61])
|
||||
w.Write([]byte(item.Link))
|
||||
w.Write(topics_frags[62])
|
||||
w.Write([]byte(item.Title))
|
||||
w.Write(topics_frags[63])
|
||||
w.Write([]byte(item.Title))
|
||||
w.Write(topics_frags[64])
|
||||
if item.ForumName != "" {
|
||||
w.Write(topics_frags[65])
|
||||
w.Write([]byte(item.ForumLink))
|
||||
w.Write(topics_frags[66])
|
||||
w.Write([]byte(item.ForumName))
|
||||
w.Write(topics_frags[67])
|
||||
w.Write([]byte(item.ForumName))
|
||||
w.Write(topics_frags[68])
|
||||
}
|
||||
w.Write(topics_frags[69])
|
||||
w.Write([]byte(item.Creator.Link))
|
||||
w.Write(topics_frags[70])
|
||||
w.Write([]byte(item.Creator.Name))
|
||||
w.Write(topics_frags[71])
|
||||
w.Write([]byte(item.Creator.Name))
|
||||
w.Write(topics_frags[72])
|
||||
if item.IsClosed {
|
||||
w.Write(topics_frags[73])
|
||||
w.Write(phrases[26])
|
||||
w.Write(topics_frags[74])
|
||||
}
|
||||
if item.Sticky {
|
||||
w.Write(topics_frags[75])
|
||||
w.Write(phrases[27])
|
||||
w.Write(topics_frags[76])
|
||||
}
|
||||
w.Write(topics_frags[77])
|
||||
w.Write([]byte(strconv.Itoa(item.PostCount)))
|
||||
w.Write(topics_frags[78])
|
||||
w.Write([]byte(strconv.Itoa(item.LikeCount)))
|
||||
w.Write(topics_frags[79])
|
||||
if item.Sticky {
|
||||
w.Write(topics_frags[80])
|
||||
} else {
|
||||
if item.IsClosed {
|
||||
w.Write(topics_frags[81])
|
||||
}
|
||||
}
|
||||
w.Write(topics_frags[82])
|
||||
w.Write([]byte(item.LastUser.Link))
|
||||
w.Write(topics_frags[83])
|
||||
w.Write([]byte(item.LastUser.Avatar))
|
||||
w.Write(topics_frags[84])
|
||||
w.Write([]byte(item.LastUser.Name))
|
||||
w.Write(topics_frags[85])
|
||||
w.Write([]byte(item.LastUser.Name))
|
||||
w.Write(topics_frags[86])
|
||||
w.Write([]byte(item.LastUser.Link))
|
||||
w.Write(topics_frags[87])
|
||||
w.Write([]byte(item.LastUser.Name))
|
||||
w.Write(topics_frags[88])
|
||||
w.Write([]byte(item.LastUser.Name))
|
||||
w.Write(topics_frags[89])
|
||||
w.Write([]byte(item.RelativeLastReplyAt))
|
||||
w.Write(topics_frags[90])
|
||||
}
|
||||
} else {
|
||||
w.Write(topics_frags[91])
|
||||
w.Write(phrases[28])
|
||||
if tmpl_topics_vars.CurrentUser.Perms.CreateTopic {
|
||||
w.Write(topics_frags[92])
|
||||
w.Write(phrases[29])
|
||||
w.Write(topics_frags[93])
|
||||
}
|
||||
w.Write(topics_frags[94])
|
||||
}
|
||||
w.Write(topics_frags[95])
|
||||
if tmpl_topics_vars.LastPage > 1 {
|
||||
w.Write(paginator_frags[0])
|
||||
if tmpl_topics_vars.Page > 1 {
|
||||
w.Write(paginator_frags[1])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topics_vars.Page - 1)))
|
||||
w.Write(paginator_frags[2])
|
||||
w.Write(phrases[30])
|
||||
w.Write(paginator_frags[3])
|
||||
w.Write(phrases[31])
|
||||
w.Write(paginator_frags[4])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topics_vars.Page - 1)))
|
||||
w.Write(paginator_frags[5])
|
||||
}
|
||||
if len(tmpl_topics_vars.PageList) != 0 {
|
||||
for _, item := range tmpl_topics_vars.PageList {
|
||||
w.Write(paginator_frags[6])
|
||||
w.Write([]byte(strconv.Itoa(item)))
|
||||
w.Write(paginator_frags[7])
|
||||
w.Write([]byte(strconv.Itoa(item)))
|
||||
w.Write(paginator_frags[8])
|
||||
}
|
||||
}
|
||||
if tmpl_topics_vars.LastPage != tmpl_topics_vars.Page {
|
||||
w.Write(paginator_frags[9])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topics_vars.Page + 1)))
|
||||
w.Write(paginator_frags[10])
|
||||
w.Write([]byte(strconv.Itoa(tmpl_topics_vars.Page + 1)))
|
||||
w.Write(paginator_frags[11])
|
||||
w.Write(phrases[32])
|
||||
w.Write(paginator_frags[12])
|
||||
w.Write(phrases[33])
|
||||
w.Write(paginator_frags[13])
|
||||
}
|
||||
w.Write(paginator_frags[14])
|
||||
}
|
||||
w.Write(topics_frags[96])
|
||||
w.Write(footer_frags[0])
|
||||
w.Write([]byte(common.BuildWidget("footer",tmpl_topics_vars.Header)))
|
||||
w.Write(footer_frags[1])
|
||||
w.Write(phrases[34])
|
||||
w.Write(footer_frags[2])
|
||||
w.Write(phrases[35])
|
||||
w.Write(footer_frags[3])
|
||||
w.Write(phrases[36])
|
||||
w.Write(footer_frags[4])
|
||||
if len(tmpl_topics_vars.Header.Themes) != 0 {
|
||||
for _, item := range tmpl_topics_vars.Header.Themes {
|
||||
if !item.HideFromThemes {
|
||||
w.Write(footer_frags[5])
|
||||
w.Write([]byte(item.Name))
|
||||
w.Write(footer_frags[6])
|
||||
if tmpl_topics_vars.Header.Theme.Name == item.Name {
|
||||
w.Write(footer_frags[7])
|
||||
}
|
||||
w.Write(footer_frags[8])
|
||||
w.Write([]byte(item.FriendlyName))
|
||||
w.Write(footer_frags[9])
|
||||
}
|
||||
}
|
||||
}
|
||||
w.Write(footer_frags[10])
|
||||
w.Write([]byte(common.BuildWidget("rightSidebar",tmpl_topics_vars.Header)))
|
||||
w.Write(footer_frags[11])
|
||||
return nil
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
<nav class="colstack_left">
|
||||
<div class="colstack_item colstack_head rowhead">
|
||||
<div class="colstack_item colstack_head rowhead menuhead">
|
||||
<div class="rowitem">
|
||||
<a href="/user/edit/critical/"><h1>{{lang "account_menu_head"}}</h1></a>
|
||||
</div>
|
||||
|
|
|
@ -9,15 +9,15 @@
|
|||
<form action="/user/edit/critical/submit/?session={{.CurrentUser.Session}}" method="post">
|
||||
<div class="formrow real_first_child">
|
||||
<div class="formitem formlabel"><a>{{lang "account_password_current_password"}}</a></div>
|
||||
<div class="formitem"><input name="account-current-password" type="password" placeholder="*****" required /></div>
|
||||
<div class="formitem"><input name="account-current-password" type="password" placeholder="*****" autocomplete="current-password" required /></div>
|
||||
</div>
|
||||
<div class="formrow">
|
||||
<div class="formitem formlabel"><a>{{lang "account_password_new_password"}}</a></div>
|
||||
<div class="formitem"><input name="account-new-password" type="password" placeholder="*****" required /></div>
|
||||
<div class="formitem"><input name="account-new-password" type="password" placeholder="*****" autocomplete="new-password" required /></div>
|
||||
</div>
|
||||
<div class="formrow">
|
||||
<div class="formitem formlabel"><a>{{lang "account_password_confirm_password"}}</a></div>
|
||||
<div class="formitem"><input name="account-confirm-password" type="password" placeholder="*****" required /></div>
|
||||
<div class="formitem"><input name="account-confirm-password" type="password" placeholder="*****" autocomplete="new-password" required /></div>
|
||||
</div>
|
||||
<div class="formrow">
|
||||
<div class="formitem"><button name="account-button" class="formbutton form_middle_button">{{lang "account_password_update_button"}}</button></div>
|
||||
|
|
|
@ -67,6 +67,7 @@
|
|||
<a href="/panel/logs/mod/">{{lang "panel_menu_logs"}}</a>
|
||||
</div>
|
||||
{{if eq .Zone "logs"}}
|
||||
<div class="rowitem passive submenu"><a href="/panel/logs/regs/">{{lang "panel_menu_logs_registrations"}}</a></div>
|
||||
<div class="rowitem passive submenu"><a href="/panel/logs/mod/">{{lang "panel_menu_logs_moderators"}}</a></div>
|
||||
{{if .CurrentUser.Perms.ViewAdminLogs}}<div class="rowitem passive submenu"><a>{{lang "panel_menu_logs_administrators"}}</a></div>{{end}}
|
||||
{{end}}
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
</div>
|
||||
{{if .CurrentUser.Perms.EditUserPassword}}<div class="formrow">
|
||||
<div class="formitem formlabel"><a>{{lang "panel_user_password"}}</a></div>
|
||||
<div class="formitem"><input name="user-password" type="password" placeholder="*****" /></div>
|
||||
<div class="formitem"><input name="user-password" type="password" placeholder="*****" autocomplete="off" /></div>
|
||||
</div>{{end}}
|
||||
{{if .CurrentUser.Perms.EditUserEmail}}<div class="formrow">
|
||||
<div class="formitem formlabel"><a>{{lang "panel_user_email"}}</a></div>
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
{{template "header.html" . }}
|
||||
<div class="colstack panel_stack">
|
||||
{{template "panel-menu.html" . }}
|
||||
<main class="colstack_right">
|
||||
<div class="colstack_item colstack_head">
|
||||
<div class="rowitem"><h1>{{lang "panel_logs_registration_head"}}</h1></div>
|
||||
</div>
|
||||
<div id="panel_modlogs" class="colstack_item rowlist">
|
||||
{{range .Logs}}
|
||||
<div class="rowitem panel_compactrow">
|
||||
<span class="{{if not .Success}}panel_registration_attempt{{end}}" style="float: left;">
|
||||
<span>{{if not .Success}}{{lang "panel_logs_registration_attempt"}}: {{end}}{{.Username}} ({{lang "panel_logs_registration_email"}}: {{.Email}}){{if .ParsedReason}} ({{lang "panel_logs_registration_reason"}}: {{.ParsedReason}}){{end}}</span>
|
||||
{{if $.CurrentUser.Perms.ViewIPs}}<br /><small style="margin-left: 2px;font-size: 12px;">{{.IPAddress}}</small>{{end}}
|
||||
</span>
|
||||
<span class="to_right">
|
||||
<span style="font-size: 14px;">{{.DoneAt}}</span>
|
||||
</span>
|
||||
<div style="clear: both;"></div>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
{{if gt .LastPage 1}}
|
||||
{{template "paginator.html" . }}
|
||||
{{end}}
|
||||
</main>
|
||||
</div>
|
||||
{{template "footer.html" . }}
|
|
@ -19,7 +19,7 @@
|
|||
</div>
|
||||
<div class="formrow">
|
||||
<div class="formitem formlabel"><a id="confirm_password_label">{{lang "register_account_confirm_password"}}</a></div>
|
||||
<div class="formitem"><input name="confirm_password" type="password" placeholder="*****" aria-labelledby="confirm_password_label" required /></div>
|
||||
<div class="formitem"><input name="confirm_password" type="password" placeholder="*****" autocomplete="new-password" aria-labelledby="confirm_password_label" required /></div>
|
||||
</div>
|
||||
<div class="formrow">
|
||||
<div class="formitem"><button name="register-button" class="formbutton">{{lang "register_submit_button"}}</button></div>
|
||||
|
|
|
@ -234,9 +234,14 @@ ul {
|
|||
display: inline-block;
|
||||
}
|
||||
.colstack_head a h1 {
|
||||
font-size: 16px;
|
||||
color: var(--primary-link-color);
|
||||
}
|
||||
.colstack_head.menuhead a h1 {
|
||||
font-size: 16px;
|
||||
}
|
||||
.colstack_head h1 {
|
||||
font-size: 18px;
|
||||
}
|
||||
h1, h3 {
|
||||
-webkit-margin-before: 0;
|
||||
-webkit-margin-after: 0;
|
||||
|
|
Loading…
Reference in New Issue