Added support for phrases in CSS files.

Add support for phrases in template files.
Revamped every template to make them use phrases.
Revamped every CSS file to make them use phrases.

Tweaked the contributing document.
We now use LogError instead of log.Fatal() in a few places to capture more stack traces.
Fixed the suffixes on the topic and post count pages, as they were saying views instead of posts / topics.
Split the paginator into it's own template.
Refactored the theme logic to defer loading the static files to a later stage.
Greatly improved the accessibility with a number of ARIA attributes in places where there were none.
Removed the edit-topic and page templates.
Renamed the panel-adminlogs template to panel_adminlogs.
Non-existent phrases used by transpiled templates should now be logged.
Fixed a bug where alertbox was plopped down multiple times on one page.
The phrase placeholders are more informative now.
Added the CurrentLanguagePackName and GetLanguagePackByName API functions.
Notices are now shown when you delete, update, or create a forum.
This commit is contained in:
Azareal 2018-03-11 09:33:49 +00:00
parent 5a8b994877
commit 3821e626ce
84 changed files with 4293 additions and 2284 deletions

View File

@ -4,6 +4,8 @@ We're not accepting contributions right now, although you're welcome to poke me
All code must be unit tested where ever possible with the exception of JavaScript which is untestable with our current technologies, tread with caution there. All code must be unit tested where ever possible with the exception of JavaScript which is untestable with our current technologies, tread with caution there.
Use tabs not spaces for indentation.
# Golang # Golang
Use the standard linter and listen to what it tells you to do. Use the standard linter and listen to what it tells you to do.
@ -29,3 +31,7 @@ To keep consistency with Go code, variables must be camelCase.
# JSON # JSON
To keep consistency with Go code, map keys must be camelCase. To keep consistency with Go code, map keys must be camelCase.
# Phrases
Try to keep the name of the phrase close to the actual phrase in english to make it easier for localisers to reason about which phrase is which.

View File

@ -9,7 +9,6 @@ package common
import ( import (
"database/sql" "database/sql"
"errors" "errors"
"log"
"strconv" "strconv"
"strings" "strings"
@ -210,7 +209,7 @@ func NotifyWatchers(asid int64) error {
func notifyWatchers(asid int64) { func notifyWatchers(asid int64) {
rows, err := alertStmts.getWatchers.Query(asid) rows, err := alertStmts.getWatchers.Query(asid)
if err != nil && err != ErrNoRows { if err != nil && err != ErrNoRows {
log.Fatal(err.Error()) LogError(err)
return return
} }
defer rows.Close() defer rows.Close()
@ -220,14 +219,14 @@ func notifyWatchers(asid int64) {
for rows.Next() { for rows.Next() {
err := rows.Scan(&uid) err := rows.Scan(&uid)
if err != nil { if err != nil {
log.Fatal(err.Error()) LogError(err)
return return
} }
uids = append(uids, uid) uids = append(uids, uid)
} }
err = rows.Err() err = rows.Err()
if err != nil { if err != nil {
log.Fatal(err.Error()) LogError(err)
return return
} }
@ -235,7 +234,7 @@ func notifyWatchers(asid int64) {
var event, elementType string var event, elementType string
err = alertStmts.getActivityEntry.QueryRow(asid).Scan(&actorID, &targetUserID, &event, &elementType, &elementID) err = alertStmts.getActivityEntry.QueryRow(asid).Scan(&actorID, &targetUserID, &event, &elementType, &elementID)
if err != nil && err != ErrNoRows { if err != nil && err != ErrNoRows {
log.Fatal(err.Error()) LogError(err)
return return
} }

View File

@ -30,7 +30,7 @@ type SFile struct {
} }
type CSSData struct { type CSSData struct {
ComingSoon string Phrases map[string]string
} }
func (list SFileList) Init() error { func (list SFileList) Init() error {

View File

@ -48,6 +48,7 @@ type LanguagePack struct {
Errors map[string]map[string]string // map[category]map[name]value Errors map[string]map[string]string // map[category]map[name]value
PageTitles map[string]string PageTitles map[string]string
TmplPhrases map[string]string TmplPhrases map[string]string
CSSPhrases map[string]string
TmplIndicesToPhrases [][][]byte // [tmplID][index]phrase TmplIndicesToPhrases [][][]byte // [tmplID][index]phrase
} }
@ -84,7 +85,11 @@ func InitPhrases() error {
for tmplID, phraseNames := range langTmplIndicesToNames { for tmplID, phraseNames := range langTmplIndicesToNames {
var phraseSet = make([][]byte, len(phraseNames)) var phraseSet = make([][]byte, len(phraseNames))
for index, phraseName := range phraseNames { for index, phraseName := range phraseNames {
phraseSet[index] = []byte(langPack.TmplPhrases[phraseName]) phrase, ok := langPack.TmplPhrases[phraseName]
if !ok {
log.Print("Couldn't find template phrase '" + phraseName + "'")
}
phraseSet[index] = []byte(phrase)
} }
langPack.TmplIndicesToPhrases[tmplID] = phraseSet langPack.TmplIndicesToPhrases[tmplID] = phraseSet
} }
@ -131,7 +136,7 @@ func GetPhrase(name string) (string, bool) {
func GetGlobalPermPhrase(name string) string { func GetGlobalPermPhrase(name string) string {
res, ok := currentLangPack.Load().(*LanguagePack).GlobalPerms[name] res, ok := currentLangPack.Load().(*LanguagePack).GlobalPerms[name]
if !ok { if !ok {
return getPhrasePlaceholder() return getPhrasePlaceholder("perms", name)
} }
return res return res
} }
@ -139,7 +144,7 @@ func GetGlobalPermPhrase(name string) string {
func GetLocalPermPhrase(name string) string { func GetLocalPermPhrase(name string) string {
res, ok := currentLangPack.Load().(*LanguagePack).LocalPerms[name] res, ok := currentLangPack.Load().(*LanguagePack).LocalPerms[name]
if !ok { if !ok {
return getPhrasePlaceholder() return getPhrasePlaceholder("perms", name)
} }
return res return res
} }
@ -147,7 +152,7 @@ func GetLocalPermPhrase(name string) string {
func GetSettingLabel(name string) string { func GetSettingLabel(name string) string {
res, ok := currentLangPack.Load().(*LanguagePack).SettingLabels[name] res, ok := currentLangPack.Load().(*LanguagePack).SettingLabels[name]
if !ok { if !ok {
return getPhrasePlaceholder() return getPhrasePlaceholder("settings", name)
} }
return res return res
} }
@ -163,7 +168,7 @@ func GetAllPermPresets() map[string]string {
func GetAccountPhrase(name string) string { func GetAccountPhrase(name string) string {
res, ok := currentLangPack.Load().(*LanguagePack).Accounts[name] res, ok := currentLangPack.Load().(*LanguagePack).Accounts[name]
if !ok { if !ok {
return getPhrasePlaceholder() return getPhrasePlaceholder("account", name)
} }
return res return res
} }
@ -187,7 +192,7 @@ func GetOSPhrase(name string) (string, bool) {
func GetHumanLangPhrase(name string) (string, bool) { func GetHumanLangPhrase(name string) (string, bool) {
res, ok := currentLangPack.Load().(*LanguagePack).HumanLanguages[name] res, ok := currentLangPack.Load().(*LanguagePack).HumanLanguages[name]
if !ok { if !ok {
return "", false return getPhrasePlaceholder("humanlang", name), false
} }
return res, true return res, true
} }
@ -196,7 +201,7 @@ func GetHumanLangPhrase(name string) (string, bool) {
func GetErrorPhrase(category string, name string) string { func GetErrorPhrase(category string, name string) string {
res, ok := currentLangPack.Load().(*LanguagePack).Errors[category][name] res, ok := currentLangPack.Load().(*LanguagePack).Errors[category][name]
if !ok { if !ok {
return getPhrasePlaceholder() return getPhrasePlaceholder("error", name)
} }
return res return res
} }
@ -204,7 +209,7 @@ func GetErrorPhrase(category string, name string) string {
func GetTitlePhrase(name string) string { func GetTitlePhrase(name string) string {
res, ok := currentLangPack.Load().(*LanguagePack).PageTitles[name] res, ok := currentLangPack.Load().(*LanguagePack).PageTitles[name]
if !ok { if !ok {
return getPhrasePlaceholder() return getPhrasePlaceholder("title", name)
} }
return res return res
} }
@ -212,13 +217,17 @@ func GetTitlePhrase(name string) string {
func GetTmplPhrase(name string) string { func GetTmplPhrase(name string) string {
res, ok := currentLangPack.Load().(*LanguagePack).TmplPhrases[name] res, ok := currentLangPack.Load().(*LanguagePack).TmplPhrases[name]
if !ok { if !ok {
return getPhrasePlaceholder() return getPhrasePlaceholder("tmpl", name)
} }
return res return res
} }
func getPhrasePlaceholder() string { func GetCSSPhrases() map[string]string {
return "{name}" return currentLangPack.Load().(*LanguagePack).CSSPhrases
}
func getPhrasePlaceholder(prefix string, suffix string) string {
return "{lang." + prefix + "[" + suffix + "]}"
} }
// ? - Use runtime reflection for updating phrases? // ? - Use runtime reflection for updating phrases?
@ -244,6 +253,18 @@ func ChangeLanguagePack(name string) (exists bool) {
return true return true
} }
func CurrentLanguagePackName() (name string) {
return currentLangPack.Load().(*LanguagePack).Name
}
func GetLanguagePackByName(name string) (pack *LanguagePack, ok bool) {
packInt, ok := langPacks.Load(name)
if !ok {
return nil, false
}
return packInt.(*LanguagePack), true
}
// Template Transpiler Stuff // Template Transpiler Stuff
func RegisterTmplPhraseNames(phraseNames []string) (tmplID int) { func RegisterTmplPhraseNames(phraseNames []string) (tmplID int) {

View File

@ -353,7 +353,7 @@ func InitTemplates() error {
if !ok { if !ok {
panic("phraseNameInt is not a string") panic("phraseNameInt is not a string")
} }
return GetTmplPhrase(phraseName) return GetTmplPhrase(phraseName) // TODO: Log non-existent phrases?
} }
// The interpreted templates... // The interpreted templates...

View File

@ -129,6 +129,16 @@ func (themes ThemeList) LoadActiveStatus() error {
return rows.Err() return rows.Err()
} }
func (themes ThemeList) LoadStaticFiles() error {
for _, theme := range themes {
err := theme.LoadStaticFiles()
if err != nil {
return err
}
}
return nil
}
func InitThemes() error { func InitThemes() error {
themeFiles, err := ioutil.ReadDir("./themes") themeFiles, err := ioutil.ReadDir("./themes")
if err != nil { if err != nil {
@ -185,10 +195,6 @@ func InitThemes() error {
} }
} }
err = theme.LoadStaticFiles()
if err != nil {
return err
}
Themes[theme.Name] = theme Themes[theme.Name] = theme
} }
return nil return nil
@ -204,6 +210,7 @@ func (theme *Theme) LoadStaticFiles() error {
} }
func (theme *Theme) AddThemeStaticFiles() error { func (theme *Theme) AddThemeStaticFiles() error {
phraseMap := GetCSSPhrases()
// TODO: Use a function instead of a closure to make this more testable? What about a function call inside the closure to take the theme variable into account? // TODO: Use a function instead of a closure to make this more testable? What about a function call inside the closure to take the theme variable into account?
return filepath.Walk("./themes/"+theme.Name+"/public", func(path string, f os.FileInfo, err error) error { return filepath.Walk("./themes/"+theme.Name+"/public", func(path string, f os.FileInfo, err error) error {
DebugLog("Attempting to add static file '" + path + "' for default theme '" + theme.Name + "'") DebugLog("Attempting to add static file '" + path + "' for default theme '" + theme.Name + "'")
@ -225,7 +232,7 @@ func (theme *Theme) AddThemeStaticFiles() error {
var b bytes.Buffer var b bytes.Buffer
var pieces = strings.Split(path, "/") var pieces = strings.Split(path, "/")
var filename = pieces[len(pieces)-1] var filename = pieces[len(pieces)-1]
err = theme.ResourceTemplates.ExecuteTemplate(&b, filename, CSSData{ComingSoon: "We don't have any data to pass you yet!"}) err = theme.ResourceTemplates.ExecuteTemplate(&b, filename, CSSData{Phrases: phraseMap})
if err != nil { if err != nil {
return err return err
} }
@ -245,10 +252,10 @@ func (theme *Theme) MapTemplates() {
if theme.Templates != nil { if theme.Templates != nil {
for _, themeTmpl := range theme.Templates { for _, themeTmpl := range theme.Templates {
if themeTmpl.Name == "" { if themeTmpl.Name == "" {
log.Fatal("Invalid destination template name") LogError(errors.New("Invalid destination template name"))
} }
if themeTmpl.Source == "" { if themeTmpl.Source == "" {
log.Fatal("Invalid source template name") LogError(errors.New("Invalid source template name"))
} }
// `go generate` is one possibility for letting plugins inject custom page structs, but it would simply add another step of compilation. It might be simpler than the current build process from the perspective of the administrator? // `go generate` is one possibility for letting plugins inject custom page structs, but it would simply add another step of compilation. It might be simpler than the current build process from the perspective of the administrator?
@ -259,7 +266,7 @@ func (theme *Theme) MapTemplates() {
} }
sourceTmplPtr, ok := TmplPtrMap[themeTmpl.Source] sourceTmplPtr, ok := TmplPtrMap[themeTmpl.Source]
if !ok { if !ok {
log.Fatal("The source template doesn't exist!") LogError(errors.New("The source template doesn't exist!"))
} }
switch dTmplPtr := destTmplPtr.(type) { switch dTmplPtr := destTmplPtr.(type) {
@ -270,7 +277,7 @@ func (theme *Theme) MapTemplates() {
overridenTemplates[themeTmpl.Name] = true overridenTemplates[themeTmpl.Name] = true
*dTmplPtr = *sTmplPtr *dTmplPtr = *sTmplPtr
default: default:
log.Fatal("The source and destination templates are incompatible") LogError(errors.New("The source and destination templates are incompatible"))
} }
case *func(TopicsPage, http.ResponseWriter): case *func(TopicsPage, http.ResponseWriter):
switch sTmplPtr := sourceTmplPtr.(type) { switch sTmplPtr := sourceTmplPtr.(type) {
@ -279,7 +286,7 @@ func (theme *Theme) MapTemplates() {
overridenTemplates[themeTmpl.Name] = true overridenTemplates[themeTmpl.Name] = true
*dTmplPtr = *sTmplPtr *dTmplPtr = *sTmplPtr
default: default:
log.Fatal("The source and destination templates are incompatible") LogError(errors.New("The source and destination templates are incompatible"))
} }
case *func(ForumPage, http.ResponseWriter): case *func(ForumPage, http.ResponseWriter):
switch sTmplPtr := sourceTmplPtr.(type) { switch sTmplPtr := sourceTmplPtr.(type) {
@ -288,7 +295,7 @@ func (theme *Theme) MapTemplates() {
overridenTemplates[themeTmpl.Name] = true overridenTemplates[themeTmpl.Name] = true
*dTmplPtr = *sTmplPtr *dTmplPtr = *sTmplPtr
default: default:
log.Fatal("The source and destination templates are incompatible") LogError(errors.New("The source and destination templates are incompatible"))
} }
case *func(ForumsPage, http.ResponseWriter): case *func(ForumsPage, http.ResponseWriter):
switch sTmplPtr := sourceTmplPtr.(type) { switch sTmplPtr := sourceTmplPtr.(type) {
@ -297,7 +304,7 @@ func (theme *Theme) MapTemplates() {
overridenTemplates[themeTmpl.Name] = true overridenTemplates[themeTmpl.Name] = true
*dTmplPtr = *sTmplPtr *dTmplPtr = *sTmplPtr
default: default:
log.Fatal("The source and destination templates are incompatible") LogError(errors.New("The source and destination templates are incompatible"))
} }
case *func(ProfilePage, http.ResponseWriter): case *func(ProfilePage, http.ResponseWriter):
switch sTmplPtr := sourceTmplPtr.(type) { switch sTmplPtr := sourceTmplPtr.(type) {
@ -306,7 +313,7 @@ func (theme *Theme) MapTemplates() {
overridenTemplates[themeTmpl.Name] = true overridenTemplates[themeTmpl.Name] = true
*dTmplPtr = *sTmplPtr *dTmplPtr = *sTmplPtr
default: default:
log.Fatal("The source and destination templates are incompatible") LogError(errors.New("The source and destination templates are incompatible"))
} }
case *func(CreateTopicPage, http.ResponseWriter): case *func(CreateTopicPage, http.ResponseWriter):
switch sTmplPtr := sourceTmplPtr.(type) { switch sTmplPtr := sourceTmplPtr.(type) {
@ -315,7 +322,7 @@ func (theme *Theme) MapTemplates() {
overridenTemplates[themeTmpl.Name] = true overridenTemplates[themeTmpl.Name] = true
*dTmplPtr = *sTmplPtr *dTmplPtr = *sTmplPtr
default: default:
log.Fatal("The source and destination templates are incompatible") LogError(errors.New("The source and destination templates are incompatible"))
} }
case *func(IPSearchPage, http.ResponseWriter): case *func(IPSearchPage, http.ResponseWriter):
switch sTmplPtr := sourceTmplPtr.(type) { switch sTmplPtr := sourceTmplPtr.(type) {
@ -324,7 +331,7 @@ func (theme *Theme) MapTemplates() {
overridenTemplates[themeTmpl.Name] = true overridenTemplates[themeTmpl.Name] = true
*dTmplPtr = *sTmplPtr *dTmplPtr = *sTmplPtr
default: default:
log.Fatal("The source and destination templates are incompatible") LogError(errors.New("The source and destination templates are incompatible"))
} }
case *func(Page, http.ResponseWriter): case *func(Page, http.ResponseWriter):
switch sTmplPtr := sourceTmplPtr.(type) { switch sTmplPtr := sourceTmplPtr.(type) {
@ -333,10 +340,10 @@ func (theme *Theme) MapTemplates() {
overridenTemplates[themeTmpl.Name] = true overridenTemplates[themeTmpl.Name] = true
*dTmplPtr = *sTmplPtr *dTmplPtr = *sTmplPtr
default: default:
log.Fatal("The source and destination templates are incompatible") LogError(errors.New("The source and destination templates are incompatible"))
} }
default: default:
log.Fatal("Unknown destination template type!") LogError(errors.New("Unknown destination template type!"))
} }
} }
} }
@ -367,59 +374,59 @@ func ResetTemplateOverrides() {
case *func(TopicPage, http.ResponseWriter): case *func(TopicPage, http.ResponseWriter):
*dPtr = oPtr *dPtr = oPtr
default: default:
log.Fatal("The origin and destination templates are incompatible") LogError(errors.New("The source and destination templates are incompatible"))
} }
case func(TopicsPage, http.ResponseWriter): case func(TopicsPage, http.ResponseWriter):
switch dPtr := destTmplPtr.(type) { switch dPtr := destTmplPtr.(type) {
case *func(TopicsPage, http.ResponseWriter): case *func(TopicsPage, http.ResponseWriter):
*dPtr = oPtr *dPtr = oPtr
default: default:
log.Fatal("The origin and destination templates are incompatible") LogError(errors.New("The source and destination templates are incompatible"))
} }
case func(ForumPage, http.ResponseWriter): case func(ForumPage, http.ResponseWriter):
switch dPtr := destTmplPtr.(type) { switch dPtr := destTmplPtr.(type) {
case *func(ForumPage, http.ResponseWriter): case *func(ForumPage, http.ResponseWriter):
*dPtr = oPtr *dPtr = oPtr
default: default:
log.Fatal("The origin and destination templates are incompatible") LogError(errors.New("The source and destination templates are incompatible"))
} }
case func(ForumsPage, http.ResponseWriter): case func(ForumsPage, http.ResponseWriter):
switch dPtr := destTmplPtr.(type) { switch dPtr := destTmplPtr.(type) {
case *func(ForumsPage, http.ResponseWriter): case *func(ForumsPage, http.ResponseWriter):
*dPtr = oPtr *dPtr = oPtr
default: default:
log.Fatal("The origin and destination templates are incompatible") LogError(errors.New("The source and destination templates are incompatible"))
} }
case func(ProfilePage, http.ResponseWriter): case func(ProfilePage, http.ResponseWriter):
switch dPtr := destTmplPtr.(type) { switch dPtr := destTmplPtr.(type) {
case *func(ProfilePage, http.ResponseWriter): case *func(ProfilePage, http.ResponseWriter):
*dPtr = oPtr *dPtr = oPtr
default: default:
log.Fatal("The origin and destination templates are incompatible") LogError(errors.New("The source and destination templates are incompatible"))
} }
case func(CreateTopicPage, http.ResponseWriter): case func(CreateTopicPage, http.ResponseWriter):
switch dPtr := destTmplPtr.(type) { switch dPtr := destTmplPtr.(type) {
case *func(CreateTopicPage, http.ResponseWriter): case *func(CreateTopicPage, http.ResponseWriter):
*dPtr = oPtr *dPtr = oPtr
default: default:
log.Fatal("The origin and destination templates are incompatible") LogError(errors.New("The source and destination templates are incompatible"))
} }
case func(IPSearchPage, http.ResponseWriter): case func(IPSearchPage, http.ResponseWriter):
switch dPtr := destTmplPtr.(type) { switch dPtr := destTmplPtr.(type) {
case *func(IPSearchPage, http.ResponseWriter): case *func(IPSearchPage, http.ResponseWriter):
*dPtr = oPtr *dPtr = oPtr
default: default:
log.Fatal("The origin and destination templates are incompatible") LogError(errors.New("The source and destination templates are incompatible"))
} }
case func(Page, http.ResponseWriter): case func(Page, http.ResponseWriter):
switch dPtr := destTmplPtr.(type) { switch dPtr := destTmplPtr.(type) {
case *func(Page, http.ResponseWriter): case *func(Page, http.ResponseWriter):
*dPtr = oPtr *dPtr = oPtr
default: default:
log.Fatal("The origin and destination templates are incompatible") LogError(errors.New("The source and destination templates are incompatible"))
} }
default: default:
log.Fatal("Unknown destination template type!") LogError(errors.New("Unknown destination template type!"))
} }
log.Print("The template override was reset") log.Print("The template override was reset")
} }

View File

@ -228,6 +228,26 @@
}, },
"TmplPhrases": { "TmplPhrases": {
"menu_forums_tooltip":"Forum List",
"menu_forums_aria":"The Forum list",
"menu_topics_tooltip":"Topic List",
"menu_topics_aria":"The topic list",
"menu_alert_counter_aria":"The number of alerts",
"menu_alert_list_aria":"The alert list",
"menu_account_tooltip":"Account Manager",
"menu_account_aria":"The account manager",
"menu_profile_tooltip":"Your profile",
"menu_profile_aria":"Your profile",
"menu_panel_tooltip":"Control Panel",
"menu_panel_aria":"The Control Panel",
"menu_logout_tooltip":"Logout",
"menu_logout_aria":"Log out of your account",
"menu_register_tooltip":"Register",
"menu_register_aria":"Create a new account",
"menu_login_tooltip":"Login",
"menu_login_aria":"Login to your account",
"menu_hamburger_tooltip":"Menu",
"login_head":"Login", "login_head":"Login",
"login_account_name":"Account Name", "login_account_name":"Account Name",
"login_account_password":"Password", "login_account_password":"Password",
@ -241,9 +261,440 @@
"register_account_confirm_password":"Confirm Password", "register_account_confirm_password":"Confirm Password",
"register_submit_button":"Create Account", "register_submit_button":"Create Account",
"account_menu_head":"My Account",
"account_menu_avatar":"Avatar",
"account_menu_username":"Username",
"account_menu_password":"Password",
"account_menu_email":"Email",
"account_menu_notifications":"Notifications",
"account_avatar_head":"Edit Avatar",
"account_avatar_upload_label":"Upload Avatar",
"account_avatar_update_button":"Update",
"account_email_head":"Emails",
"account_email_primary":"Primary",
"account_email_secondary":"Secondary",
"account_email_verified":"Verified",
"account_email_resend_email":"Resend Verification Email",
"account_username_head":"Edit Username",
"account_username_current_username":"Current Username",
"account_username_new_username":"New Username",
"account_username_update_button":"Update",
"account_password_head":"Edit Password",
"account_password_current_password":"Current Password",
"account_password_new_password":"New Password",
"account_password_confirm_password":"Confirm Password",
"account_password_update_button":"Update",
"areyousure_head":"Are you sure?",
"areyousure_continue":"Continue",
"create_topic_head":"Create Topic",
"create_topic_board":"Board",
"create_topic_name":"Topic Name",
"create_topic_content":"Content",
"create_topic_placeholder":"Insert content here",
"create_topic_create_topic_button":"Create Topic",
"create_topic_add_file_button":"Add File",
"quick_topic_aria":"Quick Topic Form",
"quick_topic_avatar_tooltip":"Your Avatar",
"quick_topic_avatar_alt":"Your Avatar",
"quick_topic_whatsup":"What's up?",
"quick_topic_placeholder":"Insert post here",
"quick_topic_add_poll_option":"Add new poll option",
"quick_topic_create_topic_button":"Create Topic",
"quick_topic_add_poll_button":"Add Poll",
"quick_topic_add_file_button":"Add File",
"quick_topic_cancel_button":"Cancel",
"topic_list_create_topic_tooltip":"Create Topic",
"topic_list_create_topic_aria":"Create a topic",
"topic_list_moderate_tooltip":"Moderate",
"topic_list_moderate_aria":"Moderate Posts",
"topic_list_what_to_do":"What do you want to do with these 18 topics?",
"topic_list_moderate_delete":"Delete them",
"topic_list_moderate_lock":"Lock them",
"topic_list_moderate_move":"Move them",
"topic_list_moderate_run":"Run",
"topic_list_move_head":"Move these topics to?",
"topic_list_move_button":"Move Topics",
"status_closed_tooltip":"Status: Closed",
"status_pinned_tooltip":"Status: Pinned",
"topics_head":"All Topics",
"topics_locked_tooltip":"You don't have the permissions needed to create a topic",
"topics_locked_aria":"You don't have the permissions needed to make a topic anywhere",
"topics_list_aria":"A list containing topics from every forum",
"topics_no_topics":"There aren't any topics yet.",
"topics_start_one":"Start one?",
"forum_locked_tooltip":"You don't have the permissions needed to create a topic",
"forum_locked_aria":"You don't have the permissions needed to make a topic in this forum",
"forum_list_aria":"A list containing topics for the specified forum",
"forum_no_topics":"There aren't any topics in this forum yet.",
"forum_start_one":"Start one?",
"forums_head":"Forums",
"forums_no_description":"No description",
"forums_none":"None",
"forums_no_forums":"You don't have access to any forums.",
"topic_opening_post_aria":"The opening post for this topic",
"topic_status_closed_aria":"This topic has been locked",
"topic_title_input_aria":"Topic Title Input",
"topic_update_button":"Update",
"topic_userinfo_aria":"The information on the poster",
"topic_poll_aria":"The main poll for this topic",
"topic_poll_vote":"Vote",
"topic_poll_results":"Results",
"topic_poll_cancel":"Cancel",
"topic_post_controls_aria":"Controls and Author Information",
"topic_unlike_tooltip":"Unlike",
"topic_unlike_aria":"Unlike this topic",
"topic_like_tooltip":"Like",
"topic_like_aria":"Like this topic",
"topic_edit_tooltip":"Edit Topic",
"topic_edit_aria":"Edit this topic",
"topic_delete_tooltip":"Delete Topic",
"topic_delete_aria":"Delete this topic",
"topic_unlock_tooltip":"Unlock Topic",
"topic_unlock_aria":"Unlock this topic",
"topic_lock_tooltip":"Lock Topic",
"topic_lock_aria":"Lock this topic",
"topic_unpin_tooltip":"Unpin Topic",
"topic_unpin_aria":"Unpin this topic",
"topic_pin_tooltip":"Pin Topic",
"topic_pin_aria":"Pin this topic",
"topic_ip_tooltip":"View IP",
"topic_ip_full_tooltip":"IP Address",
"topic_ip_full_aria":"This user's IP Address",
"topic_flag_tooltip":"Flag this topic",
"topic_flag_aria":"Flag this topic",
"topic_report_tooltip":"Report this topic",
"topic_report_aria":"Report this topic",
"topic_like_count_aria":"The number of likes on this topic",
"topic_like_count_tooltip":"Like Count",
"topic_level_aria":"The poster's level",
"topic_level_tooltip":"Level",
"topic_current_page_aria":"The current page for this topic",
"topic_post_like_tooltip":"Like this",
"topic_post_like_aria":"Like this post",
"topic_post_unlike_tooltip":"Unlike this",
"topic_post_unlike_aria":"Unlike this post",
"topic_post_edit_tooltip":"Edit Reply",
"topic_post_edit_aria":"Edit this post",
"topic_post_delete_tooltip":"Delete Reply",
"topic_post_delete_aria":"Delete this post",
"topic_post_ip_tooltip":"View IP",
"topic_post_flag_tooltip":"Flag this reply",
"topic_post_flag_aria":"Flag this reply",
"topic_post_like_count_tooltip":"Like Count",
"topic_post_level_aria":"The poster's level",
"topic_post_level_tooltip":"Level",
"topic_reply_aria":"The quick reply form",
"topic_reply_content":"Insert reply here",
"topic_reply_content_alt":"What do you think?",
"topic_reply_add_poll_option":"Add new poll option",
"topic_reply_button":"Create Reply",
"topic_reply_add_poll_button":"Add Poll",
"topic_reply_add_file_button":"Add File",
"topic_level_prefix":"Level ",
"topic_your_information":"Your information",
"paginator_less_than":"<",
"paginator_greater_than":">",
"paginator_prev_page":"Prev",
"paginator_prev_page_aria":"Go to the previous page",
"paginator_next_page":"Next",
"paginator_next_page_aria":"Go to the next page",
"profile_login_for_options":"Login for options",
"profile_add_friend":"Add Friend",
"profile_unban":"Unban",
"profile_ban":"Ban",
"profile_report_user_tooltip":"Report User",
"profile_report_user_aria":"Report User",
"profile_ban_user_head":"Ban User",
"profile_ban_user_notice":"If all the fields are left blank, the ban will be permanent.",
"profile_ban_user_days":"Days",
"profile_ban_user_weeks":"Weeks",
"profile_ban_user_months":"Months",
"profile_ban_user_reason":"Reason",
"profile_ban_user_button":"Ban User",
"profile_comments_head":"Comments",
"profile_comments_edit_tooltip":"Edit Item",
"profile_comments_edit_aria":"Edit Item",
"profile_comments_delete_tooltip":"Delete Item",
"profile_comments_delete_aria":"Delete Item",
"profile_comments_report_tooltip":"Report Item",
"profile_comments_report_aria":"Report Item",
"profile_comments_form_content":"Insert comment here",
"profile_comments_form_button":"Create Reply",
"ip_search_head":"IP Search", "ip_search_head":"IP Search",
"ip_search_search_button":"Search",
"ip_search_no_users":"No users found.", "ip_search_no_users":"No users found.",
"error_head":"An error has occured" "error_head":"An error has occured",
"footer_thingymawhatsit":"Can you please keep the powered by notice? ;)",
"footer_powered_by":"Powered by Gosora",
"footer_made_with_love":"Made with love by Azareal",
"footer_theme_selector_aria":"Change the site's appearance",
"option_yes":"Yes",
"option_no":"No",
"panel_menu_head":"Control Panel",
"panel_menu_users":"Users",
"panel_menu_groups":"Groups",
"panel_menu_forums":"Forums",
"panel_menu_settings":"Settings",
"panel_menu_word_filters":"Word Filters",
"panel_menu_themes":"Themes",
"panel_menu_events":"Events",
"panel_menu_statistics":"Statistics",
"panel_menu_statistics_posts":"Posts",
"panel_menu_statistics_topics":"Topics",
"panel_menu_statistics_forums":"Forums",
"panel_menu_statistics_routes":"Routes",
"panel_menu_statistics_agents":"Agents",
"panel_menu_statistics_systems":"Systems",
"panel_menu_statistics_languages":"Languages",
"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_system":"System",
"panel_menu_plugins":"Plugins",
"panel_menu_backups":"Backups",
"panel_menu_debug":"Debug",
"panel_dashboard_head":"Dashboard",
"panel_users_head":"Users",
"panel_users_profile":"Profile",
"panel_users_unban":"Unban",
"panel_users_ban":"Ban",
"panel_users_activate":"Activate",
"panel_user_head":"User Editor",
"panel_user_name":"Name",
"panel_user_name_placeholder":"Jane Doe",
"panel_user_password":"Password",
"panel_user_email":"Email",
"panel_user_group":"Group",
"panel_user_update_button":"Update User",
"panel_forums_head":"Forums",
"panel_forums_hidden":"Hidden",
"panel_forums_edit_button_tooltip":"Edit Forum",
"panel_forums_edit_button_aria":"Edit Forum",
"panel_forums_update_button":"Update",
"panel_forums_delete_button_tooltip":"Delete Forum",
"panel_forums_delete_button_aria":"Delete Forum",
"panel_forums_full_edit_button":"Full Edit",
"panel_forums_create_head":"Add Forum",
"panel_forums_create_name_label":"Name",
"panel_forums_create_name":"Super Secret Forum",
"panel_forums_create_description_label":"Description",
"panel_forums_create_description":"Where all the super secret stuff happens",
"panel_forums_active_label":"Active",
"panel_forums_preset_label":"Preset",
"panel_preset_everyone":"Everyone",
"panel_preset_announcements":"Announcements",
"panel_preset_member_only":"Member Only",
"panel_preset_staff_only":"Staff Only",
"panel_preset_admin_only":"Admin Only",
"panel_preset_archive":"Archive",
"panel_preset_custom":"Custom",
"panel_forums_create_button":"Add Forum",
"panel_forum_head_suffix":" Forum",
"panel_forum_name":"Name",
"panel_forum_name_placeholder":"General Forum",
"panel_forum_description":"Description",
"panel_forum_description_placeholder":"Where the general stuff happens",
"panel_forum_active":"Active",
"panel_forum_preset":"Preset",
"panel_forum_update_button":"Update Forum",
"panel_forum_permissions_head":"Forum Permissions",
"panel_forum_edit_button":"Edit",
"panel_forum_short_update_button":"Update",
"panel_forum_full_edit_button":"Full Edit",
"panel_groups_head":"Groups",
"panel_groups_rank_prefix":"Rank ",
"panel_groups_edit_group_button_aria":"Edit Group",
"panel_groups_create_head":"Create Group",
"panel_groups_create_name":"Name",
"panel_groups_create_name_placeholder":"Administrator",
"panel_groups_create_type":"Type",
"panel_groups_create_tag":"Tag",
"panel_groups_create_create_group_button":"Add Group",
"panel_group_menu_head":"Group Editor",
"panel_group_menu_general":"General",
"panel_group_menu_promotions":"Promotions",
"panel_group_menu_permissions":"Permissions",
"panel_group_head_suffix":" Group",
"panel_group_name":"Name",
"panel_group_name_placeholder":"Random Group",
"panel_group_type":"Type",
"panel_group_tag":"Tag",
"panel_group_tag_placeholder":"VIP",
"panel_group_update_button":"Update Group",
"panel_word_filters_head":"Word Filters",
"panel_word_filters_edit_button_aria":"Edit Word Filter",
"panel_word_filters_update_button":"Update",
"panel_word_filters_delete_button_aria":"Delete Word Filter",
"panel_word_filters_no_filters":"You don't have any word filters yet.",
"panel_word_filters_create_head":"Add Filter",
"panel_word_filters_create_find":"Find",
"panel_word_filters_create_find_placeholder":"fuck",
"panel_word_filters_create_replacement":"Replacement",
"panel_word_filters_create_replacement_placeholder":"fudge",
"panel_word_filters_create_create_word_filter_button":"Add Filter",
"panel_statistics_views_head_suffix":" Views",
"panel_statistics_user_agents_head":"User Agents",
"panel_statistics_forums_head":"Forums",
"panel_statistics_languages_head":"Languages",
"panel_statistics_post_counts_head":"Post Counts",
"panel_statistics_referrers_head":"Referrers",
"panel_statistics_routes_head":"Routes",
"panel_statistics_operating_systems_head":"Operating Systems",
"panel_statistics_topic_counts_head":"Topic Counts",
"panel_statistics_requests_head":"Requests",
"panel_statistics_time_range_one_month":"1 month",
"panel_statistics_time_range_one_week":"1 week",
"panel_statistics_time_range_two_days":"2 days",
"panel_statistics_time_range_one_day":"1 day",
"panel_statistics_time_range_twelve_hours":"12 hours",
"panel_statistics_time_range_six_hours":"6 hours",
"panel_statistics_post_counts_chart_aria":"Post Chart",
"panel_statistics_topic_counts_chart_aria":"Topic Chart",
"panel_statistics_requests_chart_aria":"Requests Chart",
"panel_statistics_details_head":"Details",
"panel_statistics_post_counts_table_aria":"Post Table, this has the same information as the post chart",
"panel_statistics_topic_counts_table_aria":"Topic Table, this has the same information as the topic chart",
"panel_statistics_route_views_table_aria":"View Table, this has the same information as the view chart",
"panel_statistics_requests_table_aria":"View Table, this has the same information as the view chart",
"panel_statistics_views_suffix":" views",
"panel_statistics_posts_suffix":" posts",
"panel_statistics_topics_suffix":" topics",
"panel_statistics_user_agents_no_user_agents":"No user agents could be found in the selected time range",
"panel_statistics_forums_no_forums":"No forum view counts could be found in the selected time range",
"panel_statistics_languages_no_languages":"No language could be found in the selected time range",
"panel_statistics_post_counts_no_post_counts":"No posts could be found in the selected time range",
"panel_statistics_referrers_no_referrers":"No referrers could be found in the selected time range",
"panel_statistics_routes_no_routes":"No route view counts could be found in the selected time range",
"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_plugins_head":"Plugins",
"panel_plugins_author_prefix":"Author: ",
"panel_plugins_settings":"Settings",
"panel_plugins_deactivate":"Deactivate",
"panel_plugins_activate":"Activate",
"panel_plugins_install":"Install",
"panel_themes_primary_themes":"Primary Themes",
"panel_themes_variant_themes":"Variant Themes",
"panel_themes_author_prefix":"Author: ",
"panel_themes_mobile_friendly_tooltip":"Mobile Friendly",
"panel_themes_mobile_friendly_aria":"Mobile Friendly",
"panel_themes_default":"Default",
"panel_themes_make_default":"Make Default",
"panel_settings_head":"Settings",
"panel_setting_head":"Edit Setting",
"panel_setting_name":"Setting Name",
"panel_setting_value":"Setting Value",
"panel_setting_update_button":"Update Setting",
"panel_backups_head":"Backups",
"panel_backups_download":"Download",
"panel_backups_no_backups":"There aren't any backups available at this time.",
"panel_debug_head":"Debug",
"panel_debug_uptime_label":"Uptime",
"panel_debug_open_database_connections_label":"Open DB Conns",
"panel_debug_adapter_label":"Adapter"
},
"CSSPhrases": {
"pipe":"|",
"menu_forums":"Forums",
"menu_topics":"Topics",
"menu_alerts":"Alerts",
"menu_account":"Account",
"menu_profile":"Profile",
"menu_panel":"Panel",
"menu_logout":"Logout",
"menu_login":"Login",
"menu_register":"Register",
"topics_click_topics_to_select":"Click the topics to select them",
"topics_new_topic":"New Topic",
"forum_locked":"Locked",
"topics_replies_suffix":" replies",
"forums_topics_suffix":" topics",
"topics_gap_likes_suffix":" likes",
"topics_likes_suffix":"likes",
"topics_last":"Last",
"topics_starter":"Starter",
"topic_like_count_suffix":" likes",
"topic_plus":"+",
"topic_plus_one":"+1",
"topic_gap_up":" up",
"topic_level":"Level",
"topic_edit_button_text":"Edit",
"topic_delete_button_text":"Delete",
"topic_ip_button_text":"IP",
"topic_lock_button_text":"Lock",
"topic_unlock_button_text":"Unlock",
"topic_pin_button_text":"Pin",
"topic_unpin_button_text":"Unpin",
"topic_report_button_text":"Report",
"topic_flag_button_text":"Flag",
"panel_rank_admins":"Admins",
"panel_rank_mods":"Mods",
"panel_rank_banned":"Banned",
"panel_rank_guests":"Guests",
"panel_rank_members":"Members",
"panel_preset_announcements":"Announcements",
"panel_preset_member_only":"Member Only",
"panel_preset_staff_only":"Staff Only",
"panel_preset_admin_only":"Admin Only",
"panel_preset_archive":"Archive",
"panel_preset_public":"Public",
"panel_active_hidden":"Hidden",
"panel_perms_no_access":"No Access",
"panel_perms_read_only":"Read Only",
"panel_perms_can_post":"Can Post",
"panel_perms_can_moderate":"Can Moderate",
"panel_perms_custom":"Custom",
"panel_perms_default":"Default",
"panel_edit_button_text":"Edit",
"panel_delete_button_text":"Delete"
} }
} }

View File

@ -54,25 +54,34 @@ func afterDBInit() (err error) {
} }
log.Print("Loading the static files.") log.Print("Loading the static files.")
err = common.Themes.LoadStaticFiles()
if err != nil {
return err
}
err = common.StaticFiles.Init() err = common.StaticFiles.Init()
if err != nil { if err != nil {
return err return err
} }
log.Print("Initialising the widgets") log.Print("Initialising the widgets")
err = common.InitWidgets() err = common.InitWidgets()
if err != nil { if err != nil {
return err return err
} }
log.Print("Initialising the authentication system") log.Print("Initialising the authentication system")
common.Auth, err = common.NewDefaultAuth() common.Auth, err = common.NewDefaultAuth()
if err != nil { if err != nil {
return err return err
} }
log.Print("Loading the word filters")
err = common.LoadWordFilters() err = common.LoadWordFilters()
if err != nil { if err != nil {
return err return err
} }
log.Print("Initialising the stores")
common.ModLogs, err = common.NewModLogStore() common.ModLogs, err = common.NewModLogStore()
if err != nil { if err != nil {
return err return err

View File

@ -196,6 +196,15 @@ func routePanelForums(w http.ResponseWriter, r *http.Request, user common.User)
forumList = append(forumList, fadmin) forumList = append(forumList, fadmin)
} }
} }
if r.FormValue("created") == "1" {
headerVars.NoticeList = append(headerVars.NoticeList, "The forum was successfully created")
} else if r.FormValue("deleted") == "1" {
headerVars.NoticeList = append(headerVars.NoticeList, "The forum was successfully deleted")
} else if r.FormValue("updated") == "1" {
headerVars.NoticeList = append(headerVars.NoticeList, "The forum was successfully updated")
}
pi := common.PanelPage{common.GetTitlePhrase("panel_forums"), user, headerVars, stats, "forums", forumList, nil} pi := common.PanelPage{common.GetTitlePhrase("panel_forums"), user, headerVars, stats, "forums", forumList, nil}
return panelRenderTemplate("panel_forums", w, r, user, &pi) return panelRenderTemplate("panel_forums", w, r, user, &pi)
} }
@ -220,7 +229,7 @@ func routePanelForumsCreateSubmit(w http.ResponseWriter, r *http.Request, user c
return common.InternalError(err, w, r) return common.InternalError(err, w, r)
} }
http.Redirect(w, r, "/panel/forums/", http.StatusSeeOther) http.Redirect(w, r, "/panel/forums/?created=1", http.StatusSeeOther)
return nil return nil
} }
@ -282,7 +291,7 @@ func routePanelForumsDeleteSubmit(w http.ResponseWriter, r *http.Request, user c
return common.InternalError(err, w, r) return common.InternalError(err, w, r)
} }
http.Redirect(w, r, "/panel/forums/", http.StatusSeeOther) http.Redirect(w, r, "/panel/forums/?deleted=1", http.StatusSeeOther)
return nil return nil
} }
@ -325,6 +334,10 @@ func routePanelForumsEdit(w http.ResponseWriter, r *http.Request, user common.Us
gplist = append(gplist, common.GroupForumPermPreset{group, common.ForumPermsToGroupForumPreset(group.Forums[fid])}) gplist = append(gplist, common.GroupForumPermPreset{group, common.ForumPermsToGroupForumPreset(group.Forums[fid])})
} }
if r.FormValue("updated") == "1" {
headerVars.NoticeList = append(headerVars.NoticeList, "The forum was successfully updated")
}
pi := common.PanelEditForumPage{common.GetTitlePhrase("panel_edit_forum"), user, headerVars, stats, "forums", forum.ID, forum.Name, forum.Desc, forum.Active, forum.Preset, gplist} pi := common.PanelEditForumPage{common.GetTitlePhrase("panel_edit_forum"), user, headerVars, stats, "forums", forum.ID, forum.Name, forum.Desc, forum.Active, forum.Preset, gplist}
if common.RunPreRenderHook("pre_render_panel_edit_forum", w, r, &user, &pi) { if common.RunPreRenderHook("pre_render_panel_edit_forum", w, r, &user, &pi) {
return nil return nil
@ -375,6 +388,7 @@ func routePanelForumsEditSubmit(w http.ResponseWriter, r *http.Request, user com
if err != nil { if err != nil {
return common.InternalErrorJSQ(err, w, r, isJs) return common.InternalErrorJSQ(err, w, r, isJs)
} }
// ? Should we redirect to the forum editor instead?
return panelSuccessRedirect("/panel/forums/", w, r, isJs) return panelSuccessRedirect("/panel/forums/", w, r, isJs)
} }
@ -411,7 +425,7 @@ func routePanelForumsEditPermsSubmit(w http.ResponseWriter, r *http.Request, use
return common.LocalErrorJSQ(err.Error(), w, r, user, isJs) return common.LocalErrorJSQ(err.Error(), w, r, user, isJs)
} }
return panelSuccessRedirect("/panel/forums/edit/"+strconv.Itoa(fid), w, r, isJs) return panelSuccessRedirect("/panel/forums/edit/"+strconv.Itoa(fid)+"?updated=1", w, r, isJs)
} }
// A helper function for the Advanced portion of the Forum Perms Editor // A helper function for the Advanced portion of the Forum Perms Editor
@ -486,6 +500,10 @@ func routePanelForumsEditPermsAdvance(w http.ResponseWriter, r *http.Request, us
addNameLangToggle("CloseTopic", forumPerms.CloseTopic) addNameLangToggle("CloseTopic", forumPerms.CloseTopic)
addNameLangToggle("MoveTopic", forumPerms.MoveTopic) addNameLangToggle("MoveTopic", forumPerms.MoveTopic)
if r.FormValue("updated") == "1" {
headerVars.NoticeList = append(headerVars.NoticeList, "The forum permissions were successfully updated")
}
pi := common.PanelEditForumGroupPage{common.GetTitlePhrase("panel_edit_forum"), user, headerVars, stats, "forums", forum.ID, gid, forum.Name, forum.Desc, forum.Active, forum.Preset, formattedPermList} pi := common.PanelEditForumGroupPage{common.GetTitlePhrase("panel_edit_forum"), user, headerVars, stats, "forums", forum.ID, gid, forum.Name, forum.Desc, forum.Active, forum.Preset, formattedPermList}
if common.RunPreRenderHook("pre_render_panel_edit_forum", w, r, &user, &pi) { if common.RunPreRenderHook("pre_render_panel_edit_forum", w, r, &user, &pi) {
return nil return nil
@ -550,7 +568,7 @@ func routePanelForumsEditPermsAdvanceSubmit(w http.ResponseWriter, r *http.Reque
return common.LocalErrorJSQ(err.Error(), w, r, user, isJs) return common.LocalErrorJSQ(err.Error(), w, r, user, isJs)
} }
return panelSuccessRedirect("/panel/forums/edit/perms/"+strconv.Itoa(fid)+"-"+strconv.Itoa(gid), w, r, isJs) return panelSuccessRedirect("/panel/forums/edit/perms/"+strconv.Itoa(fid)+"-"+strconv.Itoa(gid)+"?updated=1", w, r, isJs)
} }
type AnalyticsTimeRange struct { type AnalyticsTimeRange struct {

View File

@ -15,7 +15,29 @@ func init() {
common.TmplPtrMap["error"] = &common.Template_error_handle common.TmplPtrMap["error"] = &common.Template_error_handle
common.TmplPtrMap["o_error"] = Template_error common.TmplPtrMap["o_error"] = Template_error
error_Tmpl_Phrase_ID = common.RegisterTmplPhraseNames([]string{ error_Tmpl_Phrase_ID = common.RegisterTmplPhraseNames([]string{
"menu_forums_aria",
"menu_forums_tooltip",
"menu_topics_aria",
"menu_topics_tooltip",
"menu_alert_counter_aria",
"menu_alert_list_aria",
"menu_account_aria",
"menu_account_tooltip",
"menu_profile_aria",
"menu_profile_tooltip",
"menu_panel_aria",
"menu_panel_tooltip",
"menu_logout_aria",
"menu_logout_tooltip",
"menu_register_aria",
"menu_register_tooltip",
"menu_login_aria",
"menu_login_tooltip",
"menu_hamburger_tooltip",
"error_head", "error_head",
"footer_powered_by",
"footer_made_with_love",
"footer_theme_selector_aria",
}) })
} }
@ -63,16 +85,54 @@ w.Write(menu_0)
w.Write(menu_1) w.Write(menu_1)
w.Write([]byte(tmpl_error_vars.Header.Site.ShortName)) w.Write([]byte(tmpl_error_vars.Header.Site.ShortName))
w.Write(menu_2) w.Write(menu_2)
if tmpl_error_vars.CurrentUser.Loggedin { w.Write(phrases[0])
w.Write(menu_3) w.Write(menu_3)
w.Write([]byte(tmpl_error_vars.CurrentUser.Link)) w.Write(phrases[1])
w.Write(menu_4) w.Write(menu_4)
w.Write([]byte(tmpl_error_vars.CurrentUser.Session)) w.Write(phrases[2])
w.Write(menu_5) w.Write(menu_5)
} else { w.Write(phrases[3])
w.Write(menu_6) w.Write(menu_6)
} w.Write(phrases[4])
w.Write(menu_7) w.Write(menu_7)
w.Write(phrases[5])
w.Write(menu_8)
if tmpl_error_vars.CurrentUser.Loggedin {
w.Write(menu_9)
w.Write(phrases[6])
w.Write(menu_10)
w.Write(phrases[7])
w.Write(menu_11)
w.Write([]byte(tmpl_error_vars.CurrentUser.Link))
w.Write(menu_12)
w.Write(phrases[8])
w.Write(menu_13)
w.Write(phrases[9])
w.Write(menu_14)
w.Write(phrases[10])
w.Write(menu_15)
w.Write(phrases[11])
w.Write(menu_16)
w.Write([]byte(tmpl_error_vars.CurrentUser.Session))
w.Write(menu_17)
w.Write(phrases[12])
w.Write(menu_18)
w.Write(phrases[13])
w.Write(menu_19)
} else {
w.Write(menu_20)
w.Write(phrases[14])
w.Write(menu_21)
w.Write(phrases[15])
w.Write(menu_22)
w.Write(phrases[16])
w.Write(menu_23)
w.Write(phrases[17])
w.Write(menu_24)
}
w.Write(menu_25)
w.Write(phrases[18])
w.Write(menu_26)
w.Write(header_17) w.Write(header_17)
if tmpl_error_vars.Header.Widgets.RightSidebar != "" { if tmpl_error_vars.Header.Widgets.RightSidebar != "" {
w.Write(header_18) w.Write(header_18)
@ -85,31 +145,38 @@ w.Write([]byte(item))
w.Write(header_21) w.Write(header_21)
} }
} }
w.Write(header_22)
w.Write(error_0) w.Write(error_0)
w.Write(phrases[0]) w.Write(phrases[19])
w.Write(error_1) w.Write(error_1)
w.Write([]byte(tmpl_error_vars.Something.(string))) w.Write([]byte(tmpl_error_vars.Something.(string)))
w.Write(error_2) w.Write(error_2)
w.Write(footer_0) w.Write(footer_0)
w.Write([]byte(common.BuildWidget("footer",tmpl_error_vars.Header))) w.Write([]byte(common.BuildWidget("footer",tmpl_error_vars.Header)))
w.Write(footer_1) w.Write(footer_1)
w.Write(phrases[20])
w.Write(footer_2)
w.Write(phrases[21])
w.Write(footer_3)
w.Write(phrases[22])
w.Write(footer_4)
if len(tmpl_error_vars.Header.Themes) != 0 { if len(tmpl_error_vars.Header.Themes) != 0 {
for _, item := range tmpl_error_vars.Header.Themes { for _, item := range tmpl_error_vars.Header.Themes {
if !item.HideFromThemes { if !item.HideFromThemes {
w.Write(footer_2)
w.Write([]byte(item.Name))
w.Write(footer_3)
if tmpl_error_vars.Header.Theme.Name == item.Name {
w.Write(footer_4)
}
w.Write(footer_5) w.Write(footer_5)
w.Write([]byte(item.FriendlyName)) w.Write([]byte(item.Name))
w.Write(footer_6) w.Write(footer_6)
} if tmpl_error_vars.Header.Theme.Name == item.Name {
}
}
w.Write(footer_7) w.Write(footer_7)
w.Write([]byte(common.BuildWidget("rightSidebar",tmpl_error_vars.Header))) }
w.Write(footer_8) w.Write(footer_8)
w.Write([]byte(item.FriendlyName))
w.Write(footer_9)
}
}
}
w.Write(footer_10)
w.Write([]byte(common.BuildWidget("rightSidebar",tmpl_error_vars.Header)))
w.Write(footer_11)
return nil return nil
} }

View File

@ -3,9 +3,9 @@
// Code generated by Gosora. More below: // 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. */ /* This file was automatically generated by the software. Please don't edit it as your changes may be overwritten at any moment. */
package main package main
import "strconv"
import "net/http" import "net/http"
import "./common" import "./common"
import "strconv"
var forum_Tmpl_Phrase_ID int var forum_Tmpl_Phrase_ID int
@ -15,10 +15,68 @@ func init() {
common.Ctemplates = append(common.Ctemplates,"forum") common.Ctemplates = append(common.Ctemplates,"forum")
common.TmplPtrMap["forum"] = &common.Template_forum_handle common.TmplPtrMap["forum"] = &common.Template_forum_handle
common.TmplPtrMap["o_forum"] = Template_forum common.TmplPtrMap["o_forum"] = Template_forum
forum_Tmpl_Phrase_ID = common.RegisterTmplPhraseNames([]string{
"menu_forums_aria",
"menu_forums_tooltip",
"menu_topics_aria",
"menu_topics_tooltip",
"menu_alert_counter_aria",
"menu_alert_list_aria",
"menu_account_aria",
"menu_account_tooltip",
"menu_profile_aria",
"menu_profile_tooltip",
"menu_panel_aria",
"menu_panel_tooltip",
"menu_logout_aria",
"menu_logout_tooltip",
"menu_register_aria",
"menu_register_tooltip",
"menu_login_aria",
"menu_login_tooltip",
"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 // nolint
func Template_forum(tmpl_forum_vars common.ForumPage, w http.ResponseWriter) error { func Template_forum(tmpl_forum_vars common.ForumPage, w http.ResponseWriter) error {
var phrases = common.GetTmplPhrasesBytes(forum_Tmpl_Phrase_ID)
w.Write(header_0) w.Write(header_0)
w.Write([]byte(tmpl_forum_vars.Title)) w.Write([]byte(tmpl_forum_vars.Title))
w.Write(header_1) w.Write(header_1)
@ -60,16 +118,54 @@ w.Write(menu_0)
w.Write(menu_1) w.Write(menu_1)
w.Write([]byte(tmpl_forum_vars.Header.Site.ShortName)) w.Write([]byte(tmpl_forum_vars.Header.Site.ShortName))
w.Write(menu_2) w.Write(menu_2)
if tmpl_forum_vars.CurrentUser.Loggedin { w.Write(phrases[0])
w.Write(menu_3) w.Write(menu_3)
w.Write([]byte(tmpl_forum_vars.CurrentUser.Link)) w.Write(phrases[1])
w.Write(menu_4) w.Write(menu_4)
w.Write([]byte(tmpl_forum_vars.CurrentUser.Session)) w.Write(phrases[2])
w.Write(menu_5) w.Write(menu_5)
} else { w.Write(phrases[3])
w.Write(menu_6) w.Write(menu_6)
} w.Write(phrases[4])
w.Write(menu_7) w.Write(menu_7)
w.Write(phrases[5])
w.Write(menu_8)
if tmpl_forum_vars.CurrentUser.Loggedin {
w.Write(menu_9)
w.Write(phrases[6])
w.Write(menu_10)
w.Write(phrases[7])
w.Write(menu_11)
w.Write([]byte(tmpl_forum_vars.CurrentUser.Link))
w.Write(menu_12)
w.Write(phrases[8])
w.Write(menu_13)
w.Write(phrases[9])
w.Write(menu_14)
w.Write(phrases[10])
w.Write(menu_15)
w.Write(phrases[11])
w.Write(menu_16)
w.Write([]byte(tmpl_forum_vars.CurrentUser.Session))
w.Write(menu_17)
w.Write(phrases[12])
w.Write(menu_18)
w.Write(phrases[13])
w.Write(menu_19)
} else {
w.Write(menu_20)
w.Write(phrases[14])
w.Write(menu_21)
w.Write(phrases[15])
w.Write(menu_22)
w.Write(phrases[16])
w.Write(menu_23)
w.Write(phrases[17])
w.Write(menu_24)
}
w.Write(menu_25)
w.Write(phrases[18])
w.Write(menu_26)
w.Write(header_17) w.Write(header_17)
if tmpl_forum_vars.Header.Widgets.RightSidebar != "" { if tmpl_forum_vars.Header.Widgets.RightSidebar != "" {
w.Write(header_18) w.Write(header_18)
@ -82,176 +178,248 @@ w.Write([]byte(item))
w.Write(header_21) w.Write(header_21)
} }
} }
w.Write(header_22)
if tmpl_forum_vars.Page > 1 { if tmpl_forum_vars.Page > 1 {
w.Write(forum_0) w.Write(forum_0)
w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Forum.ID))) w.Write(phrases[19])
w.Write(forum_1) w.Write(forum_1)
w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Page - 1))) w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Forum.ID)))
w.Write(forum_2) w.Write(forum_2)
w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Page - 1)))
w.Write(forum_3)
w.Write(phrases[20])
w.Write(forum_4)
} }
if tmpl_forum_vars.LastPage != tmpl_forum_vars.Page { if tmpl_forum_vars.LastPage != tmpl_forum_vars.Page {
w.Write(forum_3)
w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Forum.ID)))
w.Write(forum_4)
w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Page + 1)))
w.Write(forum_5) w.Write(forum_5)
} w.Write(phrases[21])
w.Write(forum_6) w.Write(forum_6)
if tmpl_forum_vars.CurrentUser.ID != 0 { w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Forum.ID)))
w.Write(forum_7) w.Write(forum_7)
} w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Page + 1)))
w.Write(forum_8) w.Write(forum_8)
w.Write([]byte(tmpl_forum_vars.Title)) w.Write(phrases[22])
w.Write(forum_9) w.Write(forum_9)
if tmpl_forum_vars.CurrentUser.ID != 0 { }
w.Write(forum_10) w.Write(forum_10)
if tmpl_forum_vars.CurrentUser.Perms.CreateTopic {
w.Write(forum_11)
w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Forum.ID)))
w.Write(forum_12)
w.Write(forum_13)
} else {
w.Write(forum_14)
}
w.Write(forum_15)
}
w.Write(forum_16)
if tmpl_forum_vars.CurrentUser.ID != 0 { if tmpl_forum_vars.CurrentUser.ID != 0 {
w.Write(forum_17) w.Write(forum_11)
}
w.Write(forum_12)
w.Write([]byte(tmpl_forum_vars.Title))
w.Write(forum_13)
if tmpl_forum_vars.CurrentUser.ID != 0 {
w.Write(forum_14)
if tmpl_forum_vars.CurrentUser.Perms.CreateTopic { if tmpl_forum_vars.CurrentUser.Perms.CreateTopic {
w.Write(forum_18) w.Write(forum_15)
w.Write([]byte(tmpl_forum_vars.CurrentUser.Avatar)) w.Write(phrases[23])
w.Write(forum_19) w.Write(forum_16)
w.Write(phrases[24])
w.Write(forum_17)
w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Forum.ID))) w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Forum.ID)))
w.Write(forum_18)
w.Write(forum_19)
w.Write(phrases[25])
w.Write(forum_20) w.Write(forum_20)
if tmpl_forum_vars.CurrentUser.Perms.UploadFiles { w.Write(phrases[26])
w.Write(forum_21) w.Write(forum_21)
} } else {
w.Write(forum_22) w.Write(forum_22)
} w.Write(phrases[27])
}
w.Write(forum_23) w.Write(forum_23)
w.Write(phrases[28])
w.Write(forum_24)
}
w.Write(forum_25)
}
w.Write(forum_26)
if tmpl_forum_vars.CurrentUser.ID != 0 {
w.Write(forum_27)
w.Write(phrases[29])
w.Write(forum_28)
w.Write(phrases[30])
w.Write(forum_29)
w.Write(phrases[31])
w.Write(forum_30)
w.Write(phrases[32])
w.Write(forum_31)
w.Write(phrases[33])
w.Write(forum_32)
if tmpl_forum_vars.CurrentUser.Perms.CreateTopic {
w.Write(forum_33)
w.Write(phrases[34])
w.Write(forum_34)
w.Write([]byte(tmpl_forum_vars.CurrentUser.Avatar))
w.Write(forum_35)
w.Write(phrases[35])
w.Write(forum_36)
w.Write(phrases[36])
w.Write(forum_37)
w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Forum.ID)))
w.Write(forum_38)
w.Write(phrases[37])
w.Write(forum_39)
w.Write(phrases[38])
w.Write(forum_40)
w.Write(phrases[39])
w.Write(forum_41)
w.Write(phrases[40])
w.Write(forum_42)
if tmpl_forum_vars.CurrentUser.Perms.UploadFiles {
w.Write(forum_43)
w.Write(phrases[41])
w.Write(forum_44)
}
w.Write(forum_45)
w.Write(phrases[42])
w.Write(forum_46)
}
}
w.Write(forum_47)
w.Write(phrases[43])
w.Write(forum_48)
if len(tmpl_forum_vars.ItemList) != 0 { if len(tmpl_forum_vars.ItemList) != 0 {
for _, item := range tmpl_forum_vars.ItemList { for _, item := range tmpl_forum_vars.ItemList {
w.Write(forum_24)
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(forum_25)
if item.Sticky {
w.Write(forum_26)
} else {
if item.IsClosed {
w.Write(forum_27)
}
}
w.Write(forum_28)
w.Write([]byte(item.Creator.Link))
w.Write(forum_29)
w.Write([]byte(item.Creator.Avatar))
w.Write(forum_30)
w.Write([]byte(item.Creator.Name))
w.Write(forum_31)
w.Write([]byte(item.Creator.Name))
w.Write(forum_32)
w.Write([]byte(item.Link))
w.Write(forum_33)
w.Write([]byte(item.Title))
w.Write(forum_34)
w.Write([]byte(item.Creator.Link))
w.Write(forum_35)
w.Write([]byte(item.Creator.Name))
w.Write(forum_36)
if item.IsClosed {
w.Write(forum_37)
}
if item.Sticky {
w.Write(forum_38)
}
w.Write(forum_39)
w.Write([]byte(strconv.Itoa(item.PostCount)))
w.Write(forum_40)
w.Write([]byte(strconv.Itoa(item.LikeCount)))
w.Write(forum_41)
if item.Sticky {
w.Write(forum_42)
} else {
if item.IsClosed {
w.Write(forum_43)
}
}
w.Write(forum_44)
w.Write([]byte(item.LastUser.Link))
w.Write(forum_45)
w.Write([]byte(item.LastUser.Avatar))
w.Write(forum_46)
w.Write([]byte(item.LastUser.Name))
w.Write(forum_47)
w.Write([]byte(item.LastUser.Name))
w.Write(forum_48)
w.Write([]byte(item.LastUser.Link))
w.Write(forum_49) w.Write(forum_49)
w.Write([]byte(item.LastUser.Name)) w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(forum_50) w.Write(forum_50)
w.Write([]byte(item.RelativeLastReplyAt)) if item.Sticky {
w.Write(forum_51) w.Write(forum_51)
} else {
if item.IsClosed {
w.Write(forum_52)
}
}
w.Write(forum_53)
w.Write([]byte(item.Creator.Link))
w.Write(forum_54)
w.Write([]byte(item.Creator.Avatar))
w.Write(forum_55)
w.Write([]byte(item.Creator.Name))
w.Write(forum_56)
w.Write([]byte(item.Creator.Name))
w.Write(forum_57)
w.Write([]byte(item.Link))
w.Write(forum_58)
w.Write([]byte(item.Title))
w.Write(forum_59)
w.Write([]byte(item.Creator.Link))
w.Write(forum_60)
w.Write([]byte(item.Creator.Name))
w.Write(forum_61)
if item.IsClosed {
w.Write(forum_62)
w.Write(phrases[44])
w.Write(forum_63)
}
if item.Sticky {
w.Write(forum_64)
w.Write(phrases[45])
w.Write(forum_65)
}
w.Write(forum_66)
w.Write([]byte(strconv.Itoa(item.PostCount)))
w.Write(forum_67)
w.Write([]byte(strconv.Itoa(item.LikeCount)))
w.Write(forum_68)
if item.Sticky {
w.Write(forum_69)
} else {
if item.IsClosed {
w.Write(forum_70)
}
}
w.Write(forum_71)
w.Write([]byte(item.LastUser.Link))
w.Write(forum_72)
w.Write([]byte(item.LastUser.Avatar))
w.Write(forum_73)
w.Write([]byte(item.LastUser.Name))
w.Write(forum_74)
w.Write([]byte(item.LastUser.Name))
w.Write(forum_75)
w.Write([]byte(item.LastUser.Link))
w.Write(forum_76)
w.Write([]byte(item.LastUser.Name))
w.Write(forum_77)
w.Write([]byte(item.RelativeLastReplyAt))
w.Write(forum_78)
} }
} else { } else {
w.Write(forum_52) w.Write(forum_79)
w.Write(phrases[46])
if tmpl_forum_vars.CurrentUser.Perms.CreateTopic { if tmpl_forum_vars.CurrentUser.Perms.CreateTopic {
w.Write(forum_53) w.Write(forum_80)
w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Forum.ID))) w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Forum.ID)))
w.Write(forum_54) w.Write(forum_81)
w.Write(phrases[47])
w.Write(forum_82)
} }
w.Write(forum_55) w.Write(forum_83)
} }
w.Write(forum_56) w.Write(forum_84)
if tmpl_forum_vars.LastPage > 1 { if tmpl_forum_vars.LastPage > 1 {
w.Write(forum_57) w.Write(paginator_0)
if tmpl_forum_vars.Page > 1 { if tmpl_forum_vars.Page > 1 {
w.Write(forum_58) w.Write(paginator_1)
w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Page - 1))) w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Page - 1)))
w.Write(forum_59) w.Write(paginator_2)
w.Write(phrases[48])
w.Write(paginator_3)
w.Write(phrases[49])
w.Write(paginator_4)
w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Page - 1))) w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Page - 1)))
w.Write(forum_60) w.Write(paginator_5)
} }
if len(tmpl_forum_vars.PageList) != 0 { if len(tmpl_forum_vars.PageList) != 0 {
for _, item := range tmpl_forum_vars.PageList { for _, item := range tmpl_forum_vars.PageList {
w.Write(forum_61) w.Write(paginator_6)
w.Write([]byte(strconv.Itoa(item))) w.Write([]byte(strconv.Itoa(item)))
w.Write(forum_62) w.Write(paginator_7)
w.Write([]byte(strconv.Itoa(item))) w.Write([]byte(strconv.Itoa(item)))
w.Write(forum_63) w.Write(paginator_8)
} }
} }
if tmpl_forum_vars.LastPage != tmpl_forum_vars.Page { if tmpl_forum_vars.LastPage != tmpl_forum_vars.Page {
w.Write(forum_64) w.Write(paginator_9)
w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Page + 1))) w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Page + 1)))
w.Write(forum_65) w.Write(paginator_10)
w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Page + 1))) w.Write([]byte(strconv.Itoa(tmpl_forum_vars.Page + 1)))
w.Write(forum_66) w.Write(paginator_11)
w.Write(phrases[50])
w.Write(paginator_12)
w.Write(phrases[51])
w.Write(paginator_13)
} }
w.Write(forum_67) w.Write(paginator_14)
} }
w.Write(forum_68) w.Write(forum_85)
w.Write(footer_0) w.Write(footer_0)
w.Write([]byte(common.BuildWidget("footer",tmpl_forum_vars.Header))) w.Write([]byte(common.BuildWidget("footer",tmpl_forum_vars.Header)))
w.Write(footer_1) w.Write(footer_1)
w.Write(phrases[52])
w.Write(footer_2)
w.Write(phrases[53])
w.Write(footer_3)
w.Write(phrases[54])
w.Write(footer_4)
if len(tmpl_forum_vars.Header.Themes) != 0 { if len(tmpl_forum_vars.Header.Themes) != 0 {
for _, item := range tmpl_forum_vars.Header.Themes { for _, item := range tmpl_forum_vars.Header.Themes {
if !item.HideFromThemes { if !item.HideFromThemes {
w.Write(footer_2)
w.Write([]byte(item.Name))
w.Write(footer_3)
if tmpl_forum_vars.Header.Theme.Name == item.Name {
w.Write(footer_4)
}
w.Write(footer_5) w.Write(footer_5)
w.Write([]byte(item.FriendlyName)) w.Write([]byte(item.Name))
w.Write(footer_6) w.Write(footer_6)
} if tmpl_forum_vars.Header.Theme.Name == item.Name {
}
}
w.Write(footer_7) w.Write(footer_7)
w.Write([]byte(common.BuildWidget("rightSidebar",tmpl_forum_vars.Header))) }
w.Write(footer_8) w.Write(footer_8)
w.Write([]byte(item.FriendlyName))
w.Write(footer_9)
}
}
}
w.Write(footer_10)
w.Write([]byte(common.BuildWidget("rightSidebar",tmpl_forum_vars.Header)))
w.Write(footer_11)
return nil return nil
} }

View File

@ -3,8 +3,8 @@
// Code generated by Gosora. More below: // 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. */ /* This file was automatically generated by the software. Please don't edit it as your changes may be overwritten at any moment. */
package main package main
import "./common"
import "net/http" import "net/http"
import "./common"
var forums_Tmpl_Phrase_ID int var forums_Tmpl_Phrase_ID int
@ -14,10 +14,39 @@ func init() {
common.Ctemplates = append(common.Ctemplates,"forums") common.Ctemplates = append(common.Ctemplates,"forums")
common.TmplPtrMap["forums"] = &common.Template_forums_handle common.TmplPtrMap["forums"] = &common.Template_forums_handle
common.TmplPtrMap["o_forums"] = Template_forums common.TmplPtrMap["o_forums"] = Template_forums
forums_Tmpl_Phrase_ID = common.RegisterTmplPhraseNames([]string{
"menu_forums_aria",
"menu_forums_tooltip",
"menu_topics_aria",
"menu_topics_tooltip",
"menu_alert_counter_aria",
"menu_alert_list_aria",
"menu_account_aria",
"menu_account_tooltip",
"menu_profile_aria",
"menu_profile_tooltip",
"menu_panel_aria",
"menu_panel_tooltip",
"menu_logout_aria",
"menu_logout_tooltip",
"menu_register_aria",
"menu_register_tooltip",
"menu_login_aria",
"menu_login_tooltip",
"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 // nolint
func Template_forums(tmpl_forums_vars common.ForumsPage, w http.ResponseWriter) error { func Template_forums(tmpl_forums_vars common.ForumsPage, w http.ResponseWriter) error {
var phrases = common.GetTmplPhrasesBytes(forums_Tmpl_Phrase_ID)
w.Write(header_0) w.Write(header_0)
w.Write([]byte(tmpl_forums_vars.Title)) w.Write([]byte(tmpl_forums_vars.Title))
w.Write(header_1) w.Write(header_1)
@ -59,16 +88,54 @@ w.Write(menu_0)
w.Write(menu_1) w.Write(menu_1)
w.Write([]byte(tmpl_forums_vars.Header.Site.ShortName)) w.Write([]byte(tmpl_forums_vars.Header.Site.ShortName))
w.Write(menu_2) w.Write(menu_2)
if tmpl_forums_vars.CurrentUser.Loggedin { w.Write(phrases[0])
w.Write(menu_3) w.Write(menu_3)
w.Write([]byte(tmpl_forums_vars.CurrentUser.Link)) w.Write(phrases[1])
w.Write(menu_4) w.Write(menu_4)
w.Write([]byte(tmpl_forums_vars.CurrentUser.Session)) w.Write(phrases[2])
w.Write(menu_5) w.Write(menu_5)
} else { w.Write(phrases[3])
w.Write(menu_6) w.Write(menu_6)
} w.Write(phrases[4])
w.Write(menu_7) w.Write(menu_7)
w.Write(phrases[5])
w.Write(menu_8)
if tmpl_forums_vars.CurrentUser.Loggedin {
w.Write(menu_9)
w.Write(phrases[6])
w.Write(menu_10)
w.Write(phrases[7])
w.Write(menu_11)
w.Write([]byte(tmpl_forums_vars.CurrentUser.Link))
w.Write(menu_12)
w.Write(phrases[8])
w.Write(menu_13)
w.Write(phrases[9])
w.Write(menu_14)
w.Write(phrases[10])
w.Write(menu_15)
w.Write(phrases[11])
w.Write(menu_16)
w.Write([]byte(tmpl_forums_vars.CurrentUser.Session))
w.Write(menu_17)
w.Write(phrases[12])
w.Write(menu_18)
w.Write(phrases[13])
w.Write(menu_19)
} else {
w.Write(menu_20)
w.Write(phrases[14])
w.Write(menu_21)
w.Write(phrases[15])
w.Write(menu_22)
w.Write(phrases[16])
w.Write(menu_23)
w.Write(phrases[17])
w.Write(menu_24)
}
w.Write(menu_25)
w.Write(phrases[18])
w.Write(menu_26)
w.Write(header_17) w.Write(header_17)
if tmpl_forums_vars.Header.Widgets.RightSidebar != "" { if tmpl_forums_vars.Header.Widgets.RightSidebar != "" {
w.Write(header_18) w.Write(header_18)
@ -81,75 +148,88 @@ w.Write([]byte(item))
w.Write(header_21) w.Write(header_21)
} }
} }
w.Write(header_22)
w.Write(forums_0) w.Write(forums_0)
w.Write(phrases[19])
w.Write(forums_1)
if len(tmpl_forums_vars.ItemList) != 0 { if len(tmpl_forums_vars.ItemList) != 0 {
for _, item := range tmpl_forums_vars.ItemList { for _, item := range tmpl_forums_vars.ItemList {
w.Write(forums_1)
if item.Desc != "" || item.LastTopic.Title != "" {
w.Write(forums_2) w.Write(forums_2)
} if item.Desc != "" || item.LastTopic.Title != "" {
w.Write(forums_3) w.Write(forums_3)
w.Write([]byte(item.Link)) }
w.Write(forums_4) w.Write(forums_4)
w.Write([]byte(item.Name)) w.Write([]byte(item.Link))
w.Write(forums_5) w.Write(forums_5)
if item.Desc != "" { w.Write([]byte(item.Name))
w.Write(forums_6) w.Write(forums_6)
w.Write([]byte(item.Desc)) if item.Desc != "" {
w.Write(forums_7) w.Write(forums_7)
} else { w.Write([]byte(item.Desc))
w.Write(forums_8) w.Write(forums_8)
} } else {
w.Write(forums_9) w.Write(forums_9)
if item.LastReplyer.Avatar != "" { w.Write(phrases[20])
w.Write(forums_10) w.Write(forums_10)
w.Write([]byte(item.LastReplyer.Avatar))
w.Write(forums_11)
w.Write([]byte(item.LastReplyer.Name))
w.Write(forums_12)
w.Write([]byte(item.LastReplyer.Name))
w.Write(forums_13)
} }
w.Write(forums_11)
if item.LastReplyer.Avatar != "" {
w.Write(forums_12)
w.Write([]byte(item.LastReplyer.Avatar))
w.Write(forums_13)
w.Write([]byte(item.LastReplyer.Name))
w.Write(forums_14) w.Write(forums_14)
w.Write([]byte(item.LastTopic.Link)) w.Write([]byte(item.LastReplyer.Name))
w.Write(forums_15) w.Write(forums_15)
}
w.Write(forums_16)
w.Write([]byte(item.LastTopic.Link))
w.Write(forums_17)
if item.LastTopic.Title != "" { if item.LastTopic.Title != "" {
w.Write([]byte(item.LastTopic.Title)) w.Write([]byte(item.LastTopic.Title))
} else { } else {
w.Write(forums_16) w.Write(phrases[21])
} }
w.Write(forums_17)
if item.LastTopicTime != "" {
w.Write(forums_18) w.Write(forums_18)
w.Write([]byte(item.LastTopicTime)) if item.LastTopicTime != "" {
w.Write(forums_19) w.Write(forums_19)
} w.Write([]byte(item.LastTopicTime))
w.Write(forums_20) w.Write(forums_20)
} }
} else {
w.Write(forums_21) w.Write(forums_21)
} }
} else {
w.Write(forums_22) w.Write(forums_22)
w.Write(phrases[22])
w.Write(forums_23)
}
w.Write(forums_24)
w.Write(footer_0) w.Write(footer_0)
w.Write([]byte(common.BuildWidget("footer",tmpl_forums_vars.Header))) w.Write([]byte(common.BuildWidget("footer",tmpl_forums_vars.Header)))
w.Write(footer_1) w.Write(footer_1)
w.Write(phrases[23])
w.Write(footer_2)
w.Write(phrases[24])
w.Write(footer_3)
w.Write(phrases[25])
w.Write(footer_4)
if len(tmpl_forums_vars.Header.Themes) != 0 { if len(tmpl_forums_vars.Header.Themes) != 0 {
for _, item := range tmpl_forums_vars.Header.Themes { for _, item := range tmpl_forums_vars.Header.Themes {
if !item.HideFromThemes { if !item.HideFromThemes {
w.Write(footer_2)
w.Write([]byte(item.Name))
w.Write(footer_3)
if tmpl_forums_vars.Header.Theme.Name == item.Name {
w.Write(footer_4)
}
w.Write(footer_5) w.Write(footer_5)
w.Write([]byte(item.FriendlyName)) w.Write([]byte(item.Name))
w.Write(footer_6) w.Write(footer_6)
} if tmpl_forums_vars.Header.Theme.Name == item.Name {
}
}
w.Write(footer_7) w.Write(footer_7)
w.Write([]byte(common.BuildWidget("rightSidebar",tmpl_forums_vars.Header))) }
w.Write(footer_8) w.Write(footer_8)
w.Write([]byte(item.FriendlyName))
w.Write(footer_9)
}
}
}
w.Write(footer_10)
w.Write([]byte(common.BuildWidget("rightSidebar",tmpl_forums_vars.Header)))
w.Write(footer_11)
return nil return nil
} }

View File

@ -3,20 +3,45 @@
// Code generated by Gosora. More below: // 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. */ /* This file was automatically generated by the software. Please don't edit it as your changes may be overwritten at any moment. */
package main package main
import "./common"
import "./extend/guilds/lib" import "./extend/guilds/lib"
import "strconv" import "strconv"
import "net/http" import "net/http"
import "./common"
var guilds_guild_list_Tmpl_Phrase_ID int var guilds_guild_list_Tmpl_Phrase_ID int
// nolint // nolint
func init() { func init() {
common.TmplPtrMap["o_guilds_guild_list"] = Template_guilds_guild_list common.TmplPtrMap["o_guilds_guild_list"] = Template_guilds_guild_list
guilds_guild_list_Tmpl_Phrase_ID = common.RegisterTmplPhraseNames([]string{
"menu_forums_aria",
"menu_forums_tooltip",
"menu_topics_aria",
"menu_topics_tooltip",
"menu_alert_counter_aria",
"menu_alert_list_aria",
"menu_account_aria",
"menu_account_tooltip",
"menu_profile_aria",
"menu_profile_tooltip",
"menu_panel_aria",
"menu_panel_tooltip",
"menu_logout_aria",
"menu_logout_tooltip",
"menu_register_aria",
"menu_register_tooltip",
"menu_login_aria",
"menu_login_tooltip",
"menu_hamburger_tooltip",
"footer_powered_by",
"footer_made_with_love",
"footer_theme_selector_aria",
})
} }
// nolint // nolint
func Template_guilds_guild_list(tmpl_guilds_guild_list_vars guilds.ListPage, w http.ResponseWriter) error { func Template_guilds_guild_list(tmpl_guilds_guild_list_vars guilds.ListPage, w http.ResponseWriter) error {
var phrases = common.GetTmplPhrasesBytes(guilds_guild_list_Tmpl_Phrase_ID)
w.Write(header_0) w.Write(header_0)
w.Write([]byte(tmpl_guilds_guild_list_vars.Title)) w.Write([]byte(tmpl_guilds_guild_list_vars.Title))
w.Write(header_1) w.Write(header_1)
@ -58,16 +83,54 @@ w.Write(menu_0)
w.Write(menu_1) w.Write(menu_1)
w.Write([]byte(tmpl_guilds_guild_list_vars.Header.Site.ShortName)) w.Write([]byte(tmpl_guilds_guild_list_vars.Header.Site.ShortName))
w.Write(menu_2) w.Write(menu_2)
if tmpl_guilds_guild_list_vars.CurrentUser.Loggedin { w.Write(phrases[0])
w.Write(menu_3) w.Write(menu_3)
w.Write([]byte(tmpl_guilds_guild_list_vars.CurrentUser.Link)) w.Write(phrases[1])
w.Write(menu_4) w.Write(menu_4)
w.Write([]byte(tmpl_guilds_guild_list_vars.CurrentUser.Session)) w.Write(phrases[2])
w.Write(menu_5) w.Write(menu_5)
} else { w.Write(phrases[3])
w.Write(menu_6) w.Write(menu_6)
} w.Write(phrases[4])
w.Write(menu_7) w.Write(menu_7)
w.Write(phrases[5])
w.Write(menu_8)
if tmpl_guilds_guild_list_vars.CurrentUser.Loggedin {
w.Write(menu_9)
w.Write(phrases[6])
w.Write(menu_10)
w.Write(phrases[7])
w.Write(menu_11)
w.Write([]byte(tmpl_guilds_guild_list_vars.CurrentUser.Link))
w.Write(menu_12)
w.Write(phrases[8])
w.Write(menu_13)
w.Write(phrases[9])
w.Write(menu_14)
w.Write(phrases[10])
w.Write(menu_15)
w.Write(phrases[11])
w.Write(menu_16)
w.Write([]byte(tmpl_guilds_guild_list_vars.CurrentUser.Session))
w.Write(menu_17)
w.Write(phrases[12])
w.Write(menu_18)
w.Write(phrases[13])
w.Write(menu_19)
} else {
w.Write(menu_20)
w.Write(phrases[14])
w.Write(menu_21)
w.Write(phrases[15])
w.Write(menu_22)
w.Write(phrases[16])
w.Write(menu_23)
w.Write(phrases[17])
w.Write(menu_24)
}
w.Write(menu_25)
w.Write(phrases[18])
w.Write(menu_26)
w.Write(header_17) w.Write(header_17)
if tmpl_guilds_guild_list_vars.Header.Widgets.RightSidebar != "" { if tmpl_guilds_guild_list_vars.Header.Widgets.RightSidebar != "" {
w.Write(header_18) w.Write(header_18)
@ -80,6 +143,7 @@ w.Write([]byte(item))
w.Write(header_21) w.Write(header_21)
} }
} }
w.Write(header_22)
w.Write(guilds_guild_list_0) w.Write(guilds_guild_list_0)
if len(tmpl_guilds_guild_list_vars.GuildList) != 0 { if len(tmpl_guilds_guild_list_vars.GuildList) != 0 {
for _, item := range tmpl_guilds_guild_list_vars.GuildList { for _, item := range tmpl_guilds_guild_list_vars.GuildList {
@ -102,23 +166,29 @@ w.Write(guilds_guild_list_8)
w.Write(footer_0) w.Write(footer_0)
w.Write([]byte(common.BuildWidget("footer",tmpl_guilds_guild_list_vars.Header))) w.Write([]byte(common.BuildWidget("footer",tmpl_guilds_guild_list_vars.Header)))
w.Write(footer_1) w.Write(footer_1)
w.Write(phrases[19])
w.Write(footer_2)
w.Write(phrases[20])
w.Write(footer_3)
w.Write(phrases[21])
w.Write(footer_4)
if len(tmpl_guilds_guild_list_vars.Header.Themes) != 0 { if len(tmpl_guilds_guild_list_vars.Header.Themes) != 0 {
for _, item := range tmpl_guilds_guild_list_vars.Header.Themes { for _, item := range tmpl_guilds_guild_list_vars.Header.Themes {
if !item.HideFromThemes { if !item.HideFromThemes {
w.Write(footer_2)
w.Write([]byte(item.Name))
w.Write(footer_3)
if tmpl_guilds_guild_list_vars.Header.Theme.Name == item.Name {
w.Write(footer_4)
}
w.Write(footer_5) w.Write(footer_5)
w.Write([]byte(item.FriendlyName)) w.Write([]byte(item.Name))
w.Write(footer_6) w.Write(footer_6)
} if tmpl_guilds_guild_list_vars.Header.Theme.Name == item.Name {
}
}
w.Write(footer_7) w.Write(footer_7)
w.Write([]byte(common.BuildWidget("rightSidebar",tmpl_guilds_guild_list_vars.Header))) }
w.Write(footer_8) w.Write(footer_8)
w.Write([]byte(item.FriendlyName))
w.Write(footer_9)
}
}
}
w.Write(footer_10)
w.Write([]byte(common.BuildWidget("rightSidebar",tmpl_guilds_guild_list_vars.Header)))
w.Write(footer_11)
return nil return nil
} }

View File

@ -3,8 +3,8 @@
// Code generated by Gosora. More below: // 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. */ /* This file was automatically generated by the software. Please don't edit it as your changes may be overwritten at any moment. */
package main package main
import "net/http"
import "./common" import "./common"
import "net/http"
var ip_search_Tmpl_Phrase_ID int var ip_search_Tmpl_Phrase_ID int
@ -15,8 +15,31 @@ func init() {
common.TmplPtrMap["ip_search"] = &common.Template_ip_search_handle common.TmplPtrMap["ip_search"] = &common.Template_ip_search_handle
common.TmplPtrMap["o_ip_search"] = Template_ip_search common.TmplPtrMap["o_ip_search"] = Template_ip_search
ip_search_Tmpl_Phrase_ID = common.RegisterTmplPhraseNames([]string{ ip_search_Tmpl_Phrase_ID = common.RegisterTmplPhraseNames([]string{
"menu_forums_aria",
"menu_forums_tooltip",
"menu_topics_aria",
"menu_topics_tooltip",
"menu_alert_counter_aria",
"menu_alert_list_aria",
"menu_account_aria",
"menu_account_tooltip",
"menu_profile_aria",
"menu_profile_tooltip",
"menu_panel_aria",
"menu_panel_tooltip",
"menu_logout_aria",
"menu_logout_tooltip",
"menu_register_aria",
"menu_register_tooltip",
"menu_login_aria",
"menu_login_tooltip",
"menu_hamburger_tooltip",
"ip_search_head", "ip_search_head",
"ip_search_search_button",
"ip_search_no_users", "ip_search_no_users",
"footer_powered_by",
"footer_made_with_love",
"footer_theme_selector_aria",
}) })
} }
@ -64,16 +87,54 @@ w.Write(menu_0)
w.Write(menu_1) w.Write(menu_1)
w.Write([]byte(tmpl_ip_search_vars.Header.Site.ShortName)) w.Write([]byte(tmpl_ip_search_vars.Header.Site.ShortName))
w.Write(menu_2) w.Write(menu_2)
if tmpl_ip_search_vars.CurrentUser.Loggedin { w.Write(phrases[0])
w.Write(menu_3) w.Write(menu_3)
w.Write([]byte(tmpl_ip_search_vars.CurrentUser.Link)) w.Write(phrases[1])
w.Write(menu_4) w.Write(menu_4)
w.Write([]byte(tmpl_ip_search_vars.CurrentUser.Session)) w.Write(phrases[2])
w.Write(menu_5) w.Write(menu_5)
} else { w.Write(phrases[3])
w.Write(menu_6) w.Write(menu_6)
} w.Write(phrases[4])
w.Write(menu_7) w.Write(menu_7)
w.Write(phrases[5])
w.Write(menu_8)
if tmpl_ip_search_vars.CurrentUser.Loggedin {
w.Write(menu_9)
w.Write(phrases[6])
w.Write(menu_10)
w.Write(phrases[7])
w.Write(menu_11)
w.Write([]byte(tmpl_ip_search_vars.CurrentUser.Link))
w.Write(menu_12)
w.Write(phrases[8])
w.Write(menu_13)
w.Write(phrases[9])
w.Write(menu_14)
w.Write(phrases[10])
w.Write(menu_15)
w.Write(phrases[11])
w.Write(menu_16)
w.Write([]byte(tmpl_ip_search_vars.CurrentUser.Session))
w.Write(menu_17)
w.Write(phrases[12])
w.Write(menu_18)
w.Write(phrases[13])
w.Write(menu_19)
} else {
w.Write(menu_20)
w.Write(phrases[14])
w.Write(menu_21)
w.Write(phrases[15])
w.Write(menu_22)
w.Write(phrases[16])
w.Write(menu_23)
w.Write(phrases[17])
w.Write(menu_24)
}
w.Write(menu_25)
w.Write(phrases[18])
w.Write(menu_26)
w.Write(header_17) w.Write(header_17)
if tmpl_ip_search_vars.Header.Widgets.RightSidebar != "" { if tmpl_ip_search_vars.Header.Widgets.RightSidebar != "" {
w.Write(header_18) w.Write(header_18)
@ -86,8 +147,9 @@ w.Write([]byte(item))
w.Write(header_21) w.Write(header_21)
} }
} }
w.Write(header_22)
w.Write(ip_search_0) w.Write(ip_search_0)
w.Write(phrases[0]) w.Write(phrases[19])
w.Write(ip_search_1) w.Write(ip_search_1)
if tmpl_ip_search_vars.IP != "" { if tmpl_ip_search_vars.IP != "" {
w.Write(ip_search_2) w.Write(ip_search_2)
@ -95,51 +157,59 @@ w.Write([]byte(tmpl_ip_search_vars.IP))
w.Write(ip_search_3) w.Write(ip_search_3)
} }
w.Write(ip_search_4) w.Write(ip_search_4)
if tmpl_ip_search_vars.IP != "" { w.Write(phrases[20])
w.Write(ip_search_5) w.Write(ip_search_5)
if tmpl_ip_search_vars.IP != "" {
w.Write(ip_search_6)
if len(tmpl_ip_search_vars.ItemList) != 0 { if len(tmpl_ip_search_vars.ItemList) != 0 {
for _, item := range tmpl_ip_search_vars.ItemList { for _, item := range tmpl_ip_search_vars.ItemList {
w.Write(ip_search_6)
w.Write([]byte(item.Avatar))
w.Write(ip_search_7) w.Write(ip_search_7)
w.Write([]byte(item.Avatar)) w.Write([]byte(item.Avatar))
w.Write(ip_search_8) w.Write(ip_search_8)
w.Write([]byte(item.Name)) w.Write([]byte(item.Avatar))
w.Write(ip_search_9) w.Write(ip_search_9)
w.Write([]byte(item.Link))
w.Write(ip_search_10)
w.Write([]byte(item.Name)) w.Write([]byte(item.Name))
w.Write(ip_search_10)
w.Write([]byte(item.Link))
w.Write(ip_search_11) w.Write(ip_search_11)
w.Write([]byte(item.Name))
w.Write(ip_search_12)
} }
} else { } else {
w.Write(ip_search_12)
w.Write(phrases[1])
w.Write(ip_search_13) w.Write(ip_search_13)
} w.Write(phrases[21])
w.Write(ip_search_14) w.Write(ip_search_14)
} }
w.Write(ip_search_15) w.Write(ip_search_15)
}
w.Write(ip_search_16)
w.Write(footer_0) w.Write(footer_0)
w.Write([]byte(common.BuildWidget("footer",tmpl_ip_search_vars.Header))) w.Write([]byte(common.BuildWidget("footer",tmpl_ip_search_vars.Header)))
w.Write(footer_1) w.Write(footer_1)
w.Write(phrases[22])
w.Write(footer_2)
w.Write(phrases[23])
w.Write(footer_3)
w.Write(phrases[24])
w.Write(footer_4)
if len(tmpl_ip_search_vars.Header.Themes) != 0 { if len(tmpl_ip_search_vars.Header.Themes) != 0 {
for _, item := range tmpl_ip_search_vars.Header.Themes { for _, item := range tmpl_ip_search_vars.Header.Themes {
if !item.HideFromThemes { if !item.HideFromThemes {
w.Write(footer_2)
w.Write([]byte(item.Name))
w.Write(footer_3)
if tmpl_ip_search_vars.Header.Theme.Name == item.Name {
w.Write(footer_4)
}
w.Write(footer_5) w.Write(footer_5)
w.Write([]byte(item.FriendlyName)) w.Write([]byte(item.Name))
w.Write(footer_6) w.Write(footer_6)
} if tmpl_ip_search_vars.Header.Theme.Name == item.Name {
}
}
w.Write(footer_7) w.Write(footer_7)
w.Write([]byte(common.BuildWidget("rightSidebar",tmpl_ip_search_vars.Header))) }
w.Write(footer_8) w.Write(footer_8)
w.Write([]byte(item.FriendlyName))
w.Write(footer_9)
}
}
}
w.Write(footer_10)
w.Write([]byte(common.BuildWidget("rightSidebar",tmpl_ip_search_vars.Header)))
w.Write(footer_11)
return nil return nil
} }

File diff suppressed because it is too large Load Diff

View File

@ -15,12 +15,34 @@ func init() {
common.TmplPtrMap["login"] = &common.Template_login_handle common.TmplPtrMap["login"] = &common.Template_login_handle
common.TmplPtrMap["o_login"] = Template_login common.TmplPtrMap["o_login"] = Template_login
login_Tmpl_Phrase_ID = common.RegisterTmplPhraseNames([]string{ login_Tmpl_Phrase_ID = common.RegisterTmplPhraseNames([]string{
"menu_forums_aria",
"menu_forums_tooltip",
"menu_topics_aria",
"menu_topics_tooltip",
"menu_alert_counter_aria",
"menu_alert_list_aria",
"menu_account_aria",
"menu_account_tooltip",
"menu_profile_aria",
"menu_profile_tooltip",
"menu_panel_aria",
"menu_panel_tooltip",
"menu_logout_aria",
"menu_logout_tooltip",
"menu_register_aria",
"menu_register_tooltip",
"menu_login_aria",
"menu_login_tooltip",
"menu_hamburger_tooltip",
"login_head", "login_head",
"login_account_name", "login_account_name",
"login_account_name", "login_account_name",
"login_account_password", "login_account_password",
"login_submit_button", "login_submit_button",
"login_no_account", "login_no_account",
"footer_powered_by",
"footer_made_with_love",
"footer_theme_selector_aria",
}) })
} }
@ -68,16 +90,54 @@ w.Write(menu_0)
w.Write(menu_1) w.Write(menu_1)
w.Write([]byte(tmpl_login_vars.Header.Site.ShortName)) w.Write([]byte(tmpl_login_vars.Header.Site.ShortName))
w.Write(menu_2) w.Write(menu_2)
if tmpl_login_vars.CurrentUser.Loggedin { w.Write(phrases[0])
w.Write(menu_3) w.Write(menu_3)
w.Write([]byte(tmpl_login_vars.CurrentUser.Link)) w.Write(phrases[1])
w.Write(menu_4) w.Write(menu_4)
w.Write([]byte(tmpl_login_vars.CurrentUser.Session)) w.Write(phrases[2])
w.Write(menu_5) w.Write(menu_5)
} else { w.Write(phrases[3])
w.Write(menu_6) w.Write(menu_6)
} w.Write(phrases[4])
w.Write(menu_7) w.Write(menu_7)
w.Write(phrases[5])
w.Write(menu_8)
if tmpl_login_vars.CurrentUser.Loggedin {
w.Write(menu_9)
w.Write(phrases[6])
w.Write(menu_10)
w.Write(phrases[7])
w.Write(menu_11)
w.Write([]byte(tmpl_login_vars.CurrentUser.Link))
w.Write(menu_12)
w.Write(phrases[8])
w.Write(menu_13)
w.Write(phrases[9])
w.Write(menu_14)
w.Write(phrases[10])
w.Write(menu_15)
w.Write(phrases[11])
w.Write(menu_16)
w.Write([]byte(tmpl_login_vars.CurrentUser.Session))
w.Write(menu_17)
w.Write(phrases[12])
w.Write(menu_18)
w.Write(phrases[13])
w.Write(menu_19)
} else {
w.Write(menu_20)
w.Write(phrases[14])
w.Write(menu_21)
w.Write(phrases[15])
w.Write(menu_22)
w.Write(phrases[16])
w.Write(menu_23)
w.Write(phrases[17])
w.Write(menu_24)
}
w.Write(menu_25)
w.Write(phrases[18])
w.Write(menu_26)
w.Write(header_17) w.Write(header_17)
if tmpl_login_vars.Header.Widgets.RightSidebar != "" { if tmpl_login_vars.Header.Widgets.RightSidebar != "" {
w.Write(header_18) w.Write(header_18)
@ -90,39 +150,46 @@ w.Write([]byte(item))
w.Write(header_21) w.Write(header_21)
} }
} }
w.Write(header_22)
w.Write(login_0) w.Write(login_0)
w.Write(phrases[0]) w.Write(phrases[19])
w.Write(login_1) w.Write(login_1)
w.Write(phrases[1]) w.Write(phrases[20])
w.Write(login_2) w.Write(login_2)
w.Write(phrases[2]) w.Write(phrases[21])
w.Write(login_3) w.Write(login_3)
w.Write(phrases[3]) w.Write(phrases[22])
w.Write(login_4) w.Write(login_4)
w.Write(phrases[4]) w.Write(phrases[23])
w.Write(login_5) w.Write(login_5)
w.Write(phrases[5]) w.Write(phrases[24])
w.Write(login_6) w.Write(login_6)
w.Write(footer_0) w.Write(footer_0)
w.Write([]byte(common.BuildWidget("footer",tmpl_login_vars.Header))) w.Write([]byte(common.BuildWidget("footer",tmpl_login_vars.Header)))
w.Write(footer_1) w.Write(footer_1)
w.Write(phrases[25])
w.Write(footer_2)
w.Write(phrases[26])
w.Write(footer_3)
w.Write(phrases[27])
w.Write(footer_4)
if len(tmpl_login_vars.Header.Themes) != 0 { if len(tmpl_login_vars.Header.Themes) != 0 {
for _, item := range tmpl_login_vars.Header.Themes { for _, item := range tmpl_login_vars.Header.Themes {
if !item.HideFromThemes { if !item.HideFromThemes {
w.Write(footer_2)
w.Write([]byte(item.Name))
w.Write(footer_3)
if tmpl_login_vars.Header.Theme.Name == item.Name {
w.Write(footer_4)
}
w.Write(footer_5) w.Write(footer_5)
w.Write([]byte(item.FriendlyName)) w.Write([]byte(item.Name))
w.Write(footer_6) w.Write(footer_6)
} if tmpl_login_vars.Header.Theme.Name == item.Name {
}
}
w.Write(footer_7) w.Write(footer_7)
w.Write([]byte(common.BuildWidget("rightSidebar",tmpl_login_vars.Header))) }
w.Write(footer_8) w.Write(footer_8)
w.Write([]byte(item.FriendlyName))
w.Write(footer_9)
}
}
}
w.Write(footer_10)
w.Write([]byte(common.BuildWidget("rightSidebar",tmpl_login_vars.Header)))
w.Write(footer_11)
return nil return nil
} }

View File

@ -3,9 +3,9 @@
// Code generated by Gosora. More below: // 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. */ /* This file was automatically generated by the software. Please don't edit it as your changes may be overwritten at any moment. */
package main package main
import "strconv"
import "net/http" import "net/http"
import "./common" import "./common"
import "strconv"
var profile_Tmpl_Phrase_ID int var profile_Tmpl_Phrase_ID int
@ -15,10 +15,63 @@ func init() {
common.Ctemplates = append(common.Ctemplates,"profile") common.Ctemplates = append(common.Ctemplates,"profile")
common.TmplPtrMap["profile"] = &common.Template_profile_handle common.TmplPtrMap["profile"] = &common.Template_profile_handle
common.TmplPtrMap["o_profile"] = Template_profile common.TmplPtrMap["o_profile"] = Template_profile
profile_Tmpl_Phrase_ID = common.RegisterTmplPhraseNames([]string{
"menu_forums_aria",
"menu_forums_tooltip",
"menu_topics_aria",
"menu_topics_tooltip",
"menu_alert_counter_aria",
"menu_alert_list_aria",
"menu_account_aria",
"menu_account_tooltip",
"menu_profile_aria",
"menu_profile_tooltip",
"menu_panel_aria",
"menu_panel_tooltip",
"menu_logout_aria",
"menu_logout_tooltip",
"menu_register_aria",
"menu_register_tooltip",
"menu_login_aria",
"menu_login_tooltip",
"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 // nolint
func Template_profile(tmpl_profile_vars common.ProfilePage, w http.ResponseWriter) error { func Template_profile(tmpl_profile_vars common.ProfilePage, w http.ResponseWriter) error {
var phrases = common.GetTmplPhrasesBytes(profile_Tmpl_Phrase_ID)
w.Write(header_0) w.Write(header_0)
w.Write([]byte(tmpl_profile_vars.Title)) w.Write([]byte(tmpl_profile_vars.Title))
w.Write(header_1) w.Write(header_1)
@ -60,16 +113,54 @@ w.Write(menu_0)
w.Write(menu_1) w.Write(menu_1)
w.Write([]byte(tmpl_profile_vars.Header.Site.ShortName)) w.Write([]byte(tmpl_profile_vars.Header.Site.ShortName))
w.Write(menu_2) w.Write(menu_2)
if tmpl_profile_vars.CurrentUser.Loggedin { w.Write(phrases[0])
w.Write(menu_3) w.Write(menu_3)
w.Write([]byte(tmpl_profile_vars.CurrentUser.Link)) w.Write(phrases[1])
w.Write(menu_4) w.Write(menu_4)
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session)) w.Write(phrases[2])
w.Write(menu_5) w.Write(menu_5)
} else { w.Write(phrases[3])
w.Write(menu_6) w.Write(menu_6)
} w.Write(phrases[4])
w.Write(menu_7) w.Write(menu_7)
w.Write(phrases[5])
w.Write(menu_8)
if tmpl_profile_vars.CurrentUser.Loggedin {
w.Write(menu_9)
w.Write(phrases[6])
w.Write(menu_10)
w.Write(phrases[7])
w.Write(menu_11)
w.Write([]byte(tmpl_profile_vars.CurrentUser.Link))
w.Write(menu_12)
w.Write(phrases[8])
w.Write(menu_13)
w.Write(phrases[9])
w.Write(menu_14)
w.Write(phrases[10])
w.Write(menu_15)
w.Write(phrases[11])
w.Write(menu_16)
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
w.Write(menu_17)
w.Write(phrases[12])
w.Write(menu_18)
w.Write(phrases[13])
w.Write(menu_19)
} else {
w.Write(menu_20)
w.Write(phrases[14])
w.Write(menu_21)
w.Write(phrases[15])
w.Write(menu_22)
w.Write(phrases[16])
w.Write(menu_23)
w.Write(phrases[17])
w.Write(menu_24)
}
w.Write(menu_25)
w.Write(phrases[18])
w.Write(menu_26)
w.Write(header_17) w.Write(header_17)
if tmpl_profile_vars.Header.Widgets.RightSidebar != "" { if tmpl_profile_vars.Header.Widgets.RightSidebar != "" {
w.Write(header_18) w.Write(header_18)
@ -82,6 +173,7 @@ w.Write([]byte(item))
w.Write(header_21) w.Write(header_21)
} }
} }
w.Write(header_22)
w.Write(profile_0) w.Write(profile_0)
w.Write([]byte(tmpl_profile_vars.ProfileOwner.Avatar)) w.Write([]byte(tmpl_profile_vars.ProfileOwner.Avatar))
w.Write(profile_1) w.Write(profile_1)
@ -99,37 +191,65 @@ w.Write(profile_6)
w.Write(profile_7) w.Write(profile_7)
if !tmpl_profile_vars.CurrentUser.Loggedin { if !tmpl_profile_vars.CurrentUser.Loggedin {
w.Write(profile_8) w.Write(profile_8)
} else { w.Write(phrases[19])
w.Write(profile_9) w.Write(profile_9)
if tmpl_profile_vars.CurrentUser.IsSuperMod && !tmpl_profile_vars.ProfileOwner.IsSuperMod {
w.Write(profile_10)
if tmpl_profile_vars.ProfileOwner.IsBanned {
w.Write(profile_11)
w.Write([]byte(strconv.Itoa(tmpl_profile_vars.ProfileOwner.ID)))
w.Write(profile_12)
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
w.Write(profile_13)
} else { } else {
w.Write(profile_14) w.Write(profile_10)
} w.Write(phrases[20])
w.Write(profile_15) w.Write(profile_11)
} if tmpl_profile_vars.CurrentUser.IsSuperMod && !tmpl_profile_vars.ProfileOwner.IsSuperMod {
w.Write(profile_16) w.Write(profile_12)
if tmpl_profile_vars.ProfileOwner.IsBanned {
w.Write(profile_13)
w.Write([]byte(strconv.Itoa(tmpl_profile_vars.ProfileOwner.ID))) w.Write([]byte(strconv.Itoa(tmpl_profile_vars.ProfileOwner.ID)))
w.Write(profile_17) w.Write(profile_14)
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session)) w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
w.Write(profile_15)
w.Write(phrases[21])
w.Write(profile_16)
} else {
w.Write(profile_17)
w.Write(phrases[22])
w.Write(profile_18) w.Write(profile_18)
} }
w.Write(profile_19) w.Write(profile_19)
if tmpl_profile_vars.CurrentUser.Perms.BanUsers { }
w.Write(profile_20) w.Write(profile_20)
w.Write([]byte(strconv.Itoa(tmpl_profile_vars.ProfileOwner.ID))) w.Write([]byte(strconv.Itoa(tmpl_profile_vars.ProfileOwner.ID)))
w.Write(profile_21) w.Write(profile_21)
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session)) w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
w.Write(profile_22) w.Write(profile_22)
w.Write(phrases[23])
w.Write(profile_23) w.Write(profile_23)
} w.Write(phrases[24])
w.Write(profile_24) w.Write(profile_24)
}
w.Write(profile_25)
if tmpl_profile_vars.CurrentUser.Perms.BanUsers {
w.Write(profile_26)
w.Write(phrases[25])
w.Write(profile_27)
w.Write([]byte(strconv.Itoa(tmpl_profile_vars.ProfileOwner.ID)))
w.Write(profile_28)
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
w.Write(profile_29)
w.Write(profile_30)
w.Write(phrases[26])
w.Write(profile_31)
w.Write(phrases[27])
w.Write(profile_32)
w.Write(phrases[28])
w.Write(profile_33)
w.Write(phrases[29])
w.Write(profile_34)
w.Write(phrases[30])
w.Write(profile_35)
w.Write(phrases[31])
w.Write(profile_36)
}
w.Write(profile_37)
w.Write(phrases[32])
w.Write(profile_38)
if tmpl_profile_vars.Header.Theme.BgAvatars { if tmpl_profile_vars.Header.Theme.BgAvatars {
if len(tmpl_profile_vars.ItemList) != 0 { if len(tmpl_profile_vars.ItemList) != 0 {
for _, item := range tmpl_profile_vars.ItemList { for _, item := range tmpl_profile_vars.ItemList {
@ -154,97 +274,131 @@ w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(profile_comments_row_9) w.Write(profile_comments_row_9)
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session)) w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
w.Write(profile_comments_row_10) w.Write(profile_comments_row_10)
w.Write([]byte(strconv.Itoa(item.ID))) w.Write(phrases[33])
w.Write(profile_comments_row_11) w.Write(profile_comments_row_11)
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session)) w.Write(phrases[34])
w.Write(profile_comments_row_12) w.Write(profile_comments_row_12)
}
w.Write(profile_comments_row_13)
w.Write([]byte(strconv.Itoa(item.ID))) w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(profile_comments_row_14) w.Write(profile_comments_row_13)
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session)) w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
w.Write(profile_comments_row_14)
w.Write(phrases[35])
w.Write(profile_comments_row_15) w.Write(profile_comments_row_15)
if item.Tag != "" { w.Write(phrases[36])
w.Write(profile_comments_row_16) w.Write(profile_comments_row_16)
w.Write([]byte(item.Tag))
w.Write(profile_comments_row_17)
} }
w.Write(profile_comments_row_17)
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(profile_comments_row_18) w.Write(profile_comments_row_18)
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
w.Write(profile_comments_row_19)
w.Write(phrases[37])
w.Write(profile_comments_row_20)
w.Write(phrases[38])
w.Write(profile_comments_row_21)
if item.Tag != "" {
w.Write(profile_comments_row_22)
w.Write([]byte(item.Tag))
w.Write(profile_comments_row_23)
}
w.Write(profile_comments_row_24)
} }
} }
} else { } else {
if len(tmpl_profile_vars.ItemList) != 0 { if len(tmpl_profile_vars.ItemList) != 0 {
for _, item := range tmpl_profile_vars.ItemList { for _, item := range tmpl_profile_vars.ItemList {
w.Write(profile_comments_row_19)
w.Write([]byte(item.ClassName))
w.Write(profile_comments_row_20)
w.Write([]byte(item.Avatar))
w.Write(profile_comments_row_21)
w.Write([]byte(item.CreatedByName))
w.Write(profile_comments_row_22)
w.Write([]byte(item.CreatedByName))
w.Write(profile_comments_row_23)
w.Write([]byte(item.UserLink))
w.Write(profile_comments_row_24)
w.Write([]byte(item.CreatedByName))
w.Write(profile_comments_row_25) w.Write(profile_comments_row_25)
if item.Tag != "" { w.Write([]byte(item.ClassName))
w.Write(profile_comments_row_26) w.Write(profile_comments_row_26)
w.Write([]byte(item.Tag)) w.Write([]byte(item.Avatar))
w.Write(profile_comments_row_27) w.Write(profile_comments_row_27)
} w.Write([]byte(item.CreatedByName))
w.Write(profile_comments_row_28) w.Write(profile_comments_row_28)
if tmpl_profile_vars.CurrentUser.IsMod { w.Write([]byte(item.CreatedByName))
w.Write(profile_comments_row_29) w.Write(profile_comments_row_29)
w.Write([]byte(strconv.Itoa(item.ID))) w.Write([]byte(item.UserLink))
w.Write(profile_comments_row_30) w.Write(profile_comments_row_30)
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session)) w.Write([]byte(item.CreatedByName))
w.Write(profile_comments_row_31) w.Write(profile_comments_row_31)
w.Write([]byte(strconv.Itoa(item.ID))) if item.Tag != "" {
w.Write(profile_comments_row_32) w.Write(profile_comments_row_32)
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session)) w.Write([]byte(item.Tag))
w.Write(profile_comments_row_33) w.Write(profile_comments_row_33)
} }
w.Write(profile_comments_row_34) w.Write(profile_comments_row_34)
w.Write([]byte(strconv.Itoa(item.ID))) if tmpl_profile_vars.CurrentUser.IsMod {
w.Write(profile_comments_row_35) w.Write(profile_comments_row_35)
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session)) w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(profile_comments_row_36) w.Write(profile_comments_row_36)
w.Write([]byte(item.ContentHtml))
w.Write(profile_comments_row_37)
}
}
}
w.Write(profile_25)
if !tmpl_profile_vars.CurrentUser.IsBanned {
w.Write(profile_26)
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session)) w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
w.Write(profile_27) w.Write(profile_comments_row_37)
w.Write([]byte(strconv.Itoa(tmpl_profile_vars.ProfileOwner.ID))) w.Write(phrases[39])
w.Write(profile_28) w.Write(profile_comments_row_38)
w.Write(phrases[40])
w.Write(profile_comments_row_39)
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(profile_comments_row_40)
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
w.Write(profile_comments_row_41)
w.Write(phrases[41])
w.Write(profile_comments_row_42)
w.Write(phrases[42])
w.Write(profile_comments_row_43)
} }
w.Write(profile_29) w.Write(profile_comments_row_44)
w.Write(profile_30) w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(profile_comments_row_45)
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
w.Write(profile_comments_row_46)
w.Write(phrases[43])
w.Write(profile_comments_row_47)
w.Write(phrases[44])
w.Write(profile_comments_row_48)
w.Write([]byte(item.ContentHtml))
w.Write(profile_comments_row_49)
}
}
}
w.Write(profile_39)
if !tmpl_profile_vars.CurrentUser.IsBanned {
w.Write(profile_40)
w.Write([]byte(tmpl_profile_vars.CurrentUser.Session))
w.Write(profile_41)
w.Write([]byte(strconv.Itoa(tmpl_profile_vars.ProfileOwner.ID)))
w.Write(profile_42)
w.Write(phrases[45])
w.Write(profile_43)
w.Write(phrases[46])
w.Write(profile_44)
}
w.Write(profile_45)
w.Write(profile_46)
w.Write(footer_0) w.Write(footer_0)
w.Write([]byte(common.BuildWidget("footer",tmpl_profile_vars.Header))) w.Write([]byte(common.BuildWidget("footer",tmpl_profile_vars.Header)))
w.Write(footer_1) w.Write(footer_1)
w.Write(phrases[47])
w.Write(footer_2)
w.Write(phrases[48])
w.Write(footer_3)
w.Write(phrases[49])
w.Write(footer_4)
if len(tmpl_profile_vars.Header.Themes) != 0 { if len(tmpl_profile_vars.Header.Themes) != 0 {
for _, item := range tmpl_profile_vars.Header.Themes { for _, item := range tmpl_profile_vars.Header.Themes {
if !item.HideFromThemes { if !item.HideFromThemes {
w.Write(footer_2)
w.Write([]byte(item.Name))
w.Write(footer_3)
if tmpl_profile_vars.Header.Theme.Name == item.Name {
w.Write(footer_4)
}
w.Write(footer_5) w.Write(footer_5)
w.Write([]byte(item.FriendlyName)) w.Write([]byte(item.Name))
w.Write(footer_6) w.Write(footer_6)
} if tmpl_profile_vars.Header.Theme.Name == item.Name {
}
}
w.Write(footer_7) w.Write(footer_7)
w.Write([]byte(common.BuildWidget("rightSidebar",tmpl_profile_vars.Header))) }
w.Write(footer_8) w.Write(footer_8)
w.Write([]byte(item.FriendlyName))
w.Write(footer_9)
}
}
}
w.Write(footer_10)
w.Write([]byte(common.BuildWidget("rightSidebar",tmpl_profile_vars.Header)))
w.Write(footer_11)
return nil return nil
} }

View File

@ -3,8 +3,8 @@
// Code generated by Gosora. More below: // 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. */ /* This file was automatically generated by the software. Please don't edit it as your changes may be overwritten at any moment. */
package main package main
import "net/http"
import "./common" import "./common"
import "net/http"
var register_Tmpl_Phrase_ID int var register_Tmpl_Phrase_ID int
@ -15,6 +15,25 @@ func init() {
common.TmplPtrMap["register"] = &common.Template_register_handle common.TmplPtrMap["register"] = &common.Template_register_handle
common.TmplPtrMap["o_register"] = Template_register common.TmplPtrMap["o_register"] = Template_register
register_Tmpl_Phrase_ID = common.RegisterTmplPhraseNames([]string{ register_Tmpl_Phrase_ID = common.RegisterTmplPhraseNames([]string{
"menu_forums_aria",
"menu_forums_tooltip",
"menu_topics_aria",
"menu_topics_tooltip",
"menu_alert_counter_aria",
"menu_alert_list_aria",
"menu_account_aria",
"menu_account_tooltip",
"menu_profile_aria",
"menu_profile_tooltip",
"menu_panel_aria",
"menu_panel_tooltip",
"menu_logout_aria",
"menu_logout_tooltip",
"menu_register_aria",
"menu_register_tooltip",
"menu_login_aria",
"menu_login_tooltip",
"menu_hamburger_tooltip",
"register_head", "register_head",
"register_account_name", "register_account_name",
"register_account_name", "register_account_name",
@ -22,6 +41,9 @@ func init() {
"register_account_password", "register_account_password",
"register_account_confirm_password", "register_account_confirm_password",
"register_submit_button", "register_submit_button",
"footer_powered_by",
"footer_made_with_love",
"footer_theme_selector_aria",
}) })
} }
@ -69,16 +91,54 @@ w.Write(menu_0)
w.Write(menu_1) w.Write(menu_1)
w.Write([]byte(tmpl_register_vars.Header.Site.ShortName)) w.Write([]byte(tmpl_register_vars.Header.Site.ShortName))
w.Write(menu_2) w.Write(menu_2)
if tmpl_register_vars.CurrentUser.Loggedin { w.Write(phrases[0])
w.Write(menu_3) w.Write(menu_3)
w.Write([]byte(tmpl_register_vars.CurrentUser.Link)) w.Write(phrases[1])
w.Write(menu_4) w.Write(menu_4)
w.Write([]byte(tmpl_register_vars.CurrentUser.Session)) w.Write(phrases[2])
w.Write(menu_5) w.Write(menu_5)
} else { w.Write(phrases[3])
w.Write(menu_6) w.Write(menu_6)
} w.Write(phrases[4])
w.Write(menu_7) w.Write(menu_7)
w.Write(phrases[5])
w.Write(menu_8)
if tmpl_register_vars.CurrentUser.Loggedin {
w.Write(menu_9)
w.Write(phrases[6])
w.Write(menu_10)
w.Write(phrases[7])
w.Write(menu_11)
w.Write([]byte(tmpl_register_vars.CurrentUser.Link))
w.Write(menu_12)
w.Write(phrases[8])
w.Write(menu_13)
w.Write(phrases[9])
w.Write(menu_14)
w.Write(phrases[10])
w.Write(menu_15)
w.Write(phrases[11])
w.Write(menu_16)
w.Write([]byte(tmpl_register_vars.CurrentUser.Session))
w.Write(menu_17)
w.Write(phrases[12])
w.Write(menu_18)
w.Write(phrases[13])
w.Write(menu_19)
} else {
w.Write(menu_20)
w.Write(phrases[14])
w.Write(menu_21)
w.Write(phrases[15])
w.Write(menu_22)
w.Write(phrases[16])
w.Write(menu_23)
w.Write(phrases[17])
w.Write(menu_24)
}
w.Write(menu_25)
w.Write(phrases[18])
w.Write(menu_26)
w.Write(header_17) w.Write(header_17)
if tmpl_register_vars.Header.Widgets.RightSidebar != "" { if tmpl_register_vars.Header.Widgets.RightSidebar != "" {
w.Write(header_18) w.Write(header_18)
@ -91,41 +151,48 @@ w.Write([]byte(item))
w.Write(header_21) w.Write(header_21)
} }
} }
w.Write(header_22)
w.Write(register_0) w.Write(register_0)
w.Write(phrases[0]) w.Write(phrases[19])
w.Write(register_1) w.Write(register_1)
w.Write(phrases[1]) w.Write(phrases[20])
w.Write(register_2) w.Write(register_2)
w.Write(phrases[2]) w.Write(phrases[21])
w.Write(register_3) w.Write(register_3)
w.Write(phrases[3]) w.Write(phrases[22])
w.Write(register_4) w.Write(register_4)
w.Write(phrases[4]) w.Write(phrases[23])
w.Write(register_5) w.Write(register_5)
w.Write(phrases[5]) w.Write(phrases[24])
w.Write(register_6) w.Write(register_6)
w.Write(phrases[6]) w.Write(phrases[25])
w.Write(register_7) w.Write(register_7)
w.Write(footer_0) w.Write(footer_0)
w.Write([]byte(common.BuildWidget("footer",tmpl_register_vars.Header))) w.Write([]byte(common.BuildWidget("footer",tmpl_register_vars.Header)))
w.Write(footer_1) w.Write(footer_1)
w.Write(phrases[26])
w.Write(footer_2)
w.Write(phrases[27])
w.Write(footer_3)
w.Write(phrases[28])
w.Write(footer_4)
if len(tmpl_register_vars.Header.Themes) != 0 { if len(tmpl_register_vars.Header.Themes) != 0 {
for _, item := range tmpl_register_vars.Header.Themes { for _, item := range tmpl_register_vars.Header.Themes {
if !item.HideFromThemes { if !item.HideFromThemes {
w.Write(footer_2)
w.Write([]byte(item.Name))
w.Write(footer_3)
if tmpl_register_vars.Header.Theme.Name == item.Name {
w.Write(footer_4)
}
w.Write(footer_5) w.Write(footer_5)
w.Write([]byte(item.FriendlyName)) w.Write([]byte(item.Name))
w.Write(footer_6) w.Write(footer_6)
} if tmpl_register_vars.Header.Theme.Name == item.Name {
}
}
w.Write(footer_7) w.Write(footer_7)
w.Write([]byte(common.BuildWidget("rightSidebar",tmpl_register_vars.Header))) }
w.Write(footer_8) w.Write(footer_8)
w.Write([]byte(item.FriendlyName))
w.Write(footer_9)
}
}
}
w.Write(footer_10)
w.Write([]byte(common.BuildWidget("rightSidebar",tmpl_register_vars.Header)))
w.Write(footer_11)
return nil return nil
} }

View File

@ -15,10 +15,94 @@ func init() {
common.Ctemplates = append(common.Ctemplates,"topic") common.Ctemplates = append(common.Ctemplates,"topic")
common.TmplPtrMap["topic"] = &common.Template_topic_handle common.TmplPtrMap["topic"] = &common.Template_topic_handle
common.TmplPtrMap["o_topic"] = Template_topic common.TmplPtrMap["o_topic"] = Template_topic
topic_Tmpl_Phrase_ID = common.RegisterTmplPhraseNames([]string{
"menu_forums_aria",
"menu_forums_tooltip",
"menu_topics_aria",
"menu_topics_tooltip",
"menu_alert_counter_aria",
"menu_alert_list_aria",
"menu_account_aria",
"menu_account_tooltip",
"menu_profile_aria",
"menu_profile_tooltip",
"menu_panel_aria",
"menu_panel_tooltip",
"menu_logout_aria",
"menu_logout_tooltip",
"menu_register_aria",
"menu_register_tooltip",
"menu_login_aria",
"menu_login_tooltip",
"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 // nolint
func Template_topic(tmpl_topic_vars common.TopicPage, w http.ResponseWriter) error { func Template_topic(tmpl_topic_vars common.TopicPage, w http.ResponseWriter) error {
var phrases = common.GetTmplPhrasesBytes(topic_Tmpl_Phrase_ID)
w.Write(header_0) w.Write(header_0)
w.Write([]byte(tmpl_topic_vars.Title)) w.Write([]byte(tmpl_topic_vars.Title))
w.Write(header_1) w.Write(header_1)
@ -60,16 +144,54 @@ w.Write(menu_0)
w.Write(menu_1) w.Write(menu_1)
w.Write([]byte(tmpl_topic_vars.Header.Site.ShortName)) w.Write([]byte(tmpl_topic_vars.Header.Site.ShortName))
w.Write(menu_2) w.Write(menu_2)
if tmpl_topic_vars.CurrentUser.Loggedin { w.Write(phrases[0])
w.Write(menu_3) w.Write(menu_3)
w.Write([]byte(tmpl_topic_vars.CurrentUser.Link)) w.Write(phrases[1])
w.Write(menu_4) w.Write(menu_4)
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session)) w.Write(phrases[2])
w.Write(menu_5) w.Write(menu_5)
} else { w.Write(phrases[3])
w.Write(menu_6) w.Write(menu_6)
} w.Write(phrases[4])
w.Write(menu_7) w.Write(menu_7)
w.Write(phrases[5])
w.Write(menu_8)
if tmpl_topic_vars.CurrentUser.Loggedin {
w.Write(menu_9)
w.Write(phrases[6])
w.Write(menu_10)
w.Write(phrases[7])
w.Write(menu_11)
w.Write([]byte(tmpl_topic_vars.CurrentUser.Link))
w.Write(menu_12)
w.Write(phrases[8])
w.Write(menu_13)
w.Write(phrases[9])
w.Write(menu_14)
w.Write(phrases[10])
w.Write(menu_15)
w.Write(phrases[11])
w.Write(menu_16)
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
w.Write(menu_17)
w.Write(phrases[12])
w.Write(menu_18)
w.Write(phrases[13])
w.Write(menu_19)
} else {
w.Write(menu_20)
w.Write(phrases[14])
w.Write(menu_21)
w.Write(phrases[15])
w.Write(menu_22)
w.Write(phrases[16])
w.Write(menu_23)
w.Write(phrases[17])
w.Write(menu_24)
}
w.Write(menu_25)
w.Write(phrases[18])
w.Write(menu_26)
w.Write(header_17) w.Write(header_17)
if tmpl_topic_vars.Header.Widgets.RightSidebar != "" { if tmpl_topic_vars.Header.Widgets.RightSidebar != "" {
w.Write(header_18) w.Write(header_18)
@ -82,6 +204,7 @@ w.Write([]byte(item))
w.Write(header_21) w.Write(header_21)
} }
} }
w.Write(header_22)
w.Write(topic_0) w.Write(topic_0)
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID))) w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
w.Write(topic_1) w.Write(topic_1)
@ -93,297 +216,427 @@ w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
w.Write(topic_4) w.Write(topic_4)
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Page - 1))) w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Page - 1)))
w.Write(topic_5) w.Write(topic_5)
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID))) w.Write(phrases[19])
w.Write(topic_6) w.Write(topic_6)
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Page - 1))) w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
w.Write(topic_7) w.Write(topic_7)
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Page - 1)))
w.Write(topic_8)
w.Write(phrases[20])
w.Write(topic_9)
} }
if tmpl_topic_vars.LastPage != tmpl_topic_vars.Page { if tmpl_topic_vars.LastPage != tmpl_topic_vars.Page {
w.Write(topic_8)
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
w.Write(topic_9)
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Page + 1)))
w.Write(topic_10) w.Write(topic_10)
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID))) w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
w.Write(topic_11) w.Write(topic_11)
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Page + 1))) w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Page + 1)))
w.Write(topic_12) w.Write(topic_12)
} w.Write(phrases[21])
w.Write(topic_13) w.Write(topic_13)
if tmpl_topic_vars.Topic.Sticky { w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
w.Write(topic_14) w.Write(topic_14)
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Page + 1)))
w.Write(topic_15)
w.Write(phrases[22])
w.Write(topic_16)
}
w.Write(topic_17)
w.Write(phrases[23])
w.Write(topic_18)
if tmpl_topic_vars.Topic.Sticky {
w.Write(topic_19)
} else { } else {
if tmpl_topic_vars.Topic.IsClosed { if tmpl_topic_vars.Topic.IsClosed {
w.Write(topic_15)
}
}
w.Write(topic_16)
w.Write([]byte(tmpl_topic_vars.Topic.Title))
w.Write(topic_17)
if tmpl_topic_vars.Topic.IsClosed {
w.Write(topic_18)
}
if tmpl_topic_vars.CurrentUser.Perms.EditTopic {
w.Write(topic_19)
w.Write([]byte(tmpl_topic_vars.Topic.Title))
w.Write(topic_20) w.Write(topic_20)
} }
}
w.Write(topic_21) w.Write(topic_21)
if tmpl_topic_vars.Poll.ID > 0 { w.Write([]byte(tmpl_topic_vars.Topic.Title))
w.Write(topic_22) w.Write(topic_22)
w.Write([]byte(tmpl_topic_vars.Topic.ClassName)) if tmpl_topic_vars.Topic.IsClosed {
w.Write(topic_23) w.Write(topic_23)
w.Write([]byte(tmpl_topic_vars.Topic.Avatar)) w.Write(phrases[24])
w.Write(topic_24) w.Write(topic_24)
w.Write([]byte(tmpl_topic_vars.Header.Theme.Name)) w.Write(phrases[25])
w.Write(topic_25) w.Write(topic_25)
if tmpl_topic_vars.Topic.ContentLines <= 5 {
w.Write(topic_26)
}
w.Write(topic_27)
if len(tmpl_topic_vars.Poll.QuickOptions) != 0 {
for _, item := range tmpl_topic_vars.Poll.QuickOptions {
w.Write(topic_28)
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Poll.ID)))
w.Write(topic_29)
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topic_30)
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topic_31)
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topic_32)
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topic_33)
w.Write([]byte(item.Value))
w.Write(topic_34)
}
}
w.Write(topic_35)
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Poll.ID)))
w.Write(topic_36)
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Poll.ID)))
w.Write(topic_37)
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Poll.ID)))
w.Write(topic_38)
}
w.Write(topic_39)
w.Write([]byte(tmpl_topic_vars.Topic.ClassName))
w.Write(topic_40)
w.Write([]byte(tmpl_topic_vars.Topic.Avatar))
w.Write(topic_41)
w.Write([]byte(tmpl_topic_vars.Header.Theme.Name))
w.Write(topic_42)
if tmpl_topic_vars.Topic.ContentLines <= 5 {
w.Write(topic_43)
}
w.Write(topic_44)
w.Write([]byte(tmpl_topic_vars.Topic.ContentHTML))
w.Write(topic_45)
w.Write([]byte(tmpl_topic_vars.Topic.Content))
w.Write(topic_46)
w.Write([]byte(tmpl_topic_vars.Topic.UserLink))
w.Write(topic_47)
w.Write([]byte(tmpl_topic_vars.Topic.CreatedByName))
w.Write(topic_48)
if tmpl_topic_vars.CurrentUser.Perms.LikeItem {
w.Write(topic_49)
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
w.Write(topic_50)
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
w.Write(topic_51)
if tmpl_topic_vars.Topic.Liked {
w.Write(topic_52)
} else {
w.Write(topic_53)
}
w.Write(topic_54)
if tmpl_topic_vars.Topic.Liked {
w.Write(topic_55)
}
w.Write(topic_56)
} }
if tmpl_topic_vars.CurrentUser.Perms.EditTopic { if tmpl_topic_vars.CurrentUser.Perms.EditTopic {
w.Write(topic_26)
w.Write([]byte(tmpl_topic_vars.Topic.Title))
w.Write(topic_27)
w.Write(phrases[26])
w.Write(topic_28)
w.Write(phrases[27])
w.Write(topic_29)
}
w.Write(topic_30)
if tmpl_topic_vars.Poll.ID > 0 {
w.Write(topic_31)
w.Write(phrases[28])
w.Write(topic_32)
w.Write([]byte(tmpl_topic_vars.Topic.ClassName))
w.Write(topic_33)
w.Write([]byte(tmpl_topic_vars.Topic.Avatar))
w.Write(topic_34)
w.Write([]byte(tmpl_topic_vars.Header.Theme.Name))
w.Write(topic_35)
if tmpl_topic_vars.Topic.ContentLines <= 5 {
w.Write(topic_36)
}
w.Write(topic_37)
if len(tmpl_topic_vars.Poll.QuickOptions) != 0 {
for _, item := range tmpl_topic_vars.Poll.QuickOptions {
w.Write(topic_38)
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Poll.ID)))
w.Write(topic_39)
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topic_40)
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topic_41)
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topic_42)
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topic_43)
w.Write([]byte(item.Value))
w.Write(topic_44)
}
}
w.Write(topic_45)
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Poll.ID)))
w.Write(topic_46)
w.Write(phrases[29])
w.Write(topic_47)
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Poll.ID)))
w.Write(topic_48)
w.Write(phrases[30])
w.Write(topic_49)
w.Write(phrases[31])
w.Write(topic_50)
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Poll.ID)))
w.Write(topic_51)
}
w.Write(topic_52)
w.Write(phrases[32])
w.Write(topic_53)
w.Write([]byte(tmpl_topic_vars.Topic.ClassName))
w.Write(topic_54)
w.Write([]byte(tmpl_topic_vars.Topic.Avatar))
w.Write(topic_55)
w.Write([]byte(tmpl_topic_vars.Header.Theme.Name))
w.Write(topic_56)
if tmpl_topic_vars.Topic.ContentLines <= 5 {
w.Write(topic_57) w.Write(topic_57)
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID))) }
w.Write(topic_58) w.Write(topic_58)
w.Write([]byte(tmpl_topic_vars.Topic.ContentHTML))
w.Write(topic_59)
w.Write([]byte(tmpl_topic_vars.Topic.Content))
w.Write(topic_60)
w.Write(phrases[33])
w.Write(topic_61)
w.Write([]byte(tmpl_topic_vars.Topic.UserLink))
w.Write(topic_62)
w.Write([]byte(tmpl_topic_vars.Topic.CreatedByName))
w.Write(topic_63)
if tmpl_topic_vars.CurrentUser.Perms.LikeItem {
w.Write(topic_64)
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
w.Write(topic_65)
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
w.Write(topic_66)
if tmpl_topic_vars.Topic.Liked {
w.Write(topic_67)
w.Write(phrases[34])
w.Write(topic_68)
w.Write(phrases[35])
w.Write(topic_69)
} else {
w.Write(topic_70)
w.Write(phrases[36])
w.Write(topic_71)
w.Write(phrases[37])
w.Write(topic_72)
}
w.Write(topic_73)
if tmpl_topic_vars.Topic.Liked {
w.Write(topic_74)
}
w.Write(topic_75)
}
if tmpl_topic_vars.CurrentUser.Perms.EditTopic {
w.Write(topic_76)
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
w.Write(topic_77)
w.Write(phrases[38])
w.Write(topic_78)
w.Write(phrases[39])
w.Write(topic_79)
} }
if tmpl_topic_vars.CurrentUser.Perms.DeleteTopic { if tmpl_topic_vars.CurrentUser.Perms.DeleteTopic {
w.Write(topic_59) w.Write(topic_80)
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID))) w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
w.Write(topic_60) w.Write(topic_81)
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session)) w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
w.Write(topic_61) w.Write(topic_82)
w.Write(phrases[40])
w.Write(topic_83)
w.Write(phrases[41])
w.Write(topic_84)
} }
if tmpl_topic_vars.CurrentUser.Perms.CloseTopic { if tmpl_topic_vars.CurrentUser.Perms.CloseTopic {
if tmpl_topic_vars.Topic.IsClosed { if tmpl_topic_vars.Topic.IsClosed {
w.Write(topic_62) w.Write(topic_85)
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID))) w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
w.Write(topic_63) w.Write(topic_86)
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session)) w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
w.Write(topic_64) w.Write(topic_87)
w.Write(phrases[42])
w.Write(topic_88)
w.Write(phrases[43])
w.Write(topic_89)
} else { } else {
w.Write(topic_65) w.Write(topic_90)
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID))) w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
w.Write(topic_66) w.Write(topic_91)
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session)) w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
w.Write(topic_67) w.Write(topic_92)
w.Write(phrases[44])
w.Write(topic_93)
w.Write(phrases[45])
w.Write(topic_94)
} }
} }
if tmpl_topic_vars.CurrentUser.Perms.PinTopic { if tmpl_topic_vars.CurrentUser.Perms.PinTopic {
if tmpl_topic_vars.Topic.Sticky { if tmpl_topic_vars.Topic.Sticky {
w.Write(topic_68)
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
w.Write(topic_69)
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
w.Write(topic_70)
} else {
w.Write(topic_71)
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
w.Write(topic_72)
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
w.Write(topic_73)
}
}
if tmpl_topic_vars.CurrentUser.Perms.ViewIPs {
w.Write(topic_74)
w.Write([]byte(tmpl_topic_vars.Topic.IPAddress))
w.Write(topic_75)
w.Write([]byte(tmpl_topic_vars.Topic.IPAddress))
w.Write(topic_76)
}
w.Write(topic_77)
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
w.Write(topic_78)
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
w.Write(topic_79)
if tmpl_topic_vars.Topic.LikeCount > 0 {
w.Write(topic_80)
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.LikeCount)))
w.Write(topic_81)
}
if tmpl_topic_vars.Topic.Tag != "" {
w.Write(topic_82)
w.Write([]byte(tmpl_topic_vars.Topic.Tag))
w.Write(topic_83)
} else {
w.Write(topic_84)
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.Level)))
w.Write(topic_85)
}
w.Write(topic_86)
if len(tmpl_topic_vars.ItemList) != 0 {
for _, item := range tmpl_topic_vars.ItemList {
if item.ActionType != "" {
w.Write(topic_87)
w.Write([]byte(item.ActionIcon))
w.Write(topic_88)
w.Write([]byte(item.ActionType))
w.Write(topic_89)
} else {
w.Write(topic_90)
w.Write([]byte(item.ClassName))
w.Write(topic_91)
w.Write([]byte(item.Avatar))
w.Write(topic_92)
w.Write([]byte(tmpl_topic_vars.Header.Theme.Name))
w.Write(topic_93)
if item.ContentLines <= 5 {
w.Write(topic_94)
}
w.Write(topic_95) w.Write(topic_95)
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
w.Write(topic_96) w.Write(topic_96)
w.Write([]byte(item.ContentHtml)) w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
w.Write(topic_97) w.Write(topic_97)
w.Write([]byte(item.UserLink)) w.Write(phrases[46])
w.Write(topic_98) w.Write(topic_98)
w.Write([]byte(item.CreatedByName)) w.Write(phrases[47])
w.Write(topic_99) w.Write(topic_99)
if tmpl_topic_vars.CurrentUser.Perms.LikeItem { } else {
w.Write(topic_100) w.Write(topic_100)
w.Write([]byte(strconv.Itoa(item.ID))) w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
w.Write(topic_101) w.Write(topic_101)
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session)) w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
w.Write(topic_102) w.Write(topic_102)
if item.Liked { w.Write(phrases[48])
w.Write(topic_103) w.Write(topic_103)
} w.Write(phrases[49])
w.Write(topic_104) w.Write(topic_104)
} }
if tmpl_topic_vars.CurrentUser.Perms.EditReply {
w.Write(topic_105)
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topic_106)
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
w.Write(topic_107)
}
if tmpl_topic_vars.CurrentUser.Perms.DeleteReply {
w.Write(topic_108)
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topic_109)
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
w.Write(topic_110)
} }
if tmpl_topic_vars.CurrentUser.Perms.ViewIPs { if tmpl_topic_vars.CurrentUser.Perms.ViewIPs {
w.Write(topic_111) w.Write(topic_105)
w.Write([]byte(item.IPAddress)) w.Write([]byte(tmpl_topic_vars.Topic.IPAddress))
w.Write(topic_112) w.Write(topic_106)
w.Write(phrases[50])
w.Write(topic_107)
w.Write([]byte(tmpl_topic_vars.Topic.IPAddress))
w.Write(topic_108)
} }
w.Write(topic_113) w.Write(topic_109)
w.Write([]byte(strconv.Itoa(item.ID))) w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
w.Write(topic_114) w.Write(topic_110)
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session)) w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
w.Write(topic_111)
w.Write(phrases[51])
w.Write(topic_112)
w.Write(phrases[52])
w.Write(topic_113)
if tmpl_topic_vars.Topic.LikeCount > 0 {
w.Write(topic_114)
w.Write(phrases[53])
w.Write(topic_115) w.Write(topic_115)
if item.LikeCount > 0 { w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.LikeCount)))
w.Write(topic_116) w.Write(topic_116)
w.Write([]byte(strconv.Itoa(item.LikeCount))) w.Write(phrases[54])
w.Write(topic_117) w.Write(topic_117)
} }
if item.Tag != "" { if tmpl_topic_vars.Topic.Tag != "" {
w.Write(topic_118) w.Write(topic_118)
w.Write([]byte(item.Tag)) w.Write([]byte(tmpl_topic_vars.Topic.Tag))
w.Write(topic_119) w.Write(topic_119)
} else { } else {
w.Write(topic_120) w.Write(topic_120)
w.Write([]byte(strconv.Itoa(item.Level))) w.Write(phrases[55])
w.Write(topic_121) w.Write(topic_121)
} w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.Level)))
w.Write(topic_122) w.Write(topic_122)
} w.Write(phrases[56])
}
}
w.Write(topic_123) w.Write(topic_123)
if tmpl_topic_vars.CurrentUser.Perms.CreateReply { }
w.Write(topic_124) w.Write(topic_124)
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session)) w.Write(phrases[57])
w.Write(topic_125) w.Write(topic_125)
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID))) if len(tmpl_topic_vars.ItemList) != 0 {
for _, item := range tmpl_topic_vars.ItemList {
if item.ActionType != "" {
w.Write(topic_126) w.Write(topic_126)
if tmpl_topic_vars.CurrentUser.Perms.UploadFiles { w.Write([]byte(item.ActionIcon))
w.Write(topic_127) w.Write(topic_127)
} w.Write([]byte(item.ActionType))
w.Write(topic_128) w.Write(topic_128)
} } else {
w.Write(topic_129) w.Write(topic_129)
w.Write([]byte(item.ClassName))
w.Write(topic_130)
w.Write([]byte(item.Avatar))
w.Write(topic_131)
w.Write([]byte(tmpl_topic_vars.Header.Theme.Name))
w.Write(topic_132)
if item.ContentLines <= 5 {
w.Write(topic_133)
}
w.Write(topic_134)
w.Write(topic_135)
w.Write([]byte(item.ContentHtml))
w.Write(topic_136)
w.Write([]byte(item.UserLink))
w.Write(topic_137)
w.Write([]byte(item.CreatedByName))
w.Write(topic_138)
if tmpl_topic_vars.CurrentUser.Perms.LikeItem {
if item.Liked {
w.Write(topic_139)
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topic_140)
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
w.Write(topic_141)
w.Write(phrases[58])
w.Write(topic_142)
w.Write(phrases[59])
w.Write(topic_143)
} else {
w.Write(topic_144)
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topic_145)
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
w.Write(topic_146)
w.Write(phrases[60])
w.Write(topic_147)
w.Write(phrases[61])
w.Write(topic_148)
}
}
if tmpl_topic_vars.CurrentUser.Perms.EditReply {
w.Write(topic_149)
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topic_150)
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
w.Write(topic_151)
w.Write(phrases[62])
w.Write(topic_152)
w.Write(phrases[63])
w.Write(topic_153)
}
if tmpl_topic_vars.CurrentUser.Perms.DeleteReply {
w.Write(topic_154)
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topic_155)
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
w.Write(topic_156)
w.Write(phrases[64])
w.Write(topic_157)
w.Write(phrases[65])
w.Write(topic_158)
}
if tmpl_topic_vars.CurrentUser.Perms.ViewIPs {
w.Write(topic_159)
w.Write([]byte(item.IPAddress))
w.Write(topic_160)
w.Write(phrases[66])
w.Write(topic_161)
w.Write([]byte(item.IPAddress))
w.Write(topic_162)
}
w.Write(topic_163)
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topic_164)
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
w.Write(topic_165)
w.Write(phrases[67])
w.Write(topic_166)
w.Write(phrases[68])
w.Write(topic_167)
if item.LikeCount > 0 {
w.Write(topic_168)
w.Write([]byte(strconv.Itoa(item.LikeCount)))
w.Write(topic_169)
w.Write(phrases[69])
w.Write(topic_170)
}
if item.Tag != "" {
w.Write(topic_171)
w.Write([]byte(item.Tag))
w.Write(topic_172)
} else {
w.Write(topic_173)
w.Write(phrases[70])
w.Write(topic_174)
w.Write([]byte(strconv.Itoa(item.Level)))
w.Write(topic_175)
w.Write(phrases[71])
w.Write(topic_176)
}
w.Write(topic_177)
}
}
}
w.Write(topic_178)
if tmpl_topic_vars.CurrentUser.Perms.CreateReply {
w.Write(topic_179)
w.Write(phrases[72])
w.Write(topic_180)
w.Write([]byte(tmpl_topic_vars.CurrentUser.Session))
w.Write(topic_181)
w.Write([]byte(strconv.Itoa(tmpl_topic_vars.Topic.ID)))
w.Write(topic_182)
w.Write(phrases[73])
w.Write(topic_183)
w.Write(phrases[74])
w.Write(topic_184)
w.Write(phrases[75])
w.Write(topic_185)
w.Write(phrases[76])
w.Write(topic_186)
if tmpl_topic_vars.CurrentUser.Perms.UploadFiles {
w.Write(topic_187)
w.Write(phrases[77])
w.Write(topic_188)
}
w.Write(topic_189)
}
w.Write(topic_190)
w.Write(footer_0) w.Write(footer_0)
w.Write([]byte(common.BuildWidget("footer",tmpl_topic_vars.Header))) w.Write([]byte(common.BuildWidget("footer",tmpl_topic_vars.Header)))
w.Write(footer_1) w.Write(footer_1)
w.Write(phrases[78])
w.Write(footer_2)
w.Write(phrases[79])
w.Write(footer_3)
w.Write(phrases[80])
w.Write(footer_4)
if len(tmpl_topic_vars.Header.Themes) != 0 { if len(tmpl_topic_vars.Header.Themes) != 0 {
for _, item := range tmpl_topic_vars.Header.Themes { for _, item := range tmpl_topic_vars.Header.Themes {
if !item.HideFromThemes { if !item.HideFromThemes {
w.Write(footer_2)
w.Write([]byte(item.Name))
w.Write(footer_3)
if tmpl_topic_vars.Header.Theme.Name == item.Name {
w.Write(footer_4)
}
w.Write(footer_5) w.Write(footer_5)
w.Write([]byte(item.FriendlyName)) w.Write([]byte(item.Name))
w.Write(footer_6) w.Write(footer_6)
} if tmpl_topic_vars.Header.Theme.Name == item.Name {
}
}
w.Write(footer_7) w.Write(footer_7)
w.Write([]byte(common.BuildWidget("rightSidebar",tmpl_topic_vars.Header))) }
w.Write(footer_8) w.Write(footer_8)
w.Write([]byte(item.FriendlyName))
w.Write(footer_9)
}
}
}
w.Write(footer_10)
w.Write([]byte(common.BuildWidget("rightSidebar",tmpl_topic_vars.Header)))
w.Write(footer_11)
return nil return nil
} }

View File

@ -15,10 +15,81 @@ func init() {
common.Ctemplates = append(common.Ctemplates,"topic_alt") common.Ctemplates = append(common.Ctemplates,"topic_alt")
common.TmplPtrMap["topic_alt"] = &common.Template_topic_alt_handle common.TmplPtrMap["topic_alt"] = &common.Template_topic_alt_handle
common.TmplPtrMap["o_topic_alt"] = Template_topic_alt common.TmplPtrMap["o_topic_alt"] = Template_topic_alt
topic_alt_Tmpl_Phrase_ID = common.RegisterTmplPhraseNames([]string{
"menu_forums_aria",
"menu_forums_tooltip",
"menu_topics_aria",
"menu_topics_tooltip",
"menu_alert_counter_aria",
"menu_alert_list_aria",
"menu_account_aria",
"menu_account_tooltip",
"menu_profile_aria",
"menu_profile_tooltip",
"menu_panel_aria",
"menu_panel_tooltip",
"menu_logout_aria",
"menu_logout_tooltip",
"menu_register_aria",
"menu_register_tooltip",
"menu_login_aria",
"menu_login_tooltip",
"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 // nolint
func Template_topic_alt(tmpl_topic_alt_vars common.TopicPage, w http.ResponseWriter) error { func Template_topic_alt(tmpl_topic_alt_vars common.TopicPage, w http.ResponseWriter) error {
var phrases = common.GetTmplPhrasesBytes(topic_alt_Tmpl_Phrase_ID)
w.Write(header_0) w.Write(header_0)
w.Write([]byte(tmpl_topic_alt_vars.Title)) w.Write([]byte(tmpl_topic_alt_vars.Title))
w.Write(header_1) w.Write(header_1)
@ -60,16 +131,54 @@ w.Write(menu_0)
w.Write(menu_1) w.Write(menu_1)
w.Write([]byte(tmpl_topic_alt_vars.Header.Site.ShortName)) w.Write([]byte(tmpl_topic_alt_vars.Header.Site.ShortName))
w.Write(menu_2) w.Write(menu_2)
if tmpl_topic_alt_vars.CurrentUser.Loggedin { w.Write(phrases[0])
w.Write(menu_3) w.Write(menu_3)
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Link)) w.Write(phrases[1])
w.Write(menu_4) w.Write(menu_4)
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session)) w.Write(phrases[2])
w.Write(menu_5) w.Write(menu_5)
} else { w.Write(phrases[3])
w.Write(menu_6) w.Write(menu_6)
} w.Write(phrases[4])
w.Write(menu_7) w.Write(menu_7)
w.Write(phrases[5])
w.Write(menu_8)
if tmpl_topic_alt_vars.CurrentUser.Loggedin {
w.Write(menu_9)
w.Write(phrases[6])
w.Write(menu_10)
w.Write(phrases[7])
w.Write(menu_11)
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Link))
w.Write(menu_12)
w.Write(phrases[8])
w.Write(menu_13)
w.Write(phrases[9])
w.Write(menu_14)
w.Write(phrases[10])
w.Write(menu_15)
w.Write(phrases[11])
w.Write(menu_16)
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
w.Write(menu_17)
w.Write(phrases[12])
w.Write(menu_18)
w.Write(phrases[13])
w.Write(menu_19)
} else {
w.Write(menu_20)
w.Write(phrases[14])
w.Write(menu_21)
w.Write(phrases[15])
w.Write(menu_22)
w.Write(phrases[16])
w.Write(menu_23)
w.Write(phrases[17])
w.Write(menu_24)
}
w.Write(menu_25)
w.Write(phrases[18])
w.Write(menu_26)
w.Write(header_17) w.Write(header_17)
if tmpl_topic_alt_vars.Header.Widgets.RightSidebar != "" { if tmpl_topic_alt_vars.Header.Widgets.RightSidebar != "" {
w.Write(header_18) w.Write(header_18)
@ -82,350 +191,445 @@ w.Write([]byte(item))
w.Write(header_21) w.Write(header_21)
} }
} }
w.Write(header_22)
if tmpl_topic_alt_vars.Page > 1 { if tmpl_topic_alt_vars.Page > 1 {
w.Write(topic_alt_0) w.Write(topic_alt_0)
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID))) w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
w.Write(topic_alt_1) w.Write(topic_alt_1)
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Page - 1))) w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Page - 1)))
w.Write(topic_alt_2) w.Write(topic_alt_2)
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID))) w.Write(phrases[19])
w.Write(topic_alt_3) w.Write(topic_alt_3)
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Page - 1))) w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
w.Write(topic_alt_4) w.Write(topic_alt_4)
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Page - 1)))
w.Write(topic_alt_5)
w.Write(phrases[20])
w.Write(topic_alt_6)
} }
if tmpl_topic_alt_vars.LastPage != tmpl_topic_alt_vars.Page { if tmpl_topic_alt_vars.LastPage != tmpl_topic_alt_vars.Page {
w.Write(topic_alt_5)
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
w.Write(topic_alt_6)
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Page + 1)))
w.Write(topic_alt_7) w.Write(topic_alt_7)
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID))) w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
w.Write(topic_alt_8) w.Write(topic_alt_8)
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Page + 1))) w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Page + 1)))
w.Write(topic_alt_9) w.Write(topic_alt_9)
} w.Write(phrases[21])
w.Write(topic_alt_10) w.Write(topic_alt_10)
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID))) w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
w.Write(topic_alt_11) w.Write(topic_alt_11)
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session)) w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Page + 1)))
w.Write(topic_alt_12) w.Write(topic_alt_12)
if tmpl_topic_alt_vars.Topic.Sticky { w.Write(phrases[22])
w.Write(topic_alt_13) w.Write(topic_alt_13)
}
w.Write(topic_alt_14)
w.Write(phrases[23])
w.Write(topic_alt_15)
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
w.Write(topic_alt_16)
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
w.Write(topic_alt_17)
if tmpl_topic_alt_vars.Topic.Sticky {
w.Write(topic_alt_18)
} else { } else {
if tmpl_topic_alt_vars.Topic.IsClosed { if tmpl_topic_alt_vars.Topic.IsClosed {
w.Write(topic_alt_14)
}
}
w.Write(topic_alt_15)
w.Write([]byte(tmpl_topic_alt_vars.Topic.Title))
w.Write(topic_alt_16)
if tmpl_topic_alt_vars.Topic.IsClosed {
w.Write(topic_alt_17)
}
if tmpl_topic_alt_vars.CurrentUser.Perms.EditTopic {
w.Write(topic_alt_18)
w.Write([]byte(tmpl_topic_alt_vars.Topic.Title))
w.Write(topic_alt_19) w.Write(topic_alt_19)
} }
}
w.Write(topic_alt_20) w.Write(topic_alt_20)
if tmpl_topic_alt_vars.Poll.ID > 0 { w.Write([]byte(tmpl_topic_alt_vars.Topic.Title))
w.Write(topic_alt_21) w.Write(topic_alt_21)
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Poll.ID))) if tmpl_topic_alt_vars.Topic.IsClosed {
w.Write(topic_alt_22) w.Write(topic_alt_22)
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Poll.ID))) w.Write(phrases[24])
w.Write(topic_alt_23) w.Write(topic_alt_23)
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session)) w.Write(phrases[25])
w.Write(topic_alt_24) w.Write(topic_alt_24)
w.Write([]byte(tmpl_topic_alt_vars.Topic.Avatar)) }
if tmpl_topic_alt_vars.CurrentUser.Perms.EditTopic {
w.Write(topic_alt_25) w.Write(topic_alt_25)
w.Write([]byte(tmpl_topic_alt_vars.Topic.UserLink)) w.Write([]byte(tmpl_topic_alt_vars.Topic.Title))
w.Write(topic_alt_26) w.Write(topic_alt_26)
w.Write([]byte(tmpl_topic_alt_vars.Topic.CreatedByName)) w.Write(phrases[26])
w.Write(topic_alt_27) w.Write(topic_alt_27)
if tmpl_topic_alt_vars.Topic.Tag != "" { w.Write(phrases[27])
w.Write(topic_alt_28) w.Write(topic_alt_28)
w.Write([]byte(tmpl_topic_alt_vars.Topic.Tag)) }
w.Write(topic_alt_29) w.Write(topic_alt_29)
} else { if tmpl_topic_alt_vars.Poll.ID > 0 {
w.Write(topic_alt_30) w.Write(topic_alt_30)
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.Level))) w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Poll.ID)))
w.Write(topic_alt_31) w.Write(topic_alt_31)
} w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Poll.ID)))
w.Write(topic_alt_32) w.Write(topic_alt_32)
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Poll.ID))) w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
w.Write(topic_alt_33) w.Write(topic_alt_33)
if len(tmpl_topic_alt_vars.Poll.QuickOptions) != 0 { w.Write(phrases[28])
for _, item := range tmpl_topic_alt_vars.Poll.QuickOptions {
w.Write(topic_alt_34) w.Write(topic_alt_34)
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Poll.ID))) w.Write([]byte(tmpl_topic_alt_vars.Topic.Avatar))
w.Write(topic_alt_35) w.Write(topic_alt_35)
w.Write([]byte(strconv.Itoa(item.ID))) w.Write([]byte(tmpl_topic_alt_vars.Topic.UserLink))
w.Write(topic_alt_36) w.Write(topic_alt_36)
w.Write([]byte(strconv.Itoa(item.ID))) w.Write([]byte(tmpl_topic_alt_vars.Topic.CreatedByName))
w.Write(topic_alt_37) w.Write(topic_alt_37)
w.Write([]byte(strconv.Itoa(item.ID))) if tmpl_topic_alt_vars.Topic.Tag != "" {
w.Write(topic_alt_38) w.Write(topic_alt_38)
w.Write([]byte(strconv.Itoa(item.ID))) w.Write([]byte(tmpl_topic_alt_vars.Topic.Tag))
w.Write(topic_alt_39) w.Write(topic_alt_39)
w.Write([]byte(item.Value)) } else {
w.Write(topic_alt_40) w.Write(topic_alt_40)
} w.Write(phrases[29])
} w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.Level)))
w.Write(topic_alt_41) w.Write(topic_alt_41)
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Poll.ID))) }
w.Write(topic_alt_42) w.Write(topic_alt_42)
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Poll.ID))) w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Poll.ID)))
w.Write(topic_alt_43) w.Write(topic_alt_43)
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Poll.ID))) if len(tmpl_topic_alt_vars.Poll.QuickOptions) != 0 {
for _, item := range tmpl_topic_alt_vars.Poll.QuickOptions {
w.Write(topic_alt_44) w.Write(topic_alt_44)
} w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Poll.ID)))
w.Write(topic_alt_45) w.Write(topic_alt_45)
w.Write([]byte(tmpl_topic_alt_vars.Topic.Avatar)) w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topic_alt_46) w.Write(topic_alt_46)
w.Write([]byte(tmpl_topic_alt_vars.Topic.UserLink)) w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topic_alt_47) w.Write(topic_alt_47)
w.Write([]byte(tmpl_topic_alt_vars.Topic.CreatedByName)) w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topic_alt_48) w.Write(topic_alt_48)
if tmpl_topic_alt_vars.Topic.Tag != "" { w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topic_alt_49) w.Write(topic_alt_49)
w.Write([]byte(tmpl_topic_alt_vars.Topic.Tag)) w.Write([]byte(item.Value))
w.Write(topic_alt_50) w.Write(topic_alt_50)
} else {
w.Write(topic_alt_51)
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.Level)))
w.Write(topic_alt_52)
} }
}
w.Write(topic_alt_51)
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Poll.ID)))
w.Write(topic_alt_52)
w.Write(phrases[30])
w.Write(topic_alt_53) w.Write(topic_alt_53)
w.Write([]byte(tmpl_topic_alt_vars.Topic.ContentHTML)) w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Poll.ID)))
w.Write(topic_alt_54) w.Write(topic_alt_54)
w.Write([]byte(tmpl_topic_alt_vars.Topic.Content)) w.Write(phrases[31])
w.Write(topic_alt_55) w.Write(topic_alt_55)
w.Write(phrases[32])
w.Write(topic_alt_56)
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Poll.ID)))
w.Write(topic_alt_57)
}
w.Write(topic_alt_58)
w.Write(phrases[33])
w.Write(topic_alt_59)
w.Write(phrases[34])
w.Write(topic_alt_60)
w.Write([]byte(tmpl_topic_alt_vars.Topic.Avatar))
w.Write(topic_alt_61)
w.Write([]byte(tmpl_topic_alt_vars.Topic.UserLink))
w.Write(topic_alt_62)
w.Write([]byte(tmpl_topic_alt_vars.Topic.CreatedByName))
w.Write(topic_alt_63)
if tmpl_topic_alt_vars.Topic.Tag != "" {
w.Write(topic_alt_64)
w.Write([]byte(tmpl_topic_alt_vars.Topic.Tag))
w.Write(topic_alt_65)
} else {
w.Write(topic_alt_66)
w.Write(phrases[35])
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.Level)))
w.Write(topic_alt_67)
}
w.Write(topic_alt_68)
w.Write([]byte(tmpl_topic_alt_vars.Topic.ContentHTML))
w.Write(topic_alt_69)
w.Write([]byte(tmpl_topic_alt_vars.Topic.Content))
w.Write(topic_alt_70)
if tmpl_topic_alt_vars.CurrentUser.Loggedin { if tmpl_topic_alt_vars.CurrentUser.Loggedin {
if tmpl_topic_alt_vars.CurrentUser.Perms.LikeItem { if tmpl_topic_alt_vars.CurrentUser.Perms.LikeItem {
w.Write(topic_alt_56) w.Write(topic_alt_71)
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID))) w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
w.Write(topic_alt_57) w.Write(topic_alt_72)
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session)) w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
w.Write(topic_alt_58) w.Write(topic_alt_73)
w.Write(phrases[36])
w.Write(topic_alt_74)
} }
if tmpl_topic_alt_vars.CurrentUser.Perms.EditTopic { if tmpl_topic_alt_vars.CurrentUser.Perms.EditTopic {
w.Write(topic_alt_59)
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
w.Write(topic_alt_60)
}
if tmpl_topic_alt_vars.CurrentUser.Perms.DeleteTopic {
w.Write(topic_alt_61)
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
w.Write(topic_alt_62)
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
w.Write(topic_alt_63)
}
if tmpl_topic_alt_vars.CurrentUser.Perms.CloseTopic {
if tmpl_topic_alt_vars.Topic.IsClosed {
w.Write(topic_alt_64)
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
w.Write(topic_alt_65)
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
w.Write(topic_alt_66)
} else {
w.Write(topic_alt_67)
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
w.Write(topic_alt_68)
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
w.Write(topic_alt_69)
}
}
if tmpl_topic_alt_vars.CurrentUser.Perms.PinTopic {
if tmpl_topic_alt_vars.Topic.Sticky {
w.Write(topic_alt_70)
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
w.Write(topic_alt_71)
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
w.Write(topic_alt_72)
} else {
w.Write(topic_alt_73)
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
w.Write(topic_alt_74)
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
w.Write(topic_alt_75) w.Write(topic_alt_75)
} w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
}
if tmpl_topic_alt_vars.CurrentUser.Perms.ViewIPs {
w.Write(topic_alt_76) w.Write(topic_alt_76)
w.Write([]byte(tmpl_topic_alt_vars.Topic.IPAddress)) w.Write(phrases[37])
w.Write(topic_alt_77) w.Write(topic_alt_77)
} }
if tmpl_topic_alt_vars.CurrentUser.Perms.DeleteTopic {
w.Write(topic_alt_78) w.Write(topic_alt_78)
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID))) w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
w.Write(topic_alt_79) w.Write(topic_alt_79)
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session)) w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
w.Write(topic_alt_80) w.Write(topic_alt_80)
} w.Write(phrases[38])
w.Write(topic_alt_81) w.Write(topic_alt_81)
if tmpl_topic_alt_vars.Topic.LikeCount > 0 { }
if tmpl_topic_alt_vars.CurrentUser.Perms.CloseTopic {
if tmpl_topic_alt_vars.Topic.IsClosed {
w.Write(topic_alt_82) w.Write(topic_alt_82)
} w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
w.Write(topic_alt_83) w.Write(topic_alt_83)
if tmpl_topic_alt_vars.Topic.LikeCount > 0 { w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
w.Write(topic_alt_84) w.Write(topic_alt_84)
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.LikeCount))) w.Write(phrases[39])
w.Write(topic_alt_85) w.Write(topic_alt_85)
}
w.Write(topic_alt_86)
w.Write([]byte(tmpl_topic_alt_vars.Topic.RelativeCreatedAt))
w.Write(topic_alt_87)
if tmpl_topic_alt_vars.CurrentUser.Perms.ViewIPs {
w.Write(topic_alt_88)
w.Write([]byte(tmpl_topic_alt_vars.Topic.IPAddress))
w.Write(topic_alt_89)
w.Write([]byte(tmpl_topic_alt_vars.Topic.IPAddress))
w.Write(topic_alt_90)
}
w.Write(topic_alt_91)
if len(tmpl_topic_alt_vars.ItemList) != 0 {
for _, item := range tmpl_topic_alt_vars.ItemList {
w.Write(topic_alt_92)
if item.ActionType != "" {
w.Write(topic_alt_93)
}
w.Write(topic_alt_94)
w.Write([]byte(item.Avatar))
w.Write(topic_alt_95)
w.Write([]byte(item.UserLink))
w.Write(topic_alt_96)
w.Write([]byte(item.CreatedByName))
w.Write(topic_alt_97)
if item.Tag != "" {
w.Write(topic_alt_98)
w.Write([]byte(item.Tag))
w.Write(topic_alt_99)
} else { } else {
w.Write(topic_alt_86)
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
w.Write(topic_alt_87)
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
w.Write(topic_alt_88)
w.Write(phrases[40])
w.Write(topic_alt_89)
}
}
if tmpl_topic_alt_vars.CurrentUser.Perms.PinTopic {
if tmpl_topic_alt_vars.Topic.Sticky {
w.Write(topic_alt_90)
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
w.Write(topic_alt_91)
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
w.Write(topic_alt_92)
w.Write(phrases[41])
w.Write(topic_alt_93)
} else {
w.Write(topic_alt_94)
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
w.Write(topic_alt_95)
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
w.Write(topic_alt_96)
w.Write(phrases[42])
w.Write(topic_alt_97)
}
}
if tmpl_topic_alt_vars.CurrentUser.Perms.ViewIPs {
w.Write(topic_alt_98)
w.Write([]byte(tmpl_topic_alt_vars.Topic.IPAddress))
w.Write(topic_alt_99)
w.Write(phrases[43])
w.Write(topic_alt_100) w.Write(topic_alt_100)
w.Write([]byte(strconv.Itoa(item.Level))) w.Write(phrases[44])
w.Write(topic_alt_101) w.Write(topic_alt_101)
} }
w.Write(topic_alt_102) w.Write(topic_alt_102)
if item.ActionType != "" { w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
w.Write(topic_alt_103) w.Write(topic_alt_103)
} w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
w.Write(topic_alt_104) w.Write(topic_alt_104)
if item.ActionType != "" { w.Write(phrases[45])
w.Write(topic_alt_105) w.Write(topic_alt_105)
w.Write([]byte(item.ActionIcon)) }
w.Write(topic_alt_106) w.Write(topic_alt_106)
w.Write([]byte(item.ActionType)) if tmpl_topic_alt_vars.Topic.LikeCount > 0 {
w.Write(topic_alt_107) w.Write(topic_alt_107)
} else { }
w.Write(topic_alt_108) w.Write(topic_alt_108)
w.Write([]byte(item.ContentHtml)) if tmpl_topic_alt_vars.Topic.LikeCount > 0 {
w.Write(topic_alt_109) w.Write(topic_alt_109)
if tmpl_topic_alt_vars.CurrentUser.Loggedin { w.Write(phrases[46])
if tmpl_topic_alt_vars.CurrentUser.Perms.LikeItem {
w.Write(topic_alt_110) w.Write(topic_alt_110)
w.Write([]byte(strconv.Itoa(item.ID))) w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.LikeCount)))
w.Write(topic_alt_111) w.Write(topic_alt_111)
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session)) }
w.Write(topic_alt_112) w.Write(topic_alt_112)
} w.Write([]byte(tmpl_topic_alt_vars.Topic.RelativeCreatedAt))
if tmpl_topic_alt_vars.CurrentUser.Perms.EditReply {
w.Write(topic_alt_113) w.Write(topic_alt_113)
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topic_alt_114)
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
w.Write(topic_alt_115)
}
if tmpl_topic_alt_vars.CurrentUser.Perms.DeleteReply {
w.Write(topic_alt_116)
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topic_alt_117)
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
w.Write(topic_alt_118)
}
if tmpl_topic_alt_vars.CurrentUser.Perms.ViewIPs { if tmpl_topic_alt_vars.CurrentUser.Perms.ViewIPs {
w.Write(topic_alt_114)
w.Write([]byte(tmpl_topic_alt_vars.Topic.IPAddress))
w.Write(topic_alt_115)
w.Write(phrases[47])
w.Write(topic_alt_116)
w.Write([]byte(tmpl_topic_alt_vars.Topic.IPAddress))
w.Write(topic_alt_117)
}
w.Write(topic_alt_118)
if len(tmpl_topic_alt_vars.ItemList) != 0 {
for _, item := range tmpl_topic_alt_vars.ItemList {
w.Write(topic_alt_119) w.Write(topic_alt_119)
w.Write([]byte(item.IPAddress)) if item.ActionType != "" {
w.Write(topic_alt_120) w.Write(topic_alt_120)
} }
w.Write(topic_alt_121) w.Write(topic_alt_121)
w.Write([]byte(strconv.Itoa(item.ID))) w.Write(phrases[48])
w.Write(topic_alt_122) w.Write(topic_alt_122)
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session)) w.Write([]byte(item.Avatar))
w.Write(topic_alt_123) w.Write(topic_alt_123)
} w.Write([]byte(item.UserLink))
w.Write(topic_alt_124) w.Write(topic_alt_124)
if item.LikeCount > 0 { w.Write([]byte(item.CreatedByName))
w.Write(topic_alt_125) w.Write(topic_alt_125)
} if item.Tag != "" {
w.Write(topic_alt_126) w.Write(topic_alt_126)
if item.LikeCount > 0 { w.Write([]byte(item.Tag))
w.Write(topic_alt_127) w.Write(topic_alt_127)
w.Write([]byte(strconv.Itoa(item.LikeCount)))
w.Write(topic_alt_128)
}
w.Write(topic_alt_129)
w.Write([]byte(item.RelativeCreatedAt))
w.Write(topic_alt_130)
if tmpl_topic_alt_vars.CurrentUser.Perms.ViewIPs {
w.Write(topic_alt_131)
w.Write([]byte(item.IPAddress))
w.Write(topic_alt_132)
w.Write([]byte(item.IPAddress))
w.Write(topic_alt_133)
}
w.Write(topic_alt_134)
}
w.Write(topic_alt_135)
}
}
w.Write(topic_alt_136)
if tmpl_topic_alt_vars.CurrentUser.Perms.CreateReply {
w.Write(topic_alt_137)
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Avatar))
w.Write(topic_alt_138)
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Link))
w.Write(topic_alt_139)
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Name))
w.Write(topic_alt_140)
if tmpl_topic_alt_vars.CurrentUser.Tag != "" {
w.Write(topic_alt_141)
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Tag))
w.Write(topic_alt_142)
} else { } else {
w.Write(topic_alt_143) w.Write(topic_alt_128)
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.CurrentUser.Level))) w.Write(phrases[49])
w.Write(topic_alt_144) w.Write([]byte(strconv.Itoa(item.Level)))
w.Write(topic_alt_129)
} }
w.Write(topic_alt_145) w.Write(topic_alt_130)
if item.ActionType != "" {
w.Write(topic_alt_131)
}
w.Write(topic_alt_132)
if item.ActionType != "" {
w.Write(topic_alt_133)
w.Write([]byte(item.ActionIcon))
w.Write(topic_alt_134)
w.Write([]byte(item.ActionType))
w.Write(topic_alt_135)
} else {
w.Write(topic_alt_136)
w.Write([]byte(item.ContentHtml))
w.Write(topic_alt_137)
if tmpl_topic_alt_vars.CurrentUser.Loggedin {
if tmpl_topic_alt_vars.CurrentUser.Perms.LikeItem {
w.Write(topic_alt_138)
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topic_alt_139)
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session)) w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
w.Write(topic_alt_146) w.Write(topic_alt_140)
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID))) w.Write(phrases[50])
w.Write(topic_alt_147) w.Write(topic_alt_141)
if tmpl_topic_alt_vars.CurrentUser.Perms.UploadFiles {
w.Write(topic_alt_148)
} }
if tmpl_topic_alt_vars.CurrentUser.Perms.EditReply {
w.Write(topic_alt_142)
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topic_alt_143)
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
w.Write(topic_alt_144)
w.Write(phrases[51])
w.Write(topic_alt_145)
}
if tmpl_topic_alt_vars.CurrentUser.Perms.DeleteReply {
w.Write(topic_alt_146)
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topic_alt_147)
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
w.Write(topic_alt_148)
w.Write(phrases[52])
w.Write(topic_alt_149) w.Write(topic_alt_149)
} }
if tmpl_topic_alt_vars.CurrentUser.Perms.ViewIPs {
w.Write(topic_alt_150) w.Write(topic_alt_150)
w.Write([]byte(item.IPAddress))
w.Write(topic_alt_151)
w.Write(phrases[53])
w.Write(topic_alt_152)
w.Write(phrases[54])
w.Write(topic_alt_153)
}
w.Write(topic_alt_154)
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topic_alt_155)
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
w.Write(topic_alt_156)
w.Write(phrases[55])
w.Write(topic_alt_157)
}
w.Write(topic_alt_158)
if item.LikeCount > 0 {
w.Write(topic_alt_159)
}
w.Write(topic_alt_160)
if item.LikeCount > 0 {
w.Write(topic_alt_161)
w.Write(phrases[56])
w.Write(topic_alt_162)
w.Write([]byte(strconv.Itoa(item.LikeCount)))
w.Write(topic_alt_163)
}
w.Write(topic_alt_164)
w.Write([]byte(item.RelativeCreatedAt))
w.Write(topic_alt_165)
if tmpl_topic_alt_vars.CurrentUser.Perms.ViewIPs {
w.Write(topic_alt_166)
w.Write([]byte(item.IPAddress))
w.Write(topic_alt_167)
w.Write([]byte(item.IPAddress))
w.Write(topic_alt_168)
}
w.Write(topic_alt_169)
}
w.Write(topic_alt_170)
}
}
w.Write(topic_alt_171)
if tmpl_topic_alt_vars.CurrentUser.Perms.CreateReply {
w.Write(topic_alt_172)
w.Write(phrases[57])
w.Write(topic_alt_173)
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Avatar))
w.Write(topic_alt_174)
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Link))
w.Write(topic_alt_175)
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Name))
w.Write(topic_alt_176)
if tmpl_topic_alt_vars.CurrentUser.Tag != "" {
w.Write(topic_alt_177)
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Tag))
w.Write(topic_alt_178)
} else {
w.Write(topic_alt_179)
w.Write(phrases[58])
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.CurrentUser.Level)))
w.Write(topic_alt_180)
}
w.Write(topic_alt_181)
w.Write(phrases[59])
w.Write(topic_alt_182)
w.Write([]byte(tmpl_topic_alt_vars.CurrentUser.Session))
w.Write(topic_alt_183)
w.Write([]byte(strconv.Itoa(tmpl_topic_alt_vars.Topic.ID)))
w.Write(topic_alt_184)
w.Write(phrases[60])
w.Write(topic_alt_185)
w.Write(phrases[61])
w.Write(topic_alt_186)
w.Write(phrases[62])
w.Write(topic_alt_187)
w.Write(phrases[63])
w.Write(topic_alt_188)
if tmpl_topic_alt_vars.CurrentUser.Perms.UploadFiles {
w.Write(topic_alt_189)
w.Write(phrases[64])
w.Write(topic_alt_190)
}
w.Write(topic_alt_191)
}
w.Write(topic_alt_192)
w.Write(footer_0) w.Write(footer_0)
w.Write([]byte(common.BuildWidget("footer",tmpl_topic_alt_vars.Header))) w.Write([]byte(common.BuildWidget("footer",tmpl_topic_alt_vars.Header)))
w.Write(footer_1) w.Write(footer_1)
w.Write(phrases[65])
w.Write(footer_2)
w.Write(phrases[66])
w.Write(footer_3)
w.Write(phrases[67])
w.Write(footer_4)
if len(tmpl_topic_alt_vars.Header.Themes) != 0 { if len(tmpl_topic_alt_vars.Header.Themes) != 0 {
for _, item := range tmpl_topic_alt_vars.Header.Themes { for _, item := range tmpl_topic_alt_vars.Header.Themes {
if !item.HideFromThemes { if !item.HideFromThemes {
w.Write(footer_2)
w.Write([]byte(item.Name))
w.Write(footer_3)
if tmpl_topic_alt_vars.Header.Theme.Name == item.Name {
w.Write(footer_4)
}
w.Write(footer_5) w.Write(footer_5)
w.Write([]byte(item.FriendlyName)) w.Write([]byte(item.Name))
w.Write(footer_6) w.Write(footer_6)
} if tmpl_topic_alt_vars.Header.Theme.Name == item.Name {
}
}
w.Write(footer_7) w.Write(footer_7)
w.Write([]byte(common.BuildWidget("rightSidebar",tmpl_topic_alt_vars.Header))) }
w.Write(footer_8) w.Write(footer_8)
w.Write([]byte(item.FriendlyName))
w.Write(footer_9)
}
}
}
w.Write(footer_10)
w.Write([]byte(common.BuildWidget("rightSidebar",tmpl_topic_alt_vars.Header)))
w.Write(footer_11)
return nil return nil
} }

View File

@ -15,10 +15,68 @@ func init() {
common.Ctemplates = append(common.Ctemplates,"topics") common.Ctemplates = append(common.Ctemplates,"topics")
common.TmplPtrMap["topics"] = &common.Template_topics_handle common.TmplPtrMap["topics"] = &common.Template_topics_handle
common.TmplPtrMap["o_topics"] = Template_topics common.TmplPtrMap["o_topics"] = Template_topics
topics_Tmpl_Phrase_ID = common.RegisterTmplPhraseNames([]string{
"menu_forums_aria",
"menu_forums_tooltip",
"menu_topics_aria",
"menu_topics_tooltip",
"menu_alert_counter_aria",
"menu_alert_list_aria",
"menu_account_aria",
"menu_account_tooltip",
"menu_profile_aria",
"menu_profile_tooltip",
"menu_panel_aria",
"menu_panel_tooltip",
"menu_logout_aria",
"menu_logout_tooltip",
"menu_register_aria",
"menu_register_tooltip",
"menu_login_aria",
"menu_login_tooltip",
"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 // nolint
func Template_topics(tmpl_topics_vars common.TopicsPage, w http.ResponseWriter) error { func Template_topics(tmpl_topics_vars common.TopicsPage, w http.ResponseWriter) error {
var phrases = common.GetTmplPhrasesBytes(topics_Tmpl_Phrase_ID)
w.Write(header_0) w.Write(header_0)
w.Write([]byte(tmpl_topics_vars.Title)) w.Write([]byte(tmpl_topics_vars.Title))
w.Write(header_1) w.Write(header_1)
@ -60,16 +118,54 @@ w.Write(menu_0)
w.Write(menu_1) w.Write(menu_1)
w.Write([]byte(tmpl_topics_vars.Header.Site.ShortName)) w.Write([]byte(tmpl_topics_vars.Header.Site.ShortName))
w.Write(menu_2) w.Write(menu_2)
if tmpl_topics_vars.CurrentUser.Loggedin { w.Write(phrases[0])
w.Write(menu_3) w.Write(menu_3)
w.Write([]byte(tmpl_topics_vars.CurrentUser.Link)) w.Write(phrases[1])
w.Write(menu_4) w.Write(menu_4)
w.Write([]byte(tmpl_topics_vars.CurrentUser.Session)) w.Write(phrases[2])
w.Write(menu_5) w.Write(menu_5)
} else { w.Write(phrases[3])
w.Write(menu_6) w.Write(menu_6)
} w.Write(phrases[4])
w.Write(menu_7) w.Write(menu_7)
w.Write(phrases[5])
w.Write(menu_8)
if tmpl_topics_vars.CurrentUser.Loggedin {
w.Write(menu_9)
w.Write(phrases[6])
w.Write(menu_10)
w.Write(phrases[7])
w.Write(menu_11)
w.Write([]byte(tmpl_topics_vars.CurrentUser.Link))
w.Write(menu_12)
w.Write(phrases[8])
w.Write(menu_13)
w.Write(phrases[9])
w.Write(menu_14)
w.Write(phrases[10])
w.Write(menu_15)
w.Write(phrases[11])
w.Write(menu_16)
w.Write([]byte(tmpl_topics_vars.CurrentUser.Session))
w.Write(menu_17)
w.Write(phrases[12])
w.Write(menu_18)
w.Write(phrases[13])
w.Write(menu_19)
} else {
w.Write(menu_20)
w.Write(phrases[14])
w.Write(menu_21)
w.Write(phrases[15])
w.Write(menu_22)
w.Write(phrases[16])
w.Write(menu_23)
w.Write(phrases[17])
w.Write(menu_24)
}
w.Write(menu_25)
w.Write(phrases[18])
w.Write(menu_26)
w.Write(header_17) w.Write(header_17)
if tmpl_topics_vars.Header.Widgets.RightSidebar != "" { if tmpl_topics_vars.Header.Widgets.RightSidebar != "" {
w.Write(header_18) w.Write(header_18)
@ -82,192 +178,264 @@ w.Write([]byte(item))
w.Write(header_21) w.Write(header_21)
} }
} }
w.Write(header_22)
w.Write(topics_0) w.Write(topics_0)
if tmpl_topics_vars.CurrentUser.ID != 0 { if tmpl_topics_vars.CurrentUser.ID != 0 {
w.Write(topics_1) w.Write(topics_1)
} }
w.Write(topics_2) w.Write(topics_2)
if tmpl_topics_vars.CurrentUser.ID != 0 { w.Write(phrases[19])
w.Write(topics_3) w.Write(topics_3)
if len(tmpl_topics_vars.ForumList) != 0 {
w.Write(topics_4)
w.Write(topics_5)
} else {
w.Write(topics_6)
}
w.Write(topics_7)
}
w.Write(topics_8)
if tmpl_topics_vars.CurrentUser.ID != 0 { if tmpl_topics_vars.CurrentUser.ID != 0 {
w.Write(topics_4)
if len(tmpl_topics_vars.ForumList) != 0 {
w.Write(topics_5)
w.Write(phrases[20])
w.Write(topics_6)
w.Write(phrases[21])
w.Write(topics_7)
w.Write(topics_8)
w.Write(phrases[22])
w.Write(topics_9) w.Write(topics_9)
if len(tmpl_topics_vars.ForumList) != 0 { w.Write(phrases[23])
w.Write(topics_10) w.Write(topics_10)
w.Write([]byte(tmpl_topics_vars.CurrentUser.Session)) } else {
w.Write(topics_11) w.Write(topics_11)
if len(tmpl_topics_vars.ForumList) != 0 { w.Write(phrases[24])
for _, item := range tmpl_topics_vars.ForumList {
w.Write(topics_12) w.Write(topics_12)
w.Write([]byte(strconv.Itoa(item.ID))) w.Write(phrases[25])
w.Write(topics_13) w.Write(topics_13)
w.Write([]byte(strconv.Itoa(item.ID))) }
w.Write(topics_14) w.Write(topics_14)
w.Write([]byte(item.Name)) }
w.Write(topics_15) w.Write(topics_15)
} if tmpl_topics_vars.CurrentUser.ID != 0 {
}
w.Write(topics_16) w.Write(topics_16)
w.Write([]byte(tmpl_topics_vars.CurrentUser.Session)) w.Write(phrases[26])
w.Write(topics_17) w.Write(topics_17)
w.Write([]byte(tmpl_topics_vars.CurrentUser.Avatar)) w.Write(phrases[27])
w.Write(topics_18) w.Write(topics_18)
w.Write(phrases[28])
w.Write(topics_19)
w.Write(phrases[29])
w.Write(topics_20)
w.Write(phrases[30])
w.Write(topics_21)
if len(tmpl_topics_vars.ForumList) != 0 {
w.Write(topics_22)
w.Write([]byte(tmpl_topics_vars.CurrentUser.Session))
w.Write(topics_23)
w.Write(phrases[31])
w.Write(topics_24)
if len(tmpl_topics_vars.ForumList) != 0 { if len(tmpl_topics_vars.ForumList) != 0 {
for _, item := range tmpl_topics_vars.ForumList { for _, item := range tmpl_topics_vars.ForumList {
w.Write(topics_19)
if item.ID == tmpl_topics_vars.DefaultForum {
w.Write(topics_20)
}
w.Write(topics_21)
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topics_22)
w.Write([]byte(item.Name))
w.Write(topics_23)
}
}
w.Write(topics_24)
if tmpl_topics_vars.CurrentUser.Perms.UploadFiles {
w.Write(topics_25) w.Write(topics_25)
} w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topics_26) w.Write(topics_26)
} w.Write([]byte(strconv.Itoa(item.ID)))
}
w.Write(topics_27) w.Write(topics_27)
w.Write([]byte(item.Name))
w.Write(topics_28)
}
}
w.Write(topics_29)
w.Write(phrases[32])
w.Write(topics_30)
w.Write(phrases[33])
w.Write(topics_31)
w.Write([]byte(tmpl_topics_vars.CurrentUser.Session))
w.Write(topics_32)
w.Write([]byte(tmpl_topics_vars.CurrentUser.Avatar))
w.Write(topics_33)
w.Write(phrases[34])
w.Write(topics_34)
w.Write(phrases[35])
w.Write(topics_35)
if len(tmpl_topics_vars.ForumList) != 0 {
for _, item := range tmpl_topics_vars.ForumList {
w.Write(topics_36)
if item.ID == tmpl_topics_vars.DefaultForum {
w.Write(topics_37)
}
w.Write(topics_38)
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topics_39)
w.Write([]byte(item.Name))
w.Write(topics_40)
}
}
w.Write(topics_41)
w.Write(phrases[36])
w.Write(topics_42)
w.Write(phrases[37])
w.Write(topics_43)
w.Write(phrases[38])
w.Write(topics_44)
w.Write(phrases[39])
w.Write(topics_45)
w.Write(phrases[40])
w.Write(topics_46)
if tmpl_topics_vars.CurrentUser.Perms.UploadFiles {
w.Write(topics_47)
w.Write(phrases[41])
w.Write(topics_48)
}
w.Write(topics_49)
w.Write(phrases[42])
w.Write(topics_50)
}
}
w.Write(topics_51)
w.Write(phrases[43])
w.Write(topics_52)
if len(tmpl_topics_vars.TopicList) != 0 { if len(tmpl_topics_vars.TopicList) != 0 {
for _, item := range tmpl_topics_vars.TopicList { for _, item := range tmpl_topics_vars.TopicList {
w.Write(topics_28)
w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topics_29)
if item.Sticky {
w.Write(topics_30)
} else {
if item.IsClosed {
w.Write(topics_31)
}
}
w.Write(topics_32)
w.Write([]byte(item.Creator.Link))
w.Write(topics_33)
w.Write([]byte(item.Creator.Avatar))
w.Write(topics_34)
w.Write([]byte(item.Creator.Name))
w.Write(topics_35)
w.Write([]byte(item.Creator.Name))
w.Write(topics_36)
w.Write([]byte(item.Link))
w.Write(topics_37)
w.Write([]byte(item.Title))
w.Write(topics_38)
if item.ForumName != "" {
w.Write(topics_39)
w.Write([]byte(item.ForumLink))
w.Write(topics_40)
w.Write([]byte(item.ForumName))
w.Write(topics_41)
}
w.Write(topics_42)
w.Write([]byte(item.Creator.Link))
w.Write(topics_43)
w.Write([]byte(item.Creator.Name))
w.Write(topics_44)
if item.IsClosed {
w.Write(topics_45)
}
if item.Sticky {
w.Write(topics_46)
}
w.Write(topics_47)
w.Write([]byte(strconv.Itoa(item.PostCount)))
w.Write(topics_48)
w.Write([]byte(strconv.Itoa(item.LikeCount)))
w.Write(topics_49)
if item.Sticky {
w.Write(topics_50)
} else {
if item.IsClosed {
w.Write(topics_51)
}
}
w.Write(topics_52)
w.Write([]byte(item.LastUser.Link))
w.Write(topics_53) w.Write(topics_53)
w.Write([]byte(item.LastUser.Avatar)) w.Write([]byte(strconv.Itoa(item.ID)))
w.Write(topics_54) w.Write(topics_54)
w.Write([]byte(item.LastUser.Name)) if item.Sticky {
w.Write(topics_55) w.Write(topics_55)
w.Write([]byte(item.LastUser.Name))
w.Write(topics_56)
w.Write([]byte(item.LastUser.Link))
w.Write(topics_57)
w.Write([]byte(item.LastUser.Name))
w.Write(topics_58)
w.Write([]byte(item.RelativeLastReplyAt))
w.Write(topics_59)
}
} else { } else {
if item.IsClosed {
w.Write(topics_56)
}
}
w.Write(topics_57)
w.Write([]byte(item.Creator.Link))
w.Write(topics_58)
w.Write([]byte(item.Creator.Avatar))
w.Write(topics_59)
w.Write([]byte(item.Creator.Name))
w.Write(topics_60) w.Write(topics_60)
if tmpl_topics_vars.CurrentUser.Perms.CreateTopic { w.Write([]byte(item.Creator.Name))
w.Write(topics_61) w.Write(topics_61)
} w.Write([]byte(item.Link))
w.Write(topics_62) w.Write(topics_62)
} w.Write([]byte(item.Title))
w.Write(topics_63) w.Write(topics_63)
if tmpl_topics_vars.LastPage > 1 { if item.ForumName != "" {
w.Write(topics_64) w.Write(topics_64)
if tmpl_topics_vars.Page > 1 { w.Write([]byte(item.ForumLink))
w.Write(topics_65) w.Write(topics_65)
w.Write([]byte(strconv.Itoa(tmpl_topics_vars.Page - 1))) w.Write([]byte(item.ForumName))
w.Write(topics_66) w.Write(topics_66)
w.Write([]byte(strconv.Itoa(tmpl_topics_vars.Page - 1))) }
w.Write(topics_67) w.Write(topics_67)
} w.Write([]byte(item.Creator.Link))
if len(tmpl_topics_vars.PageList) != 0 {
for _, item := range tmpl_topics_vars.PageList {
w.Write(topics_68) w.Write(topics_68)
w.Write([]byte(strconv.Itoa(item))) w.Write([]byte(item.Creator.Name))
w.Write(topics_69) w.Write(topics_69)
w.Write([]byte(strconv.Itoa(item))) if item.IsClosed {
w.Write(topics_70) w.Write(topics_70)
} w.Write(phrases[44])
}
if tmpl_topics_vars.LastPage != tmpl_topics_vars.Page {
w.Write(topics_71) w.Write(topics_71)
w.Write([]byte(strconv.Itoa(tmpl_topics_vars.Page + 1))) }
if item.Sticky {
w.Write(topics_72) w.Write(topics_72)
w.Write([]byte(strconv.Itoa(tmpl_topics_vars.Page + 1))) w.Write(phrases[45])
w.Write(topics_73) w.Write(topics_73)
} }
w.Write(topics_74) w.Write(topics_74)
} w.Write([]byte(strconv.Itoa(item.PostCount)))
w.Write(topics_75) w.Write(topics_75)
w.Write([]byte(strconv.Itoa(item.LikeCount)))
w.Write(topics_76)
if item.Sticky {
w.Write(topics_77)
} else {
if item.IsClosed {
w.Write(topics_78)
}
}
w.Write(topics_79)
w.Write([]byte(item.LastUser.Link))
w.Write(topics_80)
w.Write([]byte(item.LastUser.Avatar))
w.Write(topics_81)
w.Write([]byte(item.LastUser.Name))
w.Write(topics_82)
w.Write([]byte(item.LastUser.Name))
w.Write(topics_83)
w.Write([]byte(item.LastUser.Link))
w.Write(topics_84)
w.Write([]byte(item.LastUser.Name))
w.Write(topics_85)
w.Write([]byte(item.RelativeLastReplyAt))
w.Write(topics_86)
}
} else {
w.Write(topics_87)
w.Write(phrases[46])
if tmpl_topics_vars.CurrentUser.Perms.CreateTopic {
w.Write(topics_88)
w.Write(phrases[47])
w.Write(topics_89)
}
w.Write(topics_90)
}
w.Write(topics_91)
if tmpl_topics_vars.LastPage > 1 {
w.Write(paginator_0)
if tmpl_topics_vars.Page > 1 {
w.Write(paginator_1)
w.Write([]byte(strconv.Itoa(tmpl_topics_vars.Page - 1)))
w.Write(paginator_2)
w.Write(phrases[48])
w.Write(paginator_3)
w.Write(phrases[49])
w.Write(paginator_4)
w.Write([]byte(strconv.Itoa(tmpl_topics_vars.Page - 1)))
w.Write(paginator_5)
}
if len(tmpl_topics_vars.PageList) != 0 {
for _, item := range tmpl_topics_vars.PageList {
w.Write(paginator_6)
w.Write([]byte(strconv.Itoa(item)))
w.Write(paginator_7)
w.Write([]byte(strconv.Itoa(item)))
w.Write(paginator_8)
}
}
if tmpl_topics_vars.LastPage != tmpl_topics_vars.Page {
w.Write(paginator_9)
w.Write([]byte(strconv.Itoa(tmpl_topics_vars.Page + 1)))
w.Write(paginator_10)
w.Write([]byte(strconv.Itoa(tmpl_topics_vars.Page + 1)))
w.Write(paginator_11)
w.Write(phrases[50])
w.Write(paginator_12)
w.Write(phrases[51])
w.Write(paginator_13)
}
w.Write(paginator_14)
}
w.Write(topics_92)
w.Write(footer_0) w.Write(footer_0)
w.Write([]byte(common.BuildWidget("footer",tmpl_topics_vars.Header))) w.Write([]byte(common.BuildWidget("footer",tmpl_topics_vars.Header)))
w.Write(footer_1) w.Write(footer_1)
w.Write(phrases[52])
w.Write(footer_2)
w.Write(phrases[53])
w.Write(footer_3)
w.Write(phrases[54])
w.Write(footer_4)
if len(tmpl_topics_vars.Header.Themes) != 0 { if len(tmpl_topics_vars.Header.Themes) != 0 {
for _, item := range tmpl_topics_vars.Header.Themes { for _, item := range tmpl_topics_vars.Header.Themes {
if !item.HideFromThemes { if !item.HideFromThemes {
w.Write(footer_2)
w.Write([]byte(item.Name))
w.Write(footer_3)
if tmpl_topics_vars.Header.Theme.Name == item.Name {
w.Write(footer_4)
}
w.Write(footer_5) w.Write(footer_5)
w.Write([]byte(item.FriendlyName)) w.Write([]byte(item.Name))
w.Write(footer_6) w.Write(footer_6)
} if tmpl_topics_vars.Header.Theme.Name == item.Name {
}
}
w.Write(footer_7) w.Write(footer_7)
w.Write([]byte(common.BuildWidget("rightSidebar",tmpl_topics_vars.Header))) }
w.Write(footer_8) w.Write(footer_8)
w.Write([]byte(item.FriendlyName))
w.Write(footer_9)
}
}
}
w.Write(footer_10)
w.Write([]byte(common.BuildWidget("rightSidebar",tmpl_topics_vars.Header)))
w.Write(footer_11)
return nil return nil
} }

View File

@ -1,15 +1,15 @@
<nav class="colstack_left"> <nav class="colstack_left">
<div class="colstack_item colstack_head rowhead"> <div class="colstack_item colstack_head rowhead">
<div class="rowitem"> <div class="rowitem">
<a href="/user/edit/critical/"><h1>My Account</h1></a> <a href="/user/edit/critical/"><h1>{{lang "account_menu_head"}}</h1></a>
</div> </div>
</div> </div>
<div class="colstack_item rowmenu"> <div class="colstack_item rowmenu">
<div class="rowitem passive"><a href="/user/edit/avatar/">Avatar</a></div> <div class="rowitem passive"><a href="/user/edit/avatar/">{{lang "account_menu_avatar"}}</a></div>
<div class="rowitem passive"><a href="/user/edit/username/">Username</a></div> <div class="rowitem passive"><a href="/user/edit/username/">{{lang "account_menu_username"}}</a></div>
<div class="rowitem passive"><a href="/user/edit/critical/">Password</a></div> <div class="rowitem passive"><a href="/user/edit/critical/">{{lang "account_menu_password"}}</a></div>
<div class="rowitem passive"><a href="/user/edit/email/">Email</a></div> <div class="rowitem passive"><a href="/user/edit/email/">{{lang "account_menu_email"}}</a></div>
<div class="rowitem passive"><a href="/user/edit/notifications">Notifications</a></div> <div class="rowitem passive"><a href="/user/edit/notifications">{{lang "account_menu_notifications"}}</a></div>
{{/** TODO: Add an alerts page with pagination to go through alerts which either don't fit in the alerts drop-down or which have already been dismissed. Bear in mind though that dismissed alerts older than two weeks might be purged to save space and to speed up the database **/}} {{/** TODO: Add an alerts page with pagination to go through alerts which either don't fit in the alerts drop-down or which have already been dismissed. Bear in mind though that dismissed alerts older than two weeks might be purged to save space and to speed up the database **/}}
</div> </div>
</nav> </nav>

View File

@ -3,24 +3,24 @@
{{template "account_menu.html" . }} {{template "account_menu.html" . }}
<main class="colstack_right"> <main class="colstack_right">
<div class="colstack_item colstack_head rowhead"> <div class="colstack_item colstack_head rowhead">
<div class="rowitem"><h1>Edit Password</h1></div> <div class="rowitem"><h1>{{lang "account_password_head"}}</h1></div>
</div> </div>
<div class="colstack_item the_form"> <div class="colstack_item the_form">
<form action="/user/edit/critical/submit/" method="post"> <form action="/user/edit/critical/submit/" method="post">
<div class="formrow real_first_child"> <div class="formrow real_first_child">
<div class="formitem formlabel"><a>Current Password</a></div> <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="*****" required /></div>
</div> </div>
<div class="formrow"> <div class="formrow">
<div class="formitem formlabel"><a>New Password</a></div> <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="*****" required /></div>
</div> </div>
<div class="formrow"> <div class="formrow">
<div class="formitem formlabel"><a>Confirm Password</a></div> <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="*****" required /></div>
</div> </div>
<div class="formrow"> <div class="formrow">
<div class="formitem"><button name="account-button" class="formbutton form_middle_button">Update</button></div> <div class="formitem"><button name="account-button" class="formbutton form_middle_button">{{lang "account_password_update_button"}}</button></div>
</div> </div>
</form> </form>
</div> </div>

View File

@ -3,7 +3,7 @@
{{template "account_menu.html" . }} {{template "account_menu.html" . }}
<main class="colstack_right"> <main class="colstack_right">
<div class="colstack_item colstack_head rowhead"> <div class="colstack_item colstack_head rowhead">
<div class="rowitem"><h1>Edit Avatar</h1></div> <div class="rowitem"><h1>{{lang "account_avatar_head"}}</h1></div>
</div> </div>
<div class="colstack_item avatar_box"> <div class="colstack_item avatar_box">
<div class="rowitem"><img src="{{.CurrentUser.Avatar}}" height="128px" max-width="128px" /></div> <div class="rowitem"><img src="{{.CurrentUser.Avatar}}" height="128px" max-width="128px" /></div>
@ -11,11 +11,11 @@
<div class="colstack_item the_form"> <div class="colstack_item the_form">
<form action="/user/edit/avatar/submit/" method="post" enctype="multipart/form-data"> <form action="/user/edit/avatar/submit/" method="post" enctype="multipart/form-data">
<div class="formrow real_first_child"> <div class="formrow real_first_child">
<div class="formitem formlabel"><a>Upload Avatar</a></div> <div class="formitem formlabel"><a>{{lang "account_avatar_upload_label"}}</a></div>
<div class="formitem"><input name="account-avatar" type="file" required /></div> <div class="formitem"><input name="account-avatar" type="file" required /></div>
</div> </div>
<div class="formrow"> <div class="formrow">
<div class="formitem"><button name="account-button" class="formbutton">Update</button></div> <div class="formitem"><button name="account-button" class="formbutton">{{lang "account_avatar_update_button"}}</button></div>
</div> </div>
</form> </form>
</div> </div>

View File

@ -3,7 +3,7 @@
{{template "account_menu.html" . }} {{template "account_menu.html" . }}
<main class="colstack_right"> <main class="colstack_right">
<div class="colstack_item colstack_head rowhead"> <div class="colstack_item colstack_head rowhead">
<div class="rowitem"><h1>Emails</h1></div> <div class="rowitem"><h1>{{lang "account_email_head"}}</h1></div>
</div> </div>
<div class="colstack_item rowlist"> <div class="colstack_item rowlist">
<!-- TODO: Do we need this inline CSS? --> <!-- TODO: Do we need this inline CSS? -->
@ -11,8 +11,8 @@
<div class="rowitem" style="font-weight: normal;"> <div class="rowitem" style="font-weight: normal;">
<a style="text-transform: none;">{{.Email}}</a> <a style="text-transform: none;">{{.Email}}</a>
<span style="float: right" class="to_right"> <span style="float: right" class="to_right">
<span class="username">{{if .Primary}}Primary{{else}}Secondary{{end}}</span> <span class="username">{{if .Primary}}{{lang "account_email_primary"}}{{else}}{{lang "account_email_secondary"}}{{end}}</span>
{{if .Validated}}<span class="username" style="color: green;">Verified</span>{{else}}<a class="username" style="color: crimson;">Resend Verification Email</a>{{end}} {{if .Validated}}<span class="username" style="color: green;">{{lang "account_email_verified"}}</span>{{else}}<a class="username" style="color: crimson;">{{lang "account_email_resend_email"}}</a>{{end}}
</span> </span>
</div> </div>
{{end}} {{end}}

View File

@ -3,20 +3,20 @@
{{template "account_menu.html" . }} {{template "account_menu.html" . }}
<main class="colstack_right"> <main class="colstack_right">
<div class="colstack_item colstack_head rowhead"> <div class="colstack_item colstack_head rowhead">
<div class="rowitem"><h1>Edit Username</h1></div> <div class="rowitem"><h1>{{lang "account_username_head"}}</h1></div>
</div> </div>
<div class="colstack_item the_form"> <div class="colstack_item the_form">
<form action="/user/edit/username/submit/" method="post"> <form action="/user/edit/username/submit/" method="post">
<div class="formrow real_first_child"> <div class="formrow real_first_child">
<div class="formitem formlabel"><a>Current Username</a></div> <div class="formitem formlabel"><a>{{lang "account_username_current_username"}}</a></div>
<div class="formitem formlabel">{{.CurrentUser.Name}}</div> <div class="formitem formlabel">{{.CurrentUser.Name}}</div>
</div> </div>
<div class="formrow"> <div class="formrow">
<div class="formitem formlabel"><a>New Username</a></div> <div class="formitem formlabel"><a>{{lang "account_username_new_username"}}</a></div>
<div class="formitem"><input name="account-new-username" type="text" required /></div> <div class="formitem"><input name="account-new-username" type="text" required /></div>
</div> </div>
<div class="formrow"> <div class="formrow">
<div class="formitem"><button name="account-button" class="formbutton form_middle_button">Update</button></div> <div class="formitem"><button name="account-button" class="formbutton form_middle_button">{{lang "account_username_update_button"}}</button></div>
</div> </div>
</form> </form>
</div> </div>

View File

@ -1,11 +1,11 @@
{{template "header.html" . }} {{template "header.html" . }}
<main> <main>
<div class="rowblock rowhead"> <div class="rowblock rowhead">
<div class="rowitem"><h1>Are you sure?</h1></div> <div class="rowitem"><h1>{{lang "areyousure_head"}}</h1></div>
</div> </div>
<div class="rowblock"> <div class="rowblock">
<div class="rowitem passive rowmsg">{{.Something.Message}}<br /><br /> <div class="rowitem passive rowmsg">{{.Something.Message}}<br /><br />
<a class="username" href="{{.Something.URL}}?session={{.CurrentUser.Session}}">Continue</a> <a class="username" href="{{.Something.URL}}?session={{.CurrentUser.Session}}">{{lang "areyousure_continue"}}</a>
</div> </div>
</div> </div>
</main> </main>

View File

@ -1,31 +1,30 @@
{{template "header.html" . }} {{template "header.html" . }}
<main id="create_topic_page"> <main id="create_topic_page">
<div class="rowblock rowhead"> <div class="rowblock rowhead">
<div class="rowitem"><h1>Create Topic</h1></div> <div class="rowitem"><h1>{{lang "create_topic_head"}}</h1></div>
</div> </div>
<div class="rowblock"> <div class="rowblock">
<form id="quick_post_form" enctype="multipart/form-data" action="/topic/create/submit/?session={{.CurrentUser.Session}}" method="post"></form> <form id="quick_post_form" enctype="multipart/form-data" action="/topic/create/submit/?session={{.CurrentUser.Session}}" method="post"></form>
<div class="formrow real_first_child"> <div class="formrow real_first_child">
<div class="formitem formlabel"><a>Board</a></div> <div class="formitem formlabel"><a>{{lang "create_topic_board"}}</a></div>
<div class="formitem"><select form="quick_post_form" id="topic_board_input" name="topic-board"> <div class="formitem"><select form="quick_post_form" id="topic_board_input" name="topic-board">
{{range .ItemList}}<option {{if eq .ID $.FID}}selected{{end}} value="{{.ID}}">{{.Name}}</option>{{end}} {{range .ItemList}}<option {{if eq .ID $.FID}}selected{{end}} value="{{.ID}}">{{.Name}}</option>{{end}}
</select></div> </select></div>
</div> </div>
<div class="formrow"> <div class="formrow">
<div class="formitem formlabel"><a>Topic Name</a></div> <div class="formitem formlabel"><a>{{lang "create_topic_name"}}</a></div>
<div class="formitem"><input form="quick_post_form" name="topic-name" type="text" placeholder="Topic Name" required /></div> <div class="formitem"><input form="quick_post_form" name="topic-name" type="text" placeholder="{{lang "create_topic_name"}}" required /></div>
</div> </div>
<div class="formrow"> <div class="formrow">
<div class="formitem formlabel"><a>Content</a></div> <div class="formitem formlabel"><a>{{lang "create_topic_content"}}</a></div>
<div class="formitem"><textarea form="quick_post_form" class="large" id="topic_content" name="topic-content" placeholder="Insert content here" required></textarea></div> <div class="formitem"><textarea form="quick_post_form" class="large" id="topic_content" name="topic-content" placeholder="{{lang "create_topic_placeholder"}}" required></textarea></div>
</div> </div>
<div class="formrow"> <div class="formrow">
<button form="quick_post_form" name="topic-button" class="formbutton">Create Topic</button> <button form="quick_post_form" name="topic-button" class="formbutton">{{lang "create_topic_create_topic_button"}}</button>
{{if .CurrentUser.Perms.UploadFiles}} {{if .CurrentUser.Perms.UploadFiles}}
<input name="quick_topic_upload_files" form="quick_post_form" id="quick_topic_upload_files" multiple type="file" style="display: none;" /> <input name="quick_topic_upload_files" form="quick_post_form" id="quick_topic_upload_files" multiple type="file" style="display: none;" />
<label for="quick_topic_upload_files" class="formbutton add_file_button">Add File</label>{{end}} <label for="quick_topic_upload_files" class="formbutton add_file_button">{{lang "create_topic_add_file_button"}}</label>{{end}}
<div id="upload_file_dock"></div> <div id="upload_file_dock"></div>
<button class="formbutton close_form">Cancel</button>
</div> </div>
</div> </div>
</main> </main>

View File

@ -1,29 +0,0 @@
{{template "header.html" . }}
<main>
<div class="rowblock">
<form action='/topic/edit/{{index .Something "ID"}}/submit/' method="post">
<div class="rowitem">
<input name="topic_name" value='{{index .Something "content"}}' type="text" />
<select name="topic_status" class='show_on_edit'>
{{range .StatusList}}<option>{{.}}</option>{{end}}
</select>
<button name="topic-button" class="formbutton">Update</button>
</div>
</form>
</div>
<div class="rowblock">
{{range $index, $element := .ItemList}}<div class="rowitem passive">{{$element.Content}}</div>{{end}}
</div>
<div class="rowblock">
<form action="/reply/create/" method="post">
<input name="tid" value='{{index .Something "tid"}}' type="hidden" />
<div class="formrow">
<div class="formitem"><textarea name="reply-content" placeholder="Insert reply here"></textarea></div>
</div>
<div class="formrow">
<div class="formitem"><button name="reply-button" class="formbutton">Create Reply</div></div>
</div>
</form>
</div>
</main>
{{template "footer.html" . }}

View File

@ -2,11 +2,11 @@
{{dock "footer" .Header }} {{dock "footer" .Header }}
<div id="poweredByHolder" class="footerBit"> <div id="poweredByHolder" class="footerBit">
<div id="poweredBy"> <div id="poweredBy">
<a id="poweredByName" href="https://github.com/Azareal/Gosora">Powered by Gosora</a><span id="poweredByDash"> - </span><span id="poweredByMaker">Made with love by Azareal</span> <a id="poweredByName" href="https://github.com/Azareal/Gosora">{{lang "footer_powered_by"}}</a><span id="poweredByDash"> - </span><span id="poweredByMaker">{{lang "footer_made_with_love"}}</span>
</div> </div>
<form action="/theme/" method="post"> <form action="/theme/" method="post">
<div id="themeSelector" style="float: right;"> <div id="themeSelector" style="float: right;">
<select id="themeSelectorSelect" name="themeSelector" aria-label="Change the site's appearance"> <select id="themeSelectorSelect" name="themeSelector" aria-label="{{lang "footer_theme_selector_aria"}}">
{{range .Header.Themes}} {{range .Header.Themes}}
{{if not .HideFromThemes}}<option val="{{.Name}}"{{if eq $.Header.Theme.Name .Name}} selected{{end}}>{{.FriendlyName}}</option>{{end}} {{if not .HideFromThemes}}<option val="{{.Name}}"{{if eq $.Header.Theme.Name .Name}} selected{{end}}>{{.FriendlyName}}</option>{{end}}
{{end}} {{end}}

View File

@ -1,7 +1,7 @@
{{template "header.html" . }} {{template "header.html" . }}
{{if gt .Page 1}}<div id="prevFloat" class="prev_button"><a class="prev_link" aria-label="Go to the previous page" rel="prev" href="/forum/{{.Forum.ID}}?page={{subtract .Page 1}}">&lt;</a></div>{{end}} {{if gt .Page 1}}<div id="prevFloat" class="prev_button"><a class="prev_link" aria-label="{{lang "paginator_prev_page_aria"}}" rel="prev" href="/forum/{{.Forum.ID}}?page={{subtract .Page 1}}">{{lang "paginator_less_than"}}</a></div>{{end}}
{{if ne .LastPage .Page}}<div id="nextFloat" class="next_button"><a class="next_link" aria-label="Go to the next page" rel="next" href="/forum/{{.Forum.ID}}?page={{add .Page 1}}">&gt;</a></div>{{end}} {{if ne .LastPage .Page}}<div id="nextFloat" class="next_button"><a class="next_link" aria-label="{{lang "paginator_next_page_aria"}}" rel="next" href="/forum/{{.Forum.ID}}?page={{add .Page 1}}">{{lang "paginator_greater_than"}}</a></div>{{end}}
<main id="forumItemList" itemscope itemtype="http://schema.org/ItemList"> <main id="forumItemList" itemscope itemtype="http://schema.org/ItemList">
<div id="forum_head_block" class="rowblock rowhead topic_list_title_block{{if ne .CurrentUser.ID 0}} has_opt{{end}}"> <div id="forum_head_block" class="rowblock rowhead topic_list_title_block{{if ne .CurrentUser.ID 0}} has_opt{{end}}">
@ -12,12 +12,12 @@
<div class="optbox"> <div class="optbox">
{{if .CurrentUser.Perms.CreateTopic}} {{if .CurrentUser.Perms.CreateTopic}}
<div class="pre_opt auto_hide"></div> <div class="pre_opt auto_hide"></div>
<div class="opt create_topic_opt" title="Create Topic" aria-label="Create a topic"><a class="create_topic_link" href="/topics/create/{{.Forum.ID}}"></a></div> <div class="opt create_topic_opt" title="{{lang "topic_list_create_topic_tooltip"}}" aria-label="{{lang "topic_list_create_topic_aria"}}"><a class="create_topic_link" href="/topics/create/{{.Forum.ID}}"></a></div>
{{/** TODO: Add a permissions check for this **/}} {{/** TODO: Add a permissions check for this **/}}
<div class="opt mod_opt" title="Moderate"> <div class="opt mod_opt" title="{{lang "topic_list_moderate_tooltip"}}">
<a class="moderate_link" href="#" aria-label="Moderate Posts"></a> <a class="moderate_link" href="#" aria-label="{{lang "topic_list_moderate_aria"}}"></a>
</div> </div>
{{else}}<div class="opt locked_opt" title="You don't have the permissions needed to create a topic" aria-label="You don't have the permissions needed to make a topic in this forum"><a></a></div>{{end}} {{else}}<div class="opt locked_opt" title="{{lang "forum_locked_tooltip"}}" aria-label="{{lang "forum_locked_aria"}}"><a></a></div>{{end}}
</div> </div>
<div style="clear: both;"></div> <div style="clear: both;"></div>
{{end}} {{end}}
@ -26,34 +26,34 @@
<div class="mod_floater auto_hide"> <div class="mod_floater auto_hide">
<form method="post"> <form method="post">
<div class="mod_floater_head"> <div class="mod_floater_head">
<span>What do you want to do with these 18 topics?</span> <span>{{lang "topic_list_what_to_do"}}</span>
</div> </div>
<div class="mod_floater_body"> <div class="mod_floater_body">
<select class="mod_floater_options"> <select class="mod_floater_options">
<option val="delete">Delete them</option> <option val="delete">{{lang "topic_list_moderate_delete"}}</option>
<option val="lock">Lock them</option> <option val="lock">{{lang "topic_list_moderate_lock"}}</option>
<option val="move">Move them</option> <option val="move">{{lang "topic_list_moderate_move"}}</option>
</select> </select>
<button>Run</button> <button>{{lang "topic_list_moderate_run"}}</button>
</div> </div>
</form> </form>
</div> </div>
{{if .CurrentUser.Perms.CreateTopic}} {{if .CurrentUser.Perms.CreateTopic}}
<div id="forum_topic_create_form" class="rowblock topic_create_form quick_create_form" style="display: none;" aria-label="Quick Topic Form"> <div id="forum_topic_create_form" class="rowblock topic_create_form quick_create_form" style="display: none;" aria-label="{{lang "quick_topic_aria"}}">
<form id="quick_post_form" enctype="multipart/form-data" action="/topic/create/submit/" method="post"></form> <form id="quick_post_form" enctype="multipart/form-data" action="/topic/create/submit/" method="post"></form>
<img class="little_row_avatar" src="{{.CurrentUser.Avatar}}" height="64" alt="Your Avatar" title="Your Avatar" /> <img class="little_row_avatar" src="{{.CurrentUser.Avatar}}" height="64" alt="{{lang "quick_topic_avatar_alt"}}" title="{{lang "quick_topic_avatar_tooltip"}}" />
<input form="quick_post_form" id="topic_board_input" name="topic-board" value="{{.Forum.ID}}" type="hidden"> <input form="quick_post_form" id="topic_board_input" name="topic-board" value="{{.Forum.ID}}" type="hidden">
<div class="main_form"> <div class="main_form">
<div class="topic_meta"> <div class="topic_meta">
<div class="formrow topic_name_row real_first_child"> <div class="formrow topic_name_row real_first_child">
<div class="formitem"> <div class="formitem">
<input form="quick_post_form" name="topic-name" placeholder="What's up?" required> <input form="quick_post_form" name="topic-name" placeholder="{{lang "quick_topic_whatsup"}}" required>
</div> </div>
</div> </div>
</div> </div>
<div class="formrow topic_content_row"> <div class="formrow topic_content_row">
<div class="formitem"> <div class="formitem">
<textarea form="quick_post_form" id="input_content" name="topic-content" placeholder="Insert post here" required></textarea> <textarea form="quick_post_form" id="input_content" name="topic-content" placeholder="{{lang "quick_topic_content_placeholder"}}" required></textarea>
</div> </div>
</div> </div>
<div class="formrow poll_content_row auto_hide"> <div class="formrow poll_content_row auto_hide">
@ -63,20 +63,20 @@
</div> </div>
<div class="formrow quick_button_row"> <div class="formrow quick_button_row">
<div class="formitem"> <div class="formitem">
<button form="quick_post_form" name="topic-button" class="formbutton">Create Topic</button> <button form="quick_post_form" name="topic-button" class="formbutton">{{lang "quick_topic_create_topic_button"}}</button>
<button form="quick_post_form" class="formbutton" id="add_poll_button">Add Poll</button> <button form="quick_post_form" class="formbutton" id="add_poll_button">{{lang "quick_topic_add_poll_button"}}</button>
{{if .CurrentUser.Perms.UploadFiles}} {{if .CurrentUser.Perms.UploadFiles}}
<input name="upload_files" form="quick_post_form" id="upload_files" multiple type="file" style="display: none;" /> <input name="upload_files" form="quick_post_form" id="upload_files" multiple type="file" style="display: none;" />
<label for="upload_files" class="formbutton add_file_button">Add File</label> <label for="upload_files" class="formbutton add_file_button">{{lang "quick_topic_add_file_button"}}</label>
<div id="upload_file_dock"></div>{{end}} <div id="upload_file_dock"></div>{{end}}
<button class="formbutton close_form">Cancel</button> <button class="formbutton close_form">{{lang "quick_topic_cancel_button"}}</button>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
{{end}} {{end}}
{{end}} {{end}}
<div id="forum_topic_list" class="rowblock topic_list"> <div id="forum_topic_list" class="rowblock topic_list" aria-label="{{lang "forum_list_aria"}}">
{{range .ItemList}}<div class="topic_row" data-tid="{{.ID}}"> {{range .ItemList}}<div class="topic_row" data-tid="{{.ID}}">
<div class="rowitem topic_left passive datarow {{if .Sticky}}topic_sticky{{else if .IsClosed}}topic_closed{{end}}"> <div class="rowitem topic_left passive datarow {{if .Sticky}}topic_sticky{{else if .IsClosed}}topic_closed{{end}}">
<span class="selector"></span> <span class="selector"></span>
@ -85,8 +85,8 @@
<a class="rowtopic" href="{{.Link}}" itemprop="itemListElement"><span>{{.Title}}</span></a> <a class="rowtopic" href="{{.Link}}" itemprop="itemListElement"><span>{{.Title}}</span></a>
<br /><a class="rowsmall starter" href="{{.Creator.Link}}">{{.Creator.Name}}</a> <br /><a class="rowsmall starter" href="{{.Creator.Link}}">{{.Creator.Name}}</a>
{{/** TODO: Avoid the double '|' when both .IsClosed and .Sticky are set to true. We could probably do this with CSS **/}} {{/** TODO: Avoid the double '|' when both .IsClosed and .Sticky are set to true. We could probably do this with CSS **/}}
{{if .IsClosed}}<span class="rowsmall topic_status_e topic_status_closed" title="Status: Closed"> | &#x1F512;&#xFE0E</span>{{end}} {{if .IsClosed}}<span class="rowsmall topic_status_e topic_status_closed" title="{{lang "status_closed_tooltip"}}"> | &#x1F512;&#xFE0E</span>{{end}}
{{if .Sticky}}<span class="rowsmall topic_status_e topic_status_sticky" title="Status: Pinned"> | &#x1F4CD;&#xFE0E</span>{{end}} {{if .Sticky}}<span class="rowsmall topic_status_e topic_status_sticky" title="{{lang "status_pinned_tooltip"}}"> | &#x1F4CD;&#xFE0E</span>{{end}}
</span> </span>
<span class="topic_inner_right rowsmall" style="float: right;"> <span class="topic_inner_right rowsmall" style="float: right;">
<span class="replyCount">{{.PostCount}}</span><br /> <span class="replyCount">{{.PostCount}}</span><br />
@ -100,20 +100,11 @@
<span class="rowsmall lastReplyAt">{{.RelativeLastReplyAt}}</span> <span class="rowsmall lastReplyAt">{{.RelativeLastReplyAt}}</span>
</span> </span>
</div> </div>
</div>{{else}}<div class="rowitem passive rowmsg">There aren't any topics in this forum yet.{{if .CurrentUser.Perms.CreateTopic}} <a href="/topics/create/{{.Forum.ID}}">Start one?</a>{{end}}</div>{{end}} </div>{{else}}<div class="rowitem passive rowmsg">{{lang "forum_no_topics"}}{{if .CurrentUser.Perms.CreateTopic}} <a href="/topics/create/{{.Forum.ID}}">{{lang "forum_start_one"}}</a>{{end}}</div>{{end}}
</div> </div>
{{if gt .LastPage 1}} {{if gt .LastPage 1}}
<div class="pageset"> {{template "paginator.html" . }}
{{if gt .Page 1}}<div class="pageitem"><a href="?page={{subtract .Page 1}}" rel="prev" aria-label="Go to the previous page">Prev</a></div>
<link rel="prev" href="?page={{subtract .Page 1}}" />{{end}}
{{range .PageList}}
<div class="pageitem"><a href="?page={{.}}">{{.}}</a></div>
{{end}}
{{if ne .LastPage .Page}}
<link rel="next" href="?page={{add .Page 1}}" />
<div class="pageitem"><a href="?page={{add .Page 1}}" rel="next" aria-label="Go to the next page">Next</a></div>{{end}}
</div>
{{end}} {{end}}
</main> </main>

View File

@ -2,7 +2,7 @@
<main id="forumsItemList" itemscope itemtype="http://schema.org/ItemList"> <main id="forumsItemList" itemscope itemtype="http://schema.org/ItemList">
<div class="rowblock opthead"> <div class="rowblock opthead">
<div class="rowitem"><h1 itemprop="name">Forums</h1></div> <div class="rowitem"><h1 itemprop="name">{{lang "forums_head"}}</h1></div>
</div> </div>
<div class="rowblock forum_list"> <div class="rowblock forum_list">
{{range .ItemList}}<div class="rowitem {{if (.Desc) or (.LastTopic.Title)}}datarow {{end}}"itemprop="itemListElement" itemscope {{range .ItemList}}<div class="rowitem {{if (.Desc) or (.LastTopic.Title)}}datarow {{end}}"itemprop="itemListElement" itemscope
@ -12,20 +12,20 @@
{{if .Desc}} {{if .Desc}}
<br /><span class="rowsmall" itemprop="description">{{.Desc}}</span> <br /><span class="rowsmall" itemprop="description">{{.Desc}}</span>
{{else}} {{else}}
<br /><span class="rowsmall" style="font-style: italic;">No description</span> <br /><span class="rowsmall" style="font-style: italic;">{{lang "forums_no_description"}}</span>
{{end}} {{end}}
</span> </span>
<span class="forum_right shift_right"> <span class="forum_right shift_right">
{{if .LastReplyer.Avatar}}<img class="extra_little_row_avatar" src="{{.LastReplyer.Avatar}}" height=64 width=64 alt="{{.LastReplyer.Name}}'s Avatar" title="{{.LastReplyer.Name}}'s Avatar" />{{end}} {{if .LastReplyer.Avatar}}<img class="extra_little_row_avatar" src="{{.LastReplyer.Avatar}}" height=64 width=64 alt="{{.LastReplyer.Name}}'s Avatar" title="{{.LastReplyer.Name}}'s Avatar" />{{end}}
<span> <span>
<a href="{{.LastTopic.Link}}">{{if .LastTopic.Title}}{{.LastTopic.Title}}{{else}}None{{end}}</a> <a href="{{.LastTopic.Link}}">{{if .LastTopic.Title}}{{.LastTopic.Title}}{{else}}{{lang "forums_none"}}{{end}}</a>
{{if .LastTopicTime}}<br /><span class="rowsmall">{{.LastTopicTime}}</span>{{end}} {{if .LastTopicTime}}<br /><span class="rowsmall">{{.LastTopicTime}}</span>{{end}}
</span> </span>
</span> </span>
<div style="clear: both;"></div> <div style="clear: both;"></div>
</div> </div>
{{else}}<div class="rowitem passive rowmsg">You don't have access to any forums.</div>{{end}} {{else}}<div class="rowitem passive rowmsg">{{lang "forums_no_forums"}}</div>{{end}}
</div> </div>
</main> </main>

View File

@ -24,6 +24,6 @@
<div class="container"> <div class="container">
{{template "menu.html" .}} {{template "menu.html" .}}
<div id="back"><div id="main" {{if .Header.Widgets.RightSidebar}}class="shrink_main"{{end}}> <div id="back"><div id="main" {{if .Header.Widgets.RightSidebar}}class="shrink_main"{{end}}>
{{range .Header.NoticeList}}<div class="alertbox"> <div class="alertbox">{{range .Header.NoticeList}}
<div class="alert">{{.}}</div> <div class="alert">{{.}}</div>{{end}}
</div>{{end}} </div>

View File

@ -9,7 +9,7 @@
<div class="rowblock ip_search_block"> <div class="rowblock ip_search_block">
<div class="rowitem passive"> <div class="rowitem passive">
<input form="ip-search-form" name="ip" class="ip_search_input" type="search" placeholder="🔍︎"{{if .IP}} value="{{.IP}}"{{end}} /> <input form="ip-search-form" name="ip" class="ip_search_input" type="search" placeholder="🔍︎"{{if .IP}} value="{{.IP}}"{{end}} />
<input form="ip-search-form" class="ip_search_search" type="submit" value="Search" /> <input form="ip-search-form" class="ip_search_search" type="submit" value="{{lang "ip_search_search_button"}}" />
</div> </div>
</div> </div>
{{if .IP}} {{if .IP}}

View File

@ -6,12 +6,12 @@
<div class="rowblock"> <div class="rowblock">
<form action="/accounts/login/submit/" method="post"> <form action="/accounts/login/submit/" method="post">
<div class="formrow login_name_row"> <div class="formrow login_name_row">
<div class="formitem formlabel"><a>{{lang "login_account_name"}}</a></div> <div class="formitem formlabel"><a id="login_name_label">{{lang "login_account_name"}}</a></div>
<div class="formitem"><input name="username" type="text" placeholder="{{lang "login_account_name"}}" required /></div> <div class="formitem"><input name="username" type="text" placeholder="{{lang "login_account_name"}}" aria-labelledby="login_name_label" required /></div>
</div> </div>
<div class="formrow login_password_row"> <div class="formrow login_password_row">
<div class="formitem formlabel"><a>{{lang "login_account_password"}}</a></div> <div class="formitem formlabel"><a id="login_password_label">{{lang "login_account_password"}}</a></div>
<div class="formitem"><input name="password" type="password" autocomplete="current-password" placeholder="*****" required /></div> <div class="formitem"><input name="password" type="password" autocomplete="current-password" placeholder="*****" aria-labelledby="login_password_label" required /></div>
</div> </div>
<div class="formrow login_button_row"> <div class="formrow login_button_row">
<div class="formitem"><button name="login-button" class="formbutton">{{lang "login_submit_button"}}</button></div> <div class="formitem"><button name="login-button" class="formbutton">{{lang "login_submit_button"}}</button></div>

View File

@ -3,24 +3,24 @@
<div class="move_right"> <div class="move_right">
<ul>{{/** Add a menu manager **/}} <ul>{{/** Add a menu manager **/}}
<li id="menu_overview" class="menu_left"><a href="/" rel="home">{{.Header.Site.ShortName}}</a></li> <li id="menu_overview" class="menu_left"><a href="/" rel="home">{{.Header.Site.ShortName}}</a></li>
<li id="menu_forums" class="menu_left"><a href="/forums/" aria-label="The Forum list" title="Forum List"></a></li> <li id="menu_forums" class="menu_left"><a href="/forums/" aria-label="{{lang "menu_forums_aria"}}" title="{{lang "menu_forums_tooltip"}}"></a></li>
<li class="menu_left menu_topics"><a href="/" aria-label="The topic list" title="Topic List"></a></li> <li class="menu_left menu_topics"><a href="/" aria-label="{{lang "menu_topics_aria"}}" title="{{lang "menu_topics_tooltip"}}"></a></li>
<li id="general_alerts" class="menu_right menu_alerts"> <li id="general_alerts" class="menu_right menu_alerts">
<div class="alert_bell"></div> <div class="alert_bell"></div>
<div class="alert_counter" aria-label="The number of alerts"></div> <div class="alert_counter" aria-label="{{lang "menu_alert_counter_aria"}}"></div>
<div class="alert_aftercounter"></div> <div class="alert_aftercounter"></div>
<div class="alertList" aria-label="The alert list"></div> <div class="alertList" aria-label="{{lang "menu_alert_list_aria"}}"></div>
</li> </li>
{{if .CurrentUser.Loggedin}} {{if .CurrentUser.Loggedin}}
<li class="menu_left menu_account"><a href="/user/edit/critical/" aria-label="The account manager" title="Account Manager"></a></li> <li class="menu_left menu_account"><a href="/user/edit/critical/" aria-label="{{lang "menu_account_aria"}}" title="{{lang "menu_account_tooltip"}}"></a></li>
<li class="menu_left menu_profile"><a href="{{.CurrentUser.Link}}" aria-label="Your profile" title="Your profile"></a></li> <li class="menu_left menu_profile"><a href="{{.CurrentUser.Link}}" aria-label="{{lang "menu_profile_aria"}}" title="{{lang "menu_profile_tooltip"}}"></a></li>
<li class="menu_left menu_panel menu_account supermod_only"><a href="/panel/" aria-label="The Control Panel" title="Control Panel"></a></li> <li class="menu_left menu_panel menu_account supermod_only"><a href="/panel/" aria-label="{{lang "menu_panel_aria"}}" title="{{lang "menu_panel_tooltip"}}"></a></li>
<li class="menu_left menu_logout"><a href="/accounts/logout/?session={{.CurrentUser.Session}}" aria-label="Log out of your account" title="Logout"></a></li> <li class="menu_left menu_logout"><a href="/accounts/logout/?session={{.CurrentUser.Session}}" aria-label="{{lang "menu_logout_aria"}}" title="{{lang "menu_logout_tooltip"}}"></a></li>
{{else}} {{else}}
<li class="menu_left menu_register"><a href="/accounts/create/" aria-label="Create a new account" title="Register"></a></li> <li class="menu_left menu_register"><a href="/accounts/create/" aria-label="{{lang "menu_register_aria"}}" title="{{lang "menu_register_tooltip"}}"></a></li>
<li class="menu_left menu_login"><a href="/accounts/login/" aria-label="Login to your account" title="Login"></a></li> <li class="menu_left menu_login"><a href="/accounts/login/" aria-label="{{lang "menu_login_aria"}}" title="{{lang "menu_login_tooltip"}}"></a></li>
{{end}} {{end}}
<li class="menu_left menu_hamburger" title="Menu"><a></a></li> <li class="menu_left menu_hamburger" title="{{lang "menu_hamburger_tooltip"}}"><a></a></li>
</ul> </ul>
</div> </div>
</div> </div>

View File

@ -1 +0,0 @@
{{template "header.html" . }}{{template "$page_name" . }}{{template "footer.html" . }}

10
templates/paginator.html Normal file
View File

@ -0,0 +1,10 @@
<div class="pageset">
{{if gt .Page 1}}<div class="pageitem"><a href="?page={{subtract .Page 1}}" rel="prev" aria-label="{{lang "paginator_prev_page_aria"}}">{{lang "paginator_prev_page"}}</a></div>
<link rel="prev" href="?page={{subtract .Page 1}}" />{{end}}
{{range .PageList}}
<div class="pageitem"><a href="?page={{.}}">{{.}}</a></div>
{{end}}
{{if ne .LastPage .Page}}
<link rel="next" href="?page={{add .Page 1}}" />
<div class="pageitem"><a href="?page={{add .Page 1}}" rel="next" aria-label="{{lang "paginator_next_page_aria"}}">{{lang "paginator_next_page"}}</a></div>{{end}}
</div>

View File

@ -4,7 +4,7 @@
<main class="colstack_right"> <main class="colstack_right">
<div class="colstack_item colstack_head"> <div class="colstack_item colstack_head">
<div class="rowitem"><h1>{{.Name}} Forum</h1></div> <div class="rowitem"><h1>{{.Name}}{{lang "panel_forum_head_suffix"}}</h1></div>
</div> </div>
<form action="/panel/forums/edit/perms/adv/submit/{{.ForumID}}-{{.GroupID}}?session={{.CurrentUser.Session}}" method="post"> <form action="/panel/forums/edit/perms/adv/submit/{{.ForumID}}-{{.GroupID}}?session={{.CurrentUser.Session}}" method="post">
<div class="colstack_item rowlist formlist panel_forum_perms"> <div class="colstack_item rowlist formlist panel_forum_perms">
@ -14,15 +14,15 @@
<a>{{.LangStr}}</a> <a>{{.LangStr}}</a>
<div class="to_right"> <div class="to_right">
<select name="forum-perm-{{.Name}}"> <select name="forum-perm-{{.Name}}">
<option{{if .Toggle}} selected{{end}} value=1>Yes</option> <option{{if .Toggle}} selected{{end}} value=1>{{lang "option_yes"}}</option>
<option{{if not .Toggle}} selected{{end}} value=0>No</option> <option{{if not .Toggle}} selected{{end}} value=0>{{lang "option_no"}}</option>
</select> </select>
</div> </div>
</div> </div>
</div> </div>
{{end}} {{end}}
<div class="formrow"> <div class="formrow">
<div class="formitem"><button name="panel-button" class="formbutton form_middle_button">Update Forum</button></div> <div class="formitem"><button name="panel-button" class="formbutton form_middle_button">{{lang "panel_forum_update_button"}}</button></div>
</div> </div>
</div> </div>
</form> </form>

View File

@ -2,52 +2,52 @@
<div class="colstack panel_stack"> <div class="colstack panel_stack">
{{template "panel-menu.html" . }} {{template "panel-menu.html" . }}
<script> <script type="text/javascript">
var formVars = {'perm_preset': ['can_moderate','can_post','read_only','no_access','default','custom']}; var formVars = {'perm_preset': ['can_moderate','can_post','read_only','no_access','default','custom']};
</script> </script>
<main class="colstack_right"> <main class="colstack_right">
<div class="colstack_item colstack_head"> <div class="colstack_item colstack_head">
<div class="rowitem"><h1>{{.Name}} Forum</h1></div> <div class="rowitem"><h1>{{.Name}}{{lang "panel_forum_head_suffix"}}</h1></div>
</div> </div>
<div id="panel_forum" class="colstack_item"> <div id="panel_forum" class="colstack_item">
<form action="/panel/forums/edit/submit/{{.ID}}?session={{.CurrentUser.Session}}" method="post"> <form action="/panel/forums/edit/submit/{{.ID}}?session={{.CurrentUser.Session}}" method="post">
<div class="formrow"> <div class="formrow">
<div class="formitem formlabel"><a>Name</a></div> <div class="formitem formlabel"><a>{{lang "panel_forum_name"}}</a></div>
<div class="formitem"><input name="forum_name" type="text" value="{{.Name}}" placeholder="General Forum" /></div> <div class="formitem"><input name="forum_name" type="text" value="{{.Name}}" placeholder="{{lang "panel_forum_name_placeholder"}}" /></div>
</div> </div>
<div class="formrow"> <div class="formrow">
<div class="formitem formlabel"><a>Description</a></div> <div class="formitem formlabel"><a>{{lang "panel_forum_description"}}</a></div>
<div class="formitem"><input name="forum_desc" type="text" value="{{.Desc}}" placeholder="Where the general stuff happens" /></div> <div class="formitem"><input name="forum_desc" type="text" value="{{.Desc}}" placeholder="{{lang "panel_forum_description_placeholder"}}" /></div>
</div> </div>
<div class="formrow"> <div class="formrow">
<div class="formitem formlabel"><a>Active</a></div> <div class="formitem formlabel"><a>{{lang "panel_forum_active"}}</a></div>
<div class="formitem"><select name="forum_active"> <div class="formitem"><select name="forum_active">
<option{{if .Active}} selected{{end}} value="1">Yes</option> <option{{if .Active}} selected{{end}} value="1">{{lang "option_yes"}}</option>
<option{{if not .Active}} selected{{end}} value="0">No</option> <option{{if not .Active}} selected{{end}} value="0">{{lang "option_no"}}</option>
</select></div> </select></div>
</div> </div>
<div class="formrow"> <div class="formrow">
<div class="formitem formlabel"><a>Preset</a></div> <div class="formitem formlabel"><a>{{lang "panel_forum_preset"}}</a></div>
<div class="formitem"> <div class="formitem">
<select name="forum_preset"> <select name="forum_preset">
<option{{if eq .Preset "all"}} selected{{end}} value="all">Everyone</option> <option{{if eq .Preset "all"}} selected{{end}} value="all">{{lang "panel_preset_everyone"}}</option>
<option{{if eq .Preset "announce"}} selected{{end}} value="announce">Announcements</option> <option{{if eq .Preset "announce"}} selected{{end}} value="announce">{{lang "panel_preset_announcements"}}</option>
<option{{if eq .Preset "members"}} selected{{end}} value="members">Member Only</option> <option{{if eq .Preset "members"}} selected{{end}} value="members">{{lang "panel_preset_member_only"}}</option>
<option{{if eq .Preset "staff"}} selected{{end}} value="staff">Staff Only</option> <option{{if eq .Preset "staff"}} selected{{end}} value="staff">{{lang "panel_preset_staff_only"}}</option>
<option{{if eq .Preset "admins"}} selected{{end}} value="admins">Admin Only</option> <option{{if eq .Preset "admins"}} selected{{end}} value="admins">{{lang "panel_preset_admin_only"}}</option>
<option{{if eq .Preset "archive"}} selected{{end}} value="archive">Archive</option> <option{{if eq .Preset "archive"}} selected{{end}} value="archive">{{lang "panel_preset_archive"}}</option>
<option{{if eq .Preset "custom"}} selected{{end}} value="custom">Custom</option> <option{{if eq .Preset "custom"}} selected{{end}} value="custom">{{lang "panel_preset_custom"}}</option>
</select> </select>
</div> </div>
</div> </div>
<div class="formrow"> <div class="formrow">
<div class="formitem"><button name="panel-button" class="formbutton form_middle_button">Update Forum</button></div> <div class="formitem"><button name="panel-button" class="formbutton form_middle_button">{{lang "panel_forum_update_button"}}</button></div>
</div> </div>
</form> </form>
</div> </div>
<div class="colstack_item colstack_head"> <div class="colstack_item colstack_head">
<div class="rowitem"><a>Forum Permissions</a></div> <div class="rowitem"><a>{{lang "panel_forum_permissions_head"}}</a></div>
</div> </div>
<div id="forum_quick_perms" class="colstack_item rowlist formlist"> <div id="forum_quick_perms" class="colstack_item rowlist formlist">
{{range .Groups}} {{range .Groups}}
@ -55,11 +55,11 @@ var formVars = {'perm_preset': ['can_moderate','can_post','read_only','no_access
<div class="formitem editable_parent"> <div class="formitem editable_parent">
<a>{{.Group.Name}}</a> <a>{{.Group.Name}}</a>
<input name="gid" value="{{.Group.ID}}" type="hidden" class="editable_block" data-field="gid" data-type="hidden" data-value="{{.Group.ID}}" /> <input name="gid" value="{{.Group.ID}}" type="hidden" class="editable_block" data-field="gid" data-type="hidden" data-value="{{.Group.ID}}" />
<span class="edit_fields hide_on_edit rowsmall">Edit</span> <span class="edit_fields hide_on_edit rowsmall">{{lang "panel_forum_edit_button"}}</span>
<div class="panel_floater"> <div class="panel_floater">
<span data-field="perm_preset" data-type="list" data-value="{{.Preset}}" class="editable_block perm_preset perm_preset_{{.Preset}}"></span> <span data-field="perm_preset" data-type="list" data-value="{{.Preset}}" class="editable_block perm_preset perm_preset_{{.Preset}}"></span>
<a class="panel_right_button" href="/panel/forums/edit/perms/submit/{{$.ID}}"><button class='panel_tag submit_edit show_on_edit' type='submit'>Update</button></a> <a class="panel_right_button" href="/panel/forums/edit/perms/submit/{{$.ID}}"><button class='panel_tag submit_edit show_on_edit' type='submit'>{{lang "panel_forum_short_update_button"}}</button></a>
<a class="panel_right_button" href="/panel/forums/edit/perms/{{$.ID}}-{{.Group.ID}}"><button class='panel_tag show_on_edit' type='submit'>Full Edit</button></a> <a class="panel_right_button" href="/panel/forums/edit/perms/{{$.ID}}-{{.Group.ID}}"><button class='panel_tag show_on_edit' type='submit'>{{lang "panel_forum_full_edit_button"}}</button></a>
</div> </div>
</div> </div>
</div> </div>

View File

@ -2,28 +2,28 @@
<div class="colstack panel_stack"> <div class="colstack panel_stack">
<nav class="colstack_left" aria-label="The control panel menu"> <nav class="colstack_left" aria-label="The control panel menu">
<div class="colstack_item colstack_head"> <div class="colstack_item colstack_head">
<div class="rowitem"><a href="/panel/groups/edit/{{.ID}}">Group Editor</a></div> <div class="rowitem"><a href="/panel/groups/edit/{{.ID}}">{{lang "panel_group_menu_head"}}</a></div>
</div> </div>
<div class="colstack_item rowmenu"> <div class="colstack_item rowmenu">
<div class="rowitem passive"><a href="/panel/groups/edit/{{.ID}}">General</a></div> <div class="rowitem passive"><a href="/panel/groups/edit/{{.ID}}">{{lang "panel_group_menu_general"}}</a></div>
<div class="rowitem passive"><a>Promotions</a></div> <div class="rowitem passive"><a>{{lang "panel_group_menu_promotions"}}</a></div>
<div class="rowitem passive"><a href="/panel/groups/edit/perms/{{.ID}}">Permissions</a></div> <div class="rowitem passive"><a href="/panel/groups/edit/perms/{{.ID}}">{{lang "panel_group_menu_permissions"}}</a></div>
</div> </div>
{{template "panel-inner-menu.html" . }} {{template "panel-inner-menu.html" . }}
</nav> </nav>
<main class="colstack_right"> <main class="colstack_right">
<div class="colstack_item colstack_head"> <div class="colstack_item colstack_head">
<div class="rowitem"><h1>{{.Name}} Group</h1></div> <div class="rowitem"><h1>{{.Name}}{{lang "panel_group_head_suffix"}}</h1></div>
</div> </div>
<div id="panel_group" class="colstack_item"> <div id="panel_group" class="colstack_item">
<form action="/panel/groups/edit/submit/{{.ID}}?session={{.CurrentUser.Session}}" method="post"> <form action="/panel/groups/edit/submit/{{.ID}}?session={{.CurrentUser.Session}}" method="post">
<div class="formrow"> <div class="formrow">
<div class="formitem formlabel"><a>Name</a></div> <div class="formitem formlabel"><a>{{lang "panel_group_name"}}</a></div>
<div class="formitem"><input name="group-name" type="text" value="{{.Name}}" placeholder="Random Group" /></div> <div class="formitem"><input name="group-name" type="text" value="{{.Name}}" placeholder="{{lang "panel_group_name_placeholder"}}" /></div>
</div> </div>
{{if .CurrentUser.Perms.EditGroup}} {{if .CurrentUser.Perms.EditGroup}}
<div class="formrow"> <div class="formrow">
<div class="formitem formlabel"><a>Type</a></div> <div class="formitem formlabel"><a>{{lang "panel_group_type"}}</a></div>
<div class="formitem"> <div class="formitem">
<select name="group-type"{{if .DisableRank}} disabled{{end}}> <select name="group-type"{{if .DisableRank}} disabled{{end}}>
<option{{if eq .Rank "Guest"}} selected{{end}} disabled>Guest</option> <option{{if eq .Rank "Guest"}} selected{{end}} disabled>Guest</option>
@ -35,11 +35,11 @@
</div> </div>
</div>{{end}} </div>{{end}}
<div class="formrow"> <div class="formrow">
<div class="formitem formlabel"><a>Tag</a></div> <div class="formitem formlabel"><a>{{lang "panel_group_tag"}}</a></div>
<div class="formitem"><input name="group-tag" type="text" value="{{.Tag}}" placeholder="VIP" /></div> <div class="formitem"><input name="group-tag" type="text" value="{{.Tag}}" placeholder="{{lang "panel_group_tag_placeholder"}}" /></div>
</div> </div>
<div class="formrow"> <div class="formrow">
<div class="formitem"><button name="panel-button" class="formbutton">Update Group</button></div> <div class="formitem"><button name="panel-button" class="formbutton">{{lang "panel_group_update_button"}}</button></div>
</div> </div>
</form> </form>
</div> </div>

View File

@ -1,84 +1,81 @@
<div class="colstack_item colstack_head"> <div class="colstack_item colstack_head">
<div class="rowitem"><a href="/panel/">Control Panel</a></div> <div class="rowitem"><a href="/panel/">{{lang "panel_menu_head"}}</a></div>
</div> </div>
<div class="colstack_item rowmenu"> <div class="colstack_item rowmenu">
<div class="rowitem passive"> <div class="rowitem passive">
<a href="/panel/users/">Users</a> <a class="menu_stats" href="#">({{.Stats.Users}})</a> <a href="/panel/users/">{{lang "panel_menu_users"}}</a> <a class="menu_stats" href="#">({{.Stats.Users}})</a>
</div> </div>
<div class="rowitem passive"> <div class="rowitem passive">
<a href="/panel/groups/">Groups</a> <a class="menu_stats" href="#">({{.Stats.Groups}})</a> <a href="/panel/groups/">{{lang "panel_menu_groups"}}</a> <a class="menu_stats" href="#">({{.Stats.Groups}})</a>
</div> </div>
{{if .CurrentUser.Perms.ManageForums}}<div class="rowitem passive"> {{if .CurrentUser.Perms.ManageForums}}<div class="rowitem passive">
<a href="/panel/forums/">Forums</a> <a class="menu_stats" href="#">({{.Stats.Forums}})</a> <a href="/panel/forums/">{{lang "panel_menu_forums"}}</a> <a class="menu_stats" href="#">({{.Stats.Forums}})</a>
</div>{{end}} </div>{{end}}
{{if .CurrentUser.Perms.EditSettings}}<div class="rowitem passive"> {{if .CurrentUser.Perms.EditSettings}}<div class="rowitem passive">
<a href="/panel/settings/">Settings</a> <a class="menu_stats" href="#">({{.Stats.Settings}})</a> <a href="/panel/settings/">{{lang "panel_menu_settings"}}</a> <a class="menu_stats" href="#">({{.Stats.Settings}})</a>
</div> </div>
<div class="rowitem passive"> <div class="rowitem passive">
<a href="/panel/settings/word-filters/">Word Filters</a> <a class="menu_stats" href="#">({{.Stats.WordFilters}})</a> <a href="/panel/settings/word-filters/">{{lang "panel_menu_word_filters"}}</a> <a class="menu_stats" href="#">({{.Stats.WordFilters}})</a>
</div>{{end}} </div>{{end}}
{{if .CurrentUser.Perms.ManageThemes}}<div class="rowitem passive"> {{if .CurrentUser.Perms.ManageThemes}}<div class="rowitem passive">
<a href="/panel/themes/">Themes</a> <a class="menu_stats" href="#">({{.Stats.Themes}})</a> <a href="/panel/themes/">{{lang "panel_menu_themes"}}</a> <a class="menu_stats" href="#">({{.Stats.Themes}})</a>
</div>{{end}} </div>{{end}}
</div> </div>
<div class="colstack_item colstack_head"> <div class="colstack_item colstack_head">
<div class="rowitem"><a href="#">Events</a></div> <div class="rowitem"><a href="#">{{lang "panel_menu_events"}}</a></div>
</div> </div>
<div class="colstack_item rowmenu"> <div class="colstack_item rowmenu">
<div class="rowitem passive"> <div class="rowitem passive">
<a href="/panel/analytics/views/">Statistics</a> <a href="/panel/analytics/views/">{{lang "panel_menu_statistics"}}</a>
</div> </div>
{{if eq .Zone "analytics"}} {{if eq .Zone "analytics"}}
<div class="rowitem passive submenu"> <div class="rowitem passive submenu">
<a href="/panel/analytics/posts/">Posts</a> <a href="/panel/analytics/posts/">{{lang "panel_menu_statistics_posts"}}</a>
</div> </div>
<div class="rowitem passive submenu"> <div class="rowitem passive submenu">
<a href="/panel/analytics/topics/">Topics</a> <a href="/panel/analytics/topics/">{{lang "panel_menu_statistics_topics"}}</a>
</div> </div>
<div class="rowitem passive submenu"> <div class="rowitem passive submenu">
<a href="/panel/analytics/forums/">Forums</a> <a href="/panel/analytics/forums/">{{lang "panel_menu_statistics_forums"}}</a>
</div> </div>
<div class="rowitem passive submenu"> <div class="rowitem passive submenu">
<a href="/panel/analytics/routes/">Routes</a> <a href="/panel/analytics/routes/">{{lang "panel_menu_statistics_routes"}}</a>
</div> </div>
<div class="rowitem passive submenu"> <div class="rowitem passive submenu">
<a href="/panel/analytics/agents/">Agents</a> <a href="/panel/analytics/agents/">{{lang "panel_menu_statistics_agents"}}</a>
</div> </div>
<div class="rowitem passive submenu"> <div class="rowitem passive submenu">
<a href="/panel/analytics/crawlers/">Crawlers</a> <a href="/panel/analytics/systems/">{{lang "panel_menu_statistics_systems"}}</a>
</div> </div>
<div class="rowitem passive submenu"> <div class="rowitem passive submenu">
<a href="/panel/analytics/systems/">Systems</a> <a href="/panel/analytics/langs/">{{lang "panel_menu_statistics_languages"}}</a>
</div> </div>
<div class="rowitem passive submenu"> <div class="rowitem passive submenu">
<a href="/panel/analytics/langs/">Languages</a> <a href="/panel/analytics/referrers/">{{lang "panel_menu_statistics_referrers"}}</a>
</div>
<div class="rowitem passive submenu">
<a href="/panel/analytics/referrers/">Referrers</a>
</div> </div>
{{end}} {{end}}
<div class="rowitem passive"> <div class="rowitem passive">
<a href="/forum/1">Reports</a> <a class="menu_stats" href="#">({{.Stats.Reports}})</a> <a href="/forum/1">{{lang "panel_menu_reports"}}</a> <a class="menu_stats" href="#">({{.Stats.Reports}})</a>
</div> </div>
<div class="rowitem passive"> <div class="rowitem passive">
<a href="/panel/logs/mod/">Logs</a> <a href="/panel/logs/mod/">{{lang "panel_menu_logs"}}</a>
</div> </div>
{{if eq .Zone "logs"}} {{if eq .Zone "logs"}}
<div class="rowitem passive submenu"><a href="/panel/logs/mod/">Moderators</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>Administrators</a></div>{{end}} {{if .CurrentUser.Perms.ViewAdminLogs}}<div class="rowitem passive submenu"><a>{{lang "panel_menu_logs_administrators"}}</a></div>{{end}}
{{end}} {{end}}
</div> </div>
<div class="colstack_item colstack_head"> <div class="colstack_item colstack_head">
<div class="rowitem"><a href="#">System</a></div> <div class="rowitem"><a href="#">{{lang "panel_menu_system"}}</a></div>
</div> </div>
<div class="colstack_item rowmenu"> <div class="colstack_item rowmenu">
{{if .CurrentUser.Perms.ManagePlugins}}<div class="rowitem passive"> {{if .CurrentUser.Perms.ManagePlugins}}<div class="rowitem passive">
<a href="/panel/plugins/">Plugins</a> <a href="/panel/plugins/">{{lang "panel_menu_plugins"}}</a>
</div>{{end}} </div>{{end}}
{{if .CurrentUser.IsSuperAdmin}}<div class="rowitem passive"> {{if .CurrentUser.IsSuperAdmin}}<div class="rowitem passive">
<a href="/panel/backups/">Backups</a> <a href="/panel/backups/">{{lang "panel_menu_backups"}}</a>
</div>{{end}} </div>{{end}}
{{if .CurrentUser.IsAdmin}}<div class="rowitem passive"> {{if .CurrentUser.IsAdmin}}<div class="rowitem passive">
<a href="/panel/debug/">Debug</a> <a href="/panel/debug/">{{lang "panel_menu_debug"}}</a>
</div>{{end}} </div>{{end}}
</div> </div>

View File

@ -4,25 +4,25 @@
{{template "panel-menu.html" . }} {{template "panel-menu.html" . }}
<main class="colstack_right"> <main class="colstack_right">
<div class="colstack_item colstack_head"> <div class="colstack_item colstack_head">
<div class="rowitem"><h1>User Editor</h1></div> <div class="rowitem"><h1>{{lang "panel_user_head"}}</h1></div>
</div> </div>
<div id="panel_user" class="colstack_item"> <div id="panel_user" class="colstack_item">
<form action="/panel/users/edit/submit/{{.Something.ID}}?session={{.CurrentUser.Session}}" method="post"> <form action="/panel/users/edit/submit/{{.Something.ID}}?session={{.CurrentUser.Session}}" method="post">
<div class="formrow"> <div class="formrow">
<div class="formitem formlabel"><a>Name</a></div> <div class="formitem formlabel"><a>{{lang "panel_user_name"}}</a></div>
<div class="formitem"><input name="user-name" type="text" value="{{.Something.Name}}" placeholder="Jane Doe" /></div> <div class="formitem"><input name="user-name" type="text" value="{{.Something.Name}}" placeholder="{{lang "panel_user_name_placeholder"}}" /></div>
</div> </div>
{{if .CurrentUser.Perms.EditUserPassword}}<div class="formrow"> {{if .CurrentUser.Perms.EditUserPassword}}<div class="formrow">
<div class="formitem formlabel"><a>Password</a></div> <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="*****" /></div>
</div>{{end}} </div>{{end}}
{{if .CurrentUser.Perms.EditUserEmail}}<div class="formrow"> {{if .CurrentUser.Perms.EditUserEmail}}<div class="formrow">
<div class="formitem formlabel"><a>Email</a></div> <div class="formitem formlabel"><a>{{lang "panel_user_email"}}</a></div>
<div class="formitem"><input name="user-email" type="email" value="{{.Something.Email}}" placeholder="example@localhost" /></div> <div class="formitem"><input name="user-email" type="email" value="{{.Something.Email}}" placeholder="example@localhost" /></div>
</div>{{end}} </div>{{end}}
{{if .CurrentUser.Perms.EditUserGroup}} {{if .CurrentUser.Perms.EditUserGroup}}
<div class="formrow"> <div class="formrow">
<div class="formitem formlabel"><a>Group</a></div> <div class="formitem formlabel"><a>{{lang "panel_user_group"}}</a></div>
<div class="formitem"> <div class="formitem">
<select name="user-group"> <select name="user-group">
{{range .ItemList}}<option {{if eq .ID $.Something.Group}}selected {{end}}value="{{.ID}}">{{.Name}}</option>{{end}} {{range .ItemList}}<option {{if eq .ID $.Something.Group}}selected {{end}}value="{{.ID}}">{{.Name}}</option>{{end}}
@ -30,7 +30,7 @@
</div> </div>
</div>{{end}} </div>{{end}}
<div class="formrow"> <div class="formrow">
<div class="formitem"><button name="panel-button" class="formbutton">Update User</button></div> <div class="formitem"><button name="panel-button" class="formbutton">{{lang "panel_user_update_button"}}</button></div>
</div> </div>
</form> </form>
</div> </div>

View File

@ -2,19 +2,19 @@
<div class="colstack panel_stack"> <div class="colstack panel_stack">
<nav class="colstack_left" aria-label="The control panel menu"> <nav class="colstack_left" aria-label="The control panel menu">
<div class="colstack_item colstack_head submenu_fallback"> <div class="colstack_item colstack_head submenu_fallback">
<div class="rowitem"><a href="/panel/logs/mod/">Logs</a></div> <div class="rowitem"><a href="/panel/logs/mod/">{{lang "panel_logs_menu_head"}}</a></div>
</div> </div>
<div class="colstack_item rowmenu submenu_fallback"> <div class="colstack_item rowmenu submenu_fallback">
<div class="rowitem passive"><a href="/panel/logs/mod/">Moderation Logs</a></div> <div class="rowitem passive"><a href="/panel/logs/mod/">{{lang "panel_logs_menu_moderation"}}</a></div>
{{if .CurrentUser.Perms.ViewAdminLogs}}<div class="rowitem passive"><a>Administration Logs</a></div>{{end}} {{if .CurrentUser.Perms.ViewAdminLogs}}<div class="rowitem passive"><a>{{lang "panel_logs_menu_administration"}}</a></div>{{end}}
</div> </div>
{{template "panel-inner-menu.html" . }} {{template "panel-inner-menu.html" . }}
</nav> </nav>
<main class="colstack_right"> <main class="colstack_right">
<div class="colstack_item colstack_head"> <div class="colstack_item colstack_head">
<div class="rowitem"><h1>Administration Logs</h1></div> <div class="rowitem"><h1>{{lang "panel_logs_administration_head"}}</h1></div>
</div> </div>
<div id="panel_adminlogs" class="colstack_item rowlist"> <div id="panel_modlogs" class="colstack_item rowlist">
{{range .Logs}} {{range .Logs}}
<div class="rowitem panel_compactrow"> <div class="rowitem panel_compactrow">
<span style="float: left;"> <span style="float: left;">
@ -29,13 +29,7 @@
{{end}} {{end}}
</div> </div>
{{if gt .LastPage 1}} {{if gt .LastPage 1}}
<div class="pageset"> {{template "paginator.html" . }}
{{if gt .Page 1}}<div class="pageitem"><a href="?page={{subtract .Page 1}}" aria-label="Previous Page">Prev</a></div>{{end}}
{{range .PageList}}
<div class="pageitem"><a href="?page={{.}}" aria-label="Page {{.}}">{{.}}</a></div>
{{end}}
{{if ne .LastPage .Page}}<div class="pageitem"><a href="?page={{add .Page 1}}" aria-label="Next Page">Next</a></div>{{end}}
</div>
{{end}} {{end}}
</main> </main>
</div> </div>

View File

@ -5,14 +5,14 @@
<form id="timeRangeForm" name="timeRangeForm" action="/panel/analytics/agent/{{.Agent}}" method="get"> <form id="timeRangeForm" name="timeRangeForm" action="/panel/analytics/agent/{{.Agent}}" method="get">
<div class="colstack_item colstack_head"> <div class="colstack_item colstack_head">
<div class="rowitem"> <div class="rowitem">
<a>{{.FriendlyAgent}} Views</a> <a>{{.FriendlyAgent}}{{lang "panel_statistics_views_head_suffix"}}</a>
<select class="timeRangeSelector to_right" name="timeRange"> <select class="timeRangeSelector to_right" name="timeRange">
<option val="one-month"{{if eq .TimeRange "one-month"}} selected{{end}}>1 month</option> <option val="one-month"{{if eq .TimeRange "one-month"}} selected{{end}}>{{lang "panel_statistics_time_range_one_month"}}</option>
<option val="one-week"{{if eq .TimeRange "one-week"}} selected{{end}}>1 week</option> <option val="one-week"{{if eq .TimeRange "one-week"}} selected{{end}}>{{lang "panel_statistics_time_range_one_week"}}</option>
<option val="two-days"{{if eq .TimeRange "two-days"}} selected{{end}}>2 days</option> <option val="two-days"{{if eq .TimeRange "two-days"}} selected{{end}}>{{lang "panel_statistics_time_range_two_days"}}</option>
<option val="one-day"{{if eq .TimeRange "one-day"}} selected{{end}}>1 day</option> <option val="one-day"{{if eq .TimeRange "one-day"}} selected{{end}}>{{lang "panel_statistics_time_range_one_day"}}</option>
<option val="twelve-hours"{{if eq .TimeRange "twelve-hours"}} selected{{end}}>12 hours</option> <option val="twelve-hours"{{if eq .TimeRange "twelve-hours"}} selected{{end}}>{{lang "panel_statistics_time_range_twelve_hours"}}</option>
<option val="six-hours"{{if eq .TimeRange "six-hours"}} selected{{end}}>6 hours</option> <option val="six-hours"{{if eq .TimeRange "six-hours"}} selected{{end}}>{{lang "panel_statistics_time_range_six_hours"}}</option>
</select> </select>
</div> </div>
</div> </div>

View File

@ -5,14 +5,14 @@
<form id="timeRangeForm" name="timeRangeForm" action="/panel/analytics/agents/" method="get"> <form id="timeRangeForm" name="timeRangeForm" action="/panel/analytics/agents/" method="get">
<div class="colstack_item colstack_head"> <div class="colstack_item colstack_head">
<div class="rowitem"> <div class="rowitem">
<a>User Agents</a> <a>{{lang "panel_statistics_user_agents_head"}}</a>
<select class="timeRangeSelector to_right" name="timeRange"> <select class="timeRangeSelector to_right" name="timeRange">
<option val="one-month"{{if eq .TimeRange "one-month"}} selected{{end}}>1 month</option> <option val="one-month"{{if eq .TimeRange "one-month"}} selected{{end}}>{{lang "panel_statistics_time_range_one_month"}}</option>
<option val="one-week"{{if eq .TimeRange "one-week"}} selected{{end}}>1 week</option> <option val="one-week"{{if eq .TimeRange "one-week"}} selected{{end}}>{{lang "panel_statistics_time_range_one_week"}}</option>
<option val="two-days"{{if eq .TimeRange "two-days"}} selected{{end}}>2 days</option> <option val="two-days"{{if eq .TimeRange "two-days"}} selected{{end}}>{{lang "panel_statistics_time_range_two_days"}}</option>
<option val="one-day"{{if eq .TimeRange "one-day"}} selected{{end}}>1 day</option> <option val="one-day"{{if eq .TimeRange "one-day"}} selected{{end}}>{{lang "panel_statistics_time_range_one_day"}}</option>
<option val="twelve-hours"{{if eq .TimeRange "twelve-hours"}} selected{{end}}>12 hours</option> <option val="twelve-hours"{{if eq .TimeRange "twelve-hours"}} selected{{end}}>{{lang "panel_statistics_time_range_twelve_hours"}}</option>
<option val="six-hours"{{if eq .TimeRange "six-hours"}} selected{{end}}>6 hours</option> <option val="six-hours"{{if eq .TimeRange "six-hours"}} selected{{end}}>{{lang "panel_statistics_time_range_six_hours"}}</option>
</select> </select>
</div> </div>
</div> </div>
@ -21,9 +21,9 @@
{{range .ItemList}} {{range .ItemList}}
<div class="rowitem panel_compactrow editable_parent"> <div class="rowitem panel_compactrow editable_parent">
<a href="/panel/analytics/agent/{{.Agent}}" class="panel_upshift">{{.FriendlyAgent}}</a> <a href="/panel/analytics/agent/{{.Agent}}" class="panel_upshift">{{.FriendlyAgent}}</a>
<span class="panel_compacttext to_right">{{.Count}} views</span> <span class="panel_compacttext to_right">{{.Count}}{{lang "panel_statistics_views_suffix"}}</span>
</div> </div>
{{else}}<div class="rowitem passive rowmsg">No user agents could be found in the selected time range</div>{{end}} {{else}}<div class="rowitem passive rowmsg">{{lang "panel_statistics_user_agents_no_user_agents"}}</div>{{end}}
</div> </div>
</main> </main>
</div> </div>

View File

@ -5,14 +5,14 @@
<form id="timeRangeForm" name="timeRangeForm" action="/panel/analytics/forum/{{.Agent}}" method="get"> <form id="timeRangeForm" name="timeRangeForm" action="/panel/analytics/forum/{{.Agent}}" method="get">
<div class="colstack_item colstack_head"> <div class="colstack_item colstack_head">
<div class="rowitem"> <div class="rowitem">
<a>{{.FriendlyAgent}} Views</a> <a>{{.FriendlyAgent}}{{lang "panel_statistics_views_head_suffix"}}</a>
<select class="timeRangeSelector to_right" name="timeRange"> <select class="timeRangeSelector to_right" name="timeRange">
<option val="one-month"{{if eq .TimeRange "one-month"}} selected{{end}}>1 month</option> <option val="one-month"{{if eq .TimeRange "one-month"}} selected{{end}}>{{lang "panel_statistics_time_range_one_month"}}</option>
<option val="one-week"{{if eq .TimeRange "one-week"}} selected{{end}}>1 week</option> <option val="one-week"{{if eq .TimeRange "one-week"}} selected{{end}}>{{lang "panel_statistics_time_range_one_week"}}</option>
<option val="two-days"{{if eq .TimeRange "two-days"}} selected{{end}}>2 days</option> <option val="two-days"{{if eq .TimeRange "two-days"}} selected{{end}}>{{lang "panel_statistics_time_range_two_days"}}</option>
<option val="one-day"{{if eq .TimeRange "one-day"}} selected{{end}}>1 day</option> <option val="one-day"{{if eq .TimeRange "one-day"}} selected{{end}}>{{lang "panel_statistics_time_range_one_day"}}</option>
<option val="twelve-hours"{{if eq .TimeRange "twelve-hours"}} selected{{end}}>12 hours</option> <option val="twelve-hours"{{if eq .TimeRange "twelve-hours"}} selected{{end}}>{{lang "panel_statistics_time_range_twelve_hours"}}</option>
<option val="six-hours"{{if eq .TimeRange "six-hours"}} selected{{end}}>6 hours</option> <option val="six-hours"{{if eq .TimeRange "six-hours"}} selected{{end}}>{{lang "panel_statistics_time_range_six_hours"}}</option>
</select> </select>
</div> </div>
</div> </div>

View File

@ -5,14 +5,14 @@
<form id="timeRangeForm" name="timeRangeForm" action="/panel/analytics/forums/" method="get"> <form id="timeRangeForm" name="timeRangeForm" action="/panel/analytics/forums/" method="get">
<div class="colstack_item colstack_head"> <div class="colstack_item colstack_head">
<div class="rowitem"> <div class="rowitem">
<a>Forums</a> <a>{{lang "panel_statistics_forums_head"}}</a>
<select class="timeRangeSelector to_right" name="timeRange"> <select class="timeRangeSelector to_right" name="timeRange">
<option val="one-month"{{if eq .TimeRange "one-month"}} selected{{end}}>1 month</option> <option val="one-month"{{if eq .TimeRange "one-month"}} selected{{end}}>{{lang "panel_statistics_time_range_one_month"}}</option>
<option val="one-week"{{if eq .TimeRange "one-week"}} selected{{end}}>1 week</option> <option val="one-week"{{if eq .TimeRange "one-week"}} selected{{end}}>{{lang "panel_statistics_time_range_one_week"}}</option>
<option val="two-days"{{if eq .TimeRange "two-days"}} selected{{end}}>2 days</option> <option val="two-days"{{if eq .TimeRange "two-days"}} selected{{end}}>{{lang "panel_statistics_time_range_two_days"}}</option>
<option val="one-day"{{if eq .TimeRange "one-day"}} selected{{end}}>1 day</option> <option val="one-day"{{if eq .TimeRange "one-day"}} selected{{end}}>{{lang "panel_statistics_time_range_one_day"}}</option>
<option val="twelve-hours"{{if eq .TimeRange "twelve-hours"}} selected{{end}}>12 hours</option> <option val="twelve-hours"{{if eq .TimeRange "twelve-hours"}} selected{{end}}>{{lang "panel_statistics_time_range_twelve_hours"}}</option>
<option val="six-hours"{{if eq .TimeRange "six-hours"}} selected{{end}}>6 hours</option> <option val="six-hours"{{if eq .TimeRange "six-hours"}} selected{{end}}>{{lang "panel_statistics_time_range_six_hours"}}</option>
</select> </select>
</div> </div>
</div> </div>
@ -21,9 +21,9 @@
{{range .ItemList}} {{range .ItemList}}
<div class="rowitem panel_compactrow editable_parent"> <div class="rowitem panel_compactrow editable_parent">
<a href="/panel/analytics/forum/{{.Agent}}" class="panel_upshift">{{.FriendlyAgent}}</a> <a href="/panel/analytics/forum/{{.Agent}}" class="panel_upshift">{{.FriendlyAgent}}</a>
<span class="panel_compacttext to_right">{{.Count}} views</span> <span class="panel_compacttext to_right">{{.Count}}{{lang "panel_statistics_views_suffix"}}</span>
</div> </div>
{{else}}<div class="rowitem passive rowmsg">No forum view counts could be found in the selected time range</div>{{end}} {{else}}<div class="rowitem passive rowmsg">{{lang "panel_statistics_forums_no_forums"}}</div>{{end}}
</div> </div>
</main> </main>
</div> </div>

View File

@ -5,14 +5,14 @@
<form id="timeRangeForm" name="timeRangeForm" action="/panel/analytics/lang/{{.Agent}}" method="get"> <form id="timeRangeForm" name="timeRangeForm" action="/panel/analytics/lang/{{.Agent}}" method="get">
<div class="colstack_item colstack_head"> <div class="colstack_item colstack_head">
<div class="rowitem"> <div class="rowitem">
<a>{{.FriendlyAgent}} Views</a> <a>{{.FriendlyAgent}}{{lang "panel_statistics_views_head_suffix"}}</a>
<select class="timeRangeSelector to_right" name="timeRange"> <select class="timeRangeSelector to_right" name="timeRange">
<option val="one-month"{{if eq .TimeRange "one-month"}} selected{{end}}>1 month</option> <option val="one-month"{{if eq .TimeRange "one-month"}} selected{{end}}>{{lang "panel_statistics_time_range_one_month"}}</option>
<option val="one-week"{{if eq .TimeRange "one-week"}} selected{{end}}>1 week</option> <option val="one-week"{{if eq .TimeRange "one-week"}} selected{{end}}>{{lang "panel_statistics_time_range_one_week"}}</option>
<option val="two-days"{{if eq .TimeRange "two-days"}} selected{{end}}>2 days</option> <option val="two-days"{{if eq .TimeRange "two-days"}} selected{{end}}>{{lang "panel_statistics_time_range_two_days"}}</option>
<option val="one-day"{{if eq .TimeRange "one-day"}} selected{{end}}>1 day</option> <option val="one-day"{{if eq .TimeRange "one-day"}} selected{{end}}>{{lang "panel_statistics_time_range_one_day"}}</option>
<option val="twelve-hours"{{if eq .TimeRange "twelve-hours"}} selected{{end}}>12 hours</option> <option val="twelve-hours"{{if eq .TimeRange "twelve-hours"}} selected{{end}}>{{lang "panel_statistics_time_range_twelve_hours"}}</option>
<option val="six-hours"{{if eq .TimeRange "six-hours"}} selected{{end}}>6 hours</option> <option val="six-hours"{{if eq .TimeRange "six-hours"}} selected{{end}}>{{lang "panel_statistics_time_range_six_hours"}}</option>
</select> </select>
</div> </div>
</div> </div>

View File

@ -5,14 +5,14 @@
<form id="timeRangeForm" name="timeRangeForm" action="/panel/analytics/langs/" method="get"> <form id="timeRangeForm" name="timeRangeForm" action="/panel/analytics/langs/" method="get">
<div class="colstack_item colstack_head"> <div class="colstack_item colstack_head">
<div class="rowitem"> <div class="rowitem">
<a>Languages</a> <a>{{lang "panel_statistics_languages_head"}}</a>
<select class="timeRangeSelector to_right" name="timeRange"> <select class="timeRangeSelector to_right" name="timeRange">
<option val="one-month"{{if eq .TimeRange "one-month"}} selected{{end}}>1 month</option> <option val="one-month"{{if eq .TimeRange "one-month"}} selected{{end}}>{{lang "panel_statistics_time_range_one_month"}}</option>
<option val="one-week"{{if eq .TimeRange "one-week"}} selected{{end}}>1 week</option> <option val="one-week"{{if eq .TimeRange "one-week"}} selected{{end}}>{{lang "panel_statistics_time_range_one_week"}}</option>
<option val="two-days"{{if eq .TimeRange "two-days"}} selected{{end}}>2 days</option> <option val="two-days"{{if eq .TimeRange "two-days"}} selected{{end}}>{{lang "panel_statistics_time_range_two_days"}}</option>
<option val="one-day"{{if eq .TimeRange "one-day"}} selected{{end}}>1 day</option> <option val="one-day"{{if eq .TimeRange "one-day"}} selected{{end}}>{{lang "panel_statistics_time_range_one_day"}}</option>
<option val="twelve-hours"{{if eq .TimeRange "twelve-hours"}} selected{{end}}>12 hours</option> <option val="twelve-hours"{{if eq .TimeRange "twelve-hours"}} selected{{end}}>{{lang "panel_statistics_time_range_twelve_hours"}}</option>
<option val="six-hours"{{if eq .TimeRange "six-hours"}} selected{{end}}>6 hours</option> <option val="six-hours"{{if eq .TimeRange "six-hours"}} selected{{end}}>{{lang "panel_statistics_time_range_six_hours"}}</option>
</select> </select>
</div> </div>
</div> </div>
@ -21,9 +21,9 @@
{{range .ItemList}} {{range .ItemList}}
<div class="rowitem panel_compactrow editable_parent"> <div class="rowitem panel_compactrow editable_parent">
<a href="/panel/analytics/lang/{{.Agent}}" class="panel_upshift">{{.FriendlyAgent}}</a> <a href="/panel/analytics/lang/{{.Agent}}" class="panel_upshift">{{.FriendlyAgent}}</a>
<span class="panel_compacttext to_right">{{.Count}} views</span> <span class="panel_compacttext to_right">{{.Count}}{{lang "panel_statistics_views_suffix"}}</span>
</div> </div>
{{else}}<div class="rowitem passive rowmsg">No language could be found in the selected time range</div>{{end}} {{else}}<div class="rowitem passive rowmsg">{{lang "panel_statistics_languages_no_languages"}}</div>{{end}}
</div> </div>
</main> </main>
</div> </div>

View File

@ -5,31 +5,31 @@
<form id="timeRangeForm" name="timeRangeForm" action="/panel/analytics/posts/" method="get"> <form id="timeRangeForm" name="timeRangeForm" action="/panel/analytics/posts/" method="get">
<div class="colstack_item colstack_head"> <div class="colstack_item colstack_head">
<div class="rowitem"> <div class="rowitem">
<a>Post Counts</a> <a>{{lang "panel_statistics_post_counts_head"}}</a>
<select class="timeRangeSelector to_right" name="timeRange"> <select class="timeRangeSelector to_right" name="timeRange">
<option val="one-month"{{if eq .TimeRange "one-month"}} selected{{end}}>1 month</option> <option val="one-month"{{if eq .TimeRange "one-month"}} selected{{end}}>{{lang "panel_statistics_time_range_one_month"}}</option>
<option val="one-week"{{if eq .TimeRange "one-week"}} selected{{end}}>1 week</option> <option val="one-week"{{if eq .TimeRange "one-week"}} selected{{end}}>{{lang "panel_statistics_time_range_one_week"}}</option>
<option val="two-days"{{if eq .TimeRange "two-days"}} selected{{end}}>2 days</option> <option val="two-days"{{if eq .TimeRange "two-days"}} selected{{end}}>{{lang "panel_statistics_time_range_two_days"}}</option>
<option val="one-day"{{if eq .TimeRange "one-day"}} selected{{end}}>1 day</option> <option val="one-day"{{if eq .TimeRange "one-day"}} selected{{end}}>{{lang "panel_statistics_time_range_one_day"}}</option>
<option val="twelve-hours"{{if eq .TimeRange "twelve-hours"}} selected{{end}}>12 hours</option> <option val="twelve-hours"{{if eq .TimeRange "twelve-hours"}} selected{{end}}>{{lang "panel_statistics_time_range_twelve_hours"}}</option>
<option val="six-hours"{{if eq .TimeRange "six-hours"}} selected{{end}}>6 hours</option> <option val="six-hours"{{if eq .TimeRange "six-hours"}} selected{{end}}>{{lang "panel_statistics_time_range_six_hours"}}</option>
</select> </select>
</div> </div>
</div> </div>
</form> </form>
<div id="panel_analytics_posts" class="colstack_graph_holder"> <div id="panel_analytics_posts" class="colstack_graph_holder">
<div class="ct_chart" aria-label="Post Chart"></div> <div class="ct_chart" aria-label="{{lang "panel_statistics_post_counts_chart_aria"}}"></div>
</div> </div>
<div class="colstack_item colstack_head"> <div class="colstack_item colstack_head">
<div class="rowitem"><a>Details</a></div> <div class="rowitem"><a>{{lang "panel_statistics_details_head"}}</a></div>
</div> </div>
<div id="panel_analytics_posts_table" class="colstack_item rowlist" aria-label="Post Table, this has the same information as the post chart"> <div id="panel_analytics_posts_table" class="colstack_item rowlist" aria-label="{{lang "panel_statistics_post_counts_table_aria"}}">
{{range .ViewItems}} {{range .ViewItems}}
<div class="rowitem panel_compactrow editable_parent"> <div class="rowitem panel_compactrow editable_parent">
<a class="panel_upshift unix_to_24_hour_time">{{.Time}}</a> <a class="panel_upshift unix_to_24_hour_time">{{.Time}}</a>
<span class="panel_compacttext to_right">{{.Count}} views</span> <span class="panel_compacttext to_right">{{.Count}}{{lang "panel_statistics_posts_suffix"}}</span>
</div> </div>
{{else}}<div class="rowitem passive rowmsg">No posts could be found in the selected time range</div>{{end}} {{else}}<div class="rowitem passive rowmsg">{{lang "panel_statistics_post_counts_no_post_counts"}}</div>{{end}}
</div> </div>
</main> </main>
</div> </div>

View File

@ -5,14 +5,14 @@
<form id="timeRangeForm" name="timeRangeForm" action="/panel/analytics/referrer/{{.Agent}}" method="get"> <form id="timeRangeForm" name="timeRangeForm" action="/panel/analytics/referrer/{{.Agent}}" method="get">
<div class="colstack_item colstack_head"> <div class="colstack_item colstack_head">
<div class="rowitem"> <div class="rowitem">
<a>{{.Agent}} Views</a> <a>{{.Agent}}{{lang "panel_statistics_views_head_suffix"}}</a>
<select class="timeRangeSelector to_right" name="timeRange"> <select class="timeRangeSelector to_right" name="timeRange">
<option val="one-month"{{if eq .TimeRange "one-month"}} selected{{end}}>1 month</option> <option val="one-month"{{if eq .TimeRange "one-month"}} selected{{end}}>{{lang "panel_statistics_time_range_one_month"}}</option>
<option val="one-week"{{if eq .TimeRange "one-week"}} selected{{end}}>1 week</option> <option val="one-week"{{if eq .TimeRange "one-week"}} selected{{end}}>{{lang "panel_statistics_time_range_one_week"}}</option>
<option val="two-days"{{if eq .TimeRange "two-days"}} selected{{end}}>2 days</option> <option val="two-days"{{if eq .TimeRange "two-days"}} selected{{end}}>{{lang "panel_statistics_time_range_two_days"}}</option>
<option val="one-day"{{if eq .TimeRange "one-day"}} selected{{end}}>1 day</option> <option val="one-day"{{if eq .TimeRange "one-day"}} selected{{end}}>{{lang "panel_statistics_time_range_one_day"}}</option>
<option val="twelve-hours"{{if eq .TimeRange "twelve-hours"}} selected{{end}}>12 hours</option> <option val="twelve-hours"{{if eq .TimeRange "twelve-hours"}} selected{{end}}>{{lang "panel_statistics_time_range_twelve_hours"}}</option>
<option val="six-hours"{{if eq .TimeRange "six-hours"}} selected{{end}}>6 hours</option> <option val="six-hours"{{if eq .TimeRange "six-hours"}} selected{{end}}>{{lang "panel_statistics_time_range_six_hours"}}</option>
</select> </select>
</div> </div>
</div> </div>

View File

@ -5,14 +5,14 @@
<form id="timeRangeForm" name="timeRangeForm" action="/panel/analytics/referrers/" method="get"> <form id="timeRangeForm" name="timeRangeForm" action="/panel/analytics/referrers/" method="get">
<div class="colstack_item colstack_head"> <div class="colstack_item colstack_head">
<div class="rowitem"> <div class="rowitem">
<a>Referrers</a> <a>{{lang "panel_statistics_referrers_head"}}</a>
<select class="timeRangeSelector to_right" name="timeRange"> <select class="timeRangeSelector to_right" name="timeRange">
<option val="one-month"{{if eq .TimeRange "one-month"}} selected{{end}}>1 month</option> <option val="one-month"{{if eq .TimeRange "one-month"}} selected{{end}}>{{lang "panel_statistics_time_range_one_month"}}</option>
<option val="one-week"{{if eq .TimeRange "one-week"}} selected{{end}}>1 week</option> <option val="one-week"{{if eq .TimeRange "one-week"}} selected{{end}}>{{lang "panel_statistics_time_range_one_week"}}</option>
<option val="two-days"{{if eq .TimeRange "two-days"}} selected{{end}}>2 days</option> <option val="two-days"{{if eq .TimeRange "two-days"}} selected{{end}}>{{lang "panel_statistics_time_range_two_days"}}</option>
<option val="one-day"{{if eq .TimeRange "one-day"}} selected{{end}}>1 day</option> <option val="one-day"{{if eq .TimeRange "one-day"}} selected{{end}}>{{lang "panel_statistics_time_range_one_day"}}</option>
<option val="twelve-hours"{{if eq .TimeRange "twelve-hours"}} selected{{end}}>12 hours</option> <option val="twelve-hours"{{if eq .TimeRange "twelve-hours"}} selected{{end}}>{{lang "panel_statistics_time_range_twelve_hours"}}</option>
<option val="six-hours"{{if eq .TimeRange "six-hours"}} selected{{end}}>6 hours</option> <option val="six-hours"{{if eq .TimeRange "six-hours"}} selected{{end}}>{{lang "panel_statistics_time_range_six_hours"}}</option>
</select> </select>
</div> </div>
</div> </div>
@ -21,9 +21,9 @@
{{range .ItemList}} {{range .ItemList}}
<div class="rowitem panel_compactrow editable_parent"> <div class="rowitem panel_compactrow editable_parent">
<a href="/panel/analytics/referrer/{{.Agent}}" class="panel_upshift">{{.Agent}}</a> <a href="/panel/analytics/referrer/{{.Agent}}" class="panel_upshift">{{.Agent}}</a>
<span class="panel_compacttext to_right">{{.Count}} views</span> <span class="panel_compacttext to_right">{{.Count}}{{lang "panel_statistics_views_suffix"}}</span>
</div> </div>
{{else}}<div class="rowitem passive rowmsg">No referrers could be found in the selected time range</div>{{end}} {{else}}<div class="rowitem passive rowmsg">{{lang "panel_statistics_referrers_no_referrers"}}</div>{{end}}
</div> </div>
</main> </main>
</div> </div>

View File

@ -5,14 +5,14 @@
<form id="timeRangeForm" name="timeRangeForm" action="/panel/analytics/route/{{.Route}}" method="get"> <form id="timeRangeForm" name="timeRangeForm" action="/panel/analytics/route/{{.Route}}" method="get">
<div class="colstack_item colstack_head"> <div class="colstack_item colstack_head">
<div class="rowitem"> <div class="rowitem">
<a>{{.Route}} Views</a> <a>{{.Route}}{{lang "panel_statistics_views_head_suffix"}}</a>
<select class="timeRangeSelector to_right" name="timeRange"> <select class="timeRangeSelector to_right" name="timeRange">
<option val="one-month"{{if eq .TimeRange "one-month"}} selected{{end}}>1 month</option> <option val="one-month"{{if eq .TimeRange "one-month"}} selected{{end}}>{{lang "panel_statistics_time_range_one_month"}}</option>
<option val="one-week"{{if eq .TimeRange "one-week"}} selected{{end}}>1 week</option> <option val="one-week"{{if eq .TimeRange "one-week"}} selected{{end}}>{{lang "panel_statistics_time_range_one_week"}}</option>
<option val="two-days"{{if eq .TimeRange "two-days"}} selected{{end}}>2 days</option> <option val="two-days"{{if eq .TimeRange "two-days"}} selected{{end}}>{{lang "panel_statistics_time_range_two_days"}}</option>
<option val="one-day"{{if eq .TimeRange "one-day"}} selected{{end}}>1 day</option> <option val="one-day"{{if eq .TimeRange "one-day"}} selected{{end}}>{{lang "panel_statistics_time_range_one_day"}}</option>
<option val="twelve-hours"{{if eq .TimeRange "twelve-hours"}} selected{{end}}>12 hours</option> <option val="twelve-hours"{{if eq .TimeRange "twelve-hours"}} selected{{end}}>{{lang "panel_statistics_time_range_twelve_hours"}}</option>
<option val="six-hours"{{if eq .TimeRange "six-hours"}} selected{{end}}>6 hours</option> <option val="six-hours"{{if eq .TimeRange "six-hours"}} selected{{end}}>{{lang "panel_statistics_time_range_six_hours"}}</option>
</select> </select>
</div> </div>
</div> </div>
@ -21,13 +21,13 @@
<div class="ct_chart"></div> <div class="ct_chart"></div>
</div> </div>
<div class="colstack_item colstack_head"> <div class="colstack_item colstack_head">
<div class="rowitem"><a>Details</a></div> <div class="rowitem"><a>{{lang "panel_statistics_details_head"}}</a></div>
</div> </div>
<div id="panel_analytics_views_table" class="colstack_item rowlist" aria-label="View Table, this has the same information as the view chart"> <div id="panel_analytics_views_table" class="colstack_item rowlist" aria-label="{{lang "panel_statistics_route_views_table_aria"}}">
{{range .ViewItems}} {{range .ViewItems}}
<div class="rowitem panel_compactrow editable_parent"> <div class="rowitem panel_compactrow editable_parent">
<a class="panel_upshift unix_to_24_hour_time">{{.Time}}</a> <a class="panel_upshift unix_to_24_hour_time">{{.Time}}</a>
<span class="panel_compacttext to_right">{{.Count}} views</span> <span class="panel_compacttext to_right">{{.Count}}{{lang "panel_statistics_views_suffix"}}</span>
</div> </div>
{{end}} {{end}}
</div> </div>

View File

@ -5,14 +5,14 @@
<form id="timeRangeForm" name="timeRangeForm" action="/panel/analytics/routes/" method="get"> <form id="timeRangeForm" name="timeRangeForm" action="/panel/analytics/routes/" method="get">
<div class="colstack_item colstack_head"> <div class="colstack_item colstack_head">
<div class="rowitem"> <div class="rowitem">
<a>Routes</a> <a>{{lang "panel_statistics_routes_head"}}</a>
<select class="timeRangeSelector to_right" name="timeRange"> <select class="timeRangeSelector to_right" name="timeRange">
<option val="one-month"{{if eq .TimeRange "one-month"}} selected{{end}}>1 month</option> <option val="one-month"{{if eq .TimeRange "one-month"}} selected{{end}}>{{lang "panel_statistics_time_range_one_month"}}</option>
<option val="one-week"{{if eq .TimeRange "one-week"}} selected{{end}}>1 week</option> <option val="one-week"{{if eq .TimeRange "one-week"}} selected{{end}}>{{lang "panel_statistics_time_range_one_week"}}</option>
<option val="two-days"{{if eq .TimeRange "two-days"}} selected{{end}}>2 days</option> <option val="two-days"{{if eq .TimeRange "two-days"}} selected{{end}}>{{lang "panel_statistics_time_range_two_days"}}</option>
<option val="one-day"{{if eq .TimeRange "one-day"}} selected{{end}}>1 day</option> <option val="one-day"{{if eq .TimeRange "one-day"}} selected{{end}}>{{lang "panel_statistics_time_range_one_day"}}</option>
<option val="twelve-hours"{{if eq .TimeRange "twelve-hours"}} selected{{end}}>12 hours</option> <option val="twelve-hours"{{if eq .TimeRange "twelve-hours"}} selected{{end}}>{{lang "panel_statistics_time_range_twelve_hours"}}</option>
<option val="six-hours"{{if eq .TimeRange "six-hours"}} selected{{end}}>6 hours</option> <option val="six-hours"{{if eq .TimeRange "six-hours"}} selected{{end}}>{{lang "panel_statistics_time_range_six_hours"}}</option>
</select> </select>
</div> </div>
</div> </div>
@ -21,9 +21,9 @@
{{range .ItemList}} {{range .ItemList}}
<div class="rowitem panel_compactrow editable_parent"> <div class="rowitem panel_compactrow editable_parent">
<a href="/panel/analytics/route/{{.Route}}" class="panel_upshift">{{.Route}}</a> <a href="/panel/analytics/route/{{.Route}}" class="panel_upshift">{{.Route}}</a>
<span class="panel_compacttext to_right">{{.Count}} views</span> <span class="panel_compacttext to_right">{{.Count}}{{lang "panel_statistics_views_suffix"}}</span>
</div> </div>
{{else}}<div class="rowitem passive rowmsg">No route view counts could be found in the selected time range</div>{{end}} {{else}}<div class="rowitem passive rowmsg">{{lang "panel_statistics_routes_no_routes"}}</div>{{end}}
</div> </div>
</main> </main>
</div> </div>

View File

@ -5,14 +5,14 @@
<form id="timeRangeForm" name="timeRangeForm" action="/panel/analytics/system/{{.Agent}}" method="get"> <form id="timeRangeForm" name="timeRangeForm" action="/panel/analytics/system/{{.Agent}}" method="get">
<div class="colstack_item colstack_head"> <div class="colstack_item colstack_head">
<div class="rowitem"> <div class="rowitem">
<a>{{.FriendlyAgent}} Views</a> <a>{{.FriendlyAgent}}{{lang "panel_statistics_views_head_suffix"}}</a>
<select class="timeRangeSelector to_right" name="timeRange"> <select class="timeRangeSelector to_right" name="timeRange">
<option val="one-month"{{if eq .TimeRange "one-month"}} selected{{end}}>1 month</option> <option val="one-month"{{if eq .TimeRange "one-month"}} selected{{end}}>{{lang "panel_statistics_time_range_one_month"}}</option>
<option val="one-week"{{if eq .TimeRange "one-week"}} selected{{end}}>1 week</option> <option val="one-week"{{if eq .TimeRange "one-week"}} selected{{end}}>{{lang "panel_statistics_time_range_one_week"}}</option>
<option val="two-days"{{if eq .TimeRange "two-days"}} selected{{end}}>2 days</option> <option val="two-days"{{if eq .TimeRange "two-days"}} selected{{end}}>{{lang "panel_statistics_time_range_two_days"}}</option>
<option val="one-day"{{if eq .TimeRange "one-day"}} selected{{end}}>1 day</option> <option val="one-day"{{if eq .TimeRange "one-day"}} selected{{end}}>{{lang "panel_statistics_time_range_one_day"}}</option>
<option val="twelve-hours"{{if eq .TimeRange "twelve-hours"}} selected{{end}}>12 hours</option> <option val="twelve-hours"{{if eq .TimeRange "twelve-hours"}} selected{{end}}>{{lang "panel_statistics_time_range_twelve_hours"}}</option>
<option val="six-hours"{{if eq .TimeRange "six-hours"}} selected{{end}}>6 hours</option> <option val="six-hours"{{if eq .TimeRange "six-hours"}} selected{{end}}>{{lang "panel_statistics_time_range_six_hours"}}</option>
</select> </select>
</div> </div>
</div> </div>

View File

@ -5,14 +5,14 @@
<form id="timeRangeForm" name="timeRangeForm" action="/panel/analytics/systems/" method="get"> <form id="timeRangeForm" name="timeRangeForm" action="/panel/analytics/systems/" method="get">
<div class="colstack_item colstack_head"> <div class="colstack_item colstack_head">
<div class="rowitem"> <div class="rowitem">
<a>Operating Systems</a> <a>{{lang "panel_statistics_operating_systems_head"}}</a>
<select class="timeRangeSelector to_right" name="timeRange"> <select class="timeRangeSelector to_right" name="timeRange">
<option val="one-month"{{if eq .TimeRange "one-month"}} selected{{end}}>1 month</option> <option val="one-month"{{if eq .TimeRange "one-month"}} selected{{end}}>{{lang "panel_statistics_time_range_one_month"}}</option>
<option val="one-week"{{if eq .TimeRange "one-week"}} selected{{end}}>1 week</option> <option val="one-week"{{if eq .TimeRange "one-week"}} selected{{end}}>{{lang "panel_statistics_time_range_one_week"}}</option>
<option val="two-days"{{if eq .TimeRange "two-days"}} selected{{end}}>2 days</option> <option val="two-days"{{if eq .TimeRange "two-days"}} selected{{end}}>{{lang "panel_statistics_time_range_two_days"}}</option>
<option val="one-day"{{if eq .TimeRange "one-day"}} selected{{end}}>1 day</option> <option val="one-day"{{if eq .TimeRange "one-day"}} selected{{end}}>{{lang "panel_statistics_time_range_one_day"}}</option>
<option val="twelve-hours"{{if eq .TimeRange "twelve-hours"}} selected{{end}}>12 hours</option> <option val="twelve-hours"{{if eq .TimeRange "twelve-hours"}} selected{{end}}>{{lang "panel_statistics_time_range_twelve_hours"}}</option>
<option val="six-hours"{{if eq .TimeRange "six-hours"}} selected{{end}}>6 hours</option> <option val="six-hours"{{if eq .TimeRange "six-hours"}} selected{{end}}>{{lang "panel_statistics_time_range_six_hours"}}</option>
</select> </select>
</div> </div>
</div> </div>
@ -21,9 +21,9 @@
{{range .ItemList}} {{range .ItemList}}
<div class="rowitem panel_compactrow editable_parent"> <div class="rowitem panel_compactrow editable_parent">
<a href="/panel/analytics/system/{{.Agent}}" class="panel_upshift">{{.FriendlyAgent}}</a> <a href="/panel/analytics/system/{{.Agent}}" class="panel_upshift">{{.FriendlyAgent}}</a>
<span class="panel_compacttext to_right">{{.Count}} views</span> <span class="panel_compacttext to_right">{{.Count}}{{lang "panel_statistics_views_suffix"}}</span>
</div> </div>
{{else}}<div class="rowitem passive rowmsg">No operating systems could be found in the selected time range</div>{{end}} {{else}}<div class="rowitem passive rowmsg">{{lang "panel_statistics_operating_systems_no_operating_systems"}}</div>{{end}}
</div> </div>
</main> </main>
</div> </div>

View File

@ -5,29 +5,29 @@
<form id="timeRangeForm" name="timeRangeForm" action="/panel/analytics/topics/" method="get"> <form id="timeRangeForm" name="timeRangeForm" action="/panel/analytics/topics/" method="get">
<div class="colstack_item colstack_head"> <div class="colstack_item colstack_head">
<div class="rowitem"> <div class="rowitem">
<a>Topic Counts</a> <a>{{lang "panel_statistics_topic_counts_head"}}</a>
<select class="timeRangeSelector to_right" name="timeRange"> <select class="timeRangeSelector to_right" name="timeRange">
<option val="one-month"{{if eq .TimeRange "one-month"}} selected{{end}}>1 month</option> <option val="one-month"{{if eq .TimeRange "one-month"}} selected{{end}}>{{lang "panel_statistics_time_range_one_month"}}</option>
<option val="one-week"{{if eq .TimeRange "one-week"}} selected{{end}}>1 week</option> <option val="one-week"{{if eq .TimeRange "one-week"}} selected{{end}}>{{lang "panel_statistics_time_range_one_week"}}</option>
<option val="two-days"{{if eq .TimeRange "two-days"}} selected{{end}}>2 days</option> <option val="two-days"{{if eq .TimeRange "two-days"}} selected{{end}}>{{lang "panel_statistics_time_range_two_days"}}</option>
<option val="one-day"{{if eq .TimeRange "one-day"}} selected{{end}}>1 day</option> <option val="one-day"{{if eq .TimeRange "one-day"}} selected{{end}}>{{lang "panel_statistics_time_range_one_day"}}</option>
<option val="twelve-hours"{{if eq .TimeRange "twelve-hours"}} selected{{end}}>12 hours</option> <option val="twelve-hours"{{if eq .TimeRange "twelve-hours"}} selected{{end}}>{{lang "panel_statistics_time_range_twelve_hours"}}</option>
<option val="six-hours"{{if eq .TimeRange "six-hours"}} selected{{end}}>6 hours</option> <option val="six-hours"{{if eq .TimeRange "six-hours"}} selected{{end}}>{{lang "panel_statistics_time_range_six_hours"}}</option>
</select> </select>
</div> </div>
</div> </div>
</form> </form>
<div id="panel_analytics_topics" class="colstack_graph_holder"> <div id="panel_analytics_topics" class="colstack_graph_holder">
<div class="ct_chart" aria-label="Topic Chart"></div> <div class="ct_chart" aria-label="{{lang "panel_statistics_topic_counts_chart_aria"}}"></div>
</div> </div>
<div class="colstack_item colstack_head"> <div class="colstack_item colstack_head">
<div class="rowitem"><a>Details</a></div> <div class="rowitem"><a>{{lang "panel_statistics_details_head"}}</a></div>
</div> </div>
<div id="panel_analytics_topics_table" class="colstack_item rowlist" aria-label="Topic Table, this has the same information as the topic chart"> <div id="panel_analytics_topics_table" class="colstack_item rowlist" aria-label="{{lang "panel_statistics_topic_counts_table_aria"}}">
{{range .ViewItems}} {{range .ViewItems}}
<div class="rowitem panel_compactrow editable_parent"> <div class="rowitem panel_compactrow editable_parent">
<a class="panel_upshift unix_to_24_hour_time">{{.Time}}</a> <a class="panel_upshift unix_to_24_hour_time">{{.Time}}</a>
<span class="panel_compacttext to_right">{{.Count}} views</span> <span class="panel_compacttext to_right">{{.Count}}{{lang "panel_statistics_topics_suffix"}}</span>
</div> </div>
{{end}} {{end}}
</div> </div>

View File

@ -5,29 +5,29 @@
<form id="timeRangeForm" name="timeRangeForm" action="/panel/analytics/views/" method="get"> <form id="timeRangeForm" name="timeRangeForm" action="/panel/analytics/views/" method="get">
<div class="colstack_item colstack_head"> <div class="colstack_item colstack_head">
<div class="rowitem"> <div class="rowitem">
<a>Requests</a> <a>{{lang "panel_statistics_requests_head"}}</a>
<select class="timeRangeSelector to_right" name="timeRange"> <select class="timeRangeSelector to_right" name="timeRange">
<option val="one-month"{{if eq .TimeRange "one-month"}} selected{{end}}>1 month</option> <option val="one-month"{{if eq .TimeRange "one-month"}} selected{{end}}>{{lang "panel_statistics_time_range_one_month"}}</option>
<option val="one-week"{{if eq .TimeRange "one-week"}} selected{{end}}>1 week</option> <option val="one-week"{{if eq .TimeRange "one-week"}} selected{{end}}>{{lang "panel_statistics_time_range_one_week"}}</option>
<option val="two-days"{{if eq .TimeRange "two-days"}} selected{{end}}>2 days</option> <option val="two-days"{{if eq .TimeRange "two-days"}} selected{{end}}>{{lang "panel_statistics_time_range_two_days"}}</option>
<option val="one-day"{{if eq .TimeRange "one-day"}} selected{{end}}>1 day</option> <option val="one-day"{{if eq .TimeRange "one-day"}} selected{{end}}>{{lang "panel_statistics_time_range_one_day"}}</option>
<option val="twelve-hours"{{if eq .TimeRange "twelve-hours"}} selected{{end}}>12 hours</option> <option val="twelve-hours"{{if eq .TimeRange "twelve-hours"}} selected{{end}}>{{lang "panel_statistics_time_range_twelve_hours"}}</option>
<option val="six-hours"{{if eq .TimeRange "six-hours"}} selected{{end}}>6 hours</option> <option val="six-hours"{{if eq .TimeRange "six-hours"}} selected{{end}}>{{lang "panel_statistics_time_range_six_hours"}}</option>
</select> </select>
</div> </div>
</div> </div>
</form> </form>
<div id="panel_analytics_views" class="colstack_graph_holder"> <div id="panel_analytics_views" class="colstack_graph_holder">
<div class="ct_chart" aria-label="View Chart"></div> <div class="ct_chart" aria-label="{{lang "panel_statistics_requests_chart_aria"}}"></div>
</div> </div>
<div class="colstack_item colstack_head"> <div class="colstack_item colstack_head">
<div class="rowitem"><a>Details</a></div> <div class="rowitem"><a>{{lang "panel_statistics_details_head"}}</a></div>
</div> </div>
<div id="panel_analytics_views_table" class="colstack_item rowlist" aria-label="View Table, this has the same information as the view chart"> <div id="panel_analytics_views_table" class="colstack_item rowlist" aria-label="{{lang "panel_statistics_requests_table_aria"}}">
{{range .ViewItems}} {{range .ViewItems}}
<div class="rowitem panel_compactrow editable_parent"> <div class="rowitem panel_compactrow editable_parent">
<a class="panel_upshift unix_to_24_hour_time">{{.Time}}</a> <a class="panel_upshift unix_to_24_hour_time">{{.Time}}</a>
<span class="panel_compacttext to_right">{{.Count}} views</span> <span class="panel_compacttext to_right">{{.Count}}{{lang "panel_statistics_views_suffix"}}</span>
</div> </div>
{{end}} {{end}}
</div> </div>

View File

@ -3,18 +3,18 @@
{{template "panel-menu.html" . }} {{template "panel-menu.html" . }}
<main class="colstack_right"> <main class="colstack_right">
<div class="colstack_item colstack_head"> <div class="colstack_item colstack_head">
<div class="rowitem"><h1>Backups</h1></div> <div class="rowitem"><h1>{{lang "panel_backups_head"}}</h1></div>
</div> </div>
<div id="panel_backups" class="colstack_item rowlist"> <div id="panel_backups" class="colstack_item rowlist">
{{range .Backups}} {{range .Backups}}
<div class="rowitem panel_compactrow"> <div class="rowitem panel_compactrow">
<span>{{.SQLURL}}</span> <span>{{.SQLURL}}</span>
<span class="panel_floater"> <span class="panel_floater">
<a href="/panel/backups/{{.SQLURL}}" class="panel_tag panel_right_button">Download</a> <a href="/panel/backups/{{.SQLURL}}" class="panel_tag panel_right_button">{{lang "panel_backups_download"}}</a>
</span> </span>
</div> </div>
{{else}} {{else}}
<div class="rowitem rowmsg">There aren't any backups available at this time.</div> <div class="rowitem rowmsg">{{lang "panel_backups_no_backups"}}</div>
{{end}} {{end}}
</div> </div>
</main> </main>

View File

@ -3,7 +3,7 @@
{{template "panel-menu.html" . }} {{template "panel-menu.html" . }}
<main id="panel_dashboard_right" class="colstack_right"> <main id="panel_dashboard_right" class="colstack_right">
<div class="colstack_item colstack_head"> <div class="colstack_item colstack_head">
<div class="rowitem"><a>Dashboard</a></div> <div class="rowitem"><a>{{lang "panel_dashboard_head"}}</a></div>
</div> </div>
<div id="panel_dashboard" class="colstack_grid"> <div id="panel_dashboard" class="colstack_grid">
{{range .GridItems}} {{range .GridItems}}

View File

@ -3,12 +3,12 @@
{{template "panel-menu.html" . }} {{template "panel-menu.html" . }}
<main id="panel_dashboard_right" class="colstack_right"> <main id="panel_dashboard_right" class="colstack_right">
<div class="colstack_item colstack_head"> <div class="colstack_item colstack_head">
<div class="rowitem"><a>Debug</a></div> <div class="rowitem"><a>{{lang "panel_debug_head"}}</a></div>
</div> </div>
<div id="panel_debug" class="colstack_grid"> <div id="panel_debug" class="colstack_grid">
<div class="grid_item grid_stat"><span>Uptime</span></div> <div class="grid_item grid_stat"><span>{{lang "panel_debug_uptime_label"}}</span></div>
<div class="grid_item grid_stat"><span>Open DB Conns</span></div> <div class="grid_item grid_stat"><span>{{lang "panel_debug_open_database_connections_label"}}</span></div>
<div class="grid_item grid_stat"><span>Adapter</span></div> <div class="grid_item grid_stat"><span>{{lang "panel_debug_adapter_label"}}</span></div>
<div class="grid_item grid_stat"><span>{{.Uptime}}</span></div> <div class="grid_item grid_stat"><span>{{.Uptime}}</span></div>
<div class="grid_item grid_stat"><span>{{.OpenConns}}</span></div> <div class="grid_item grid_stat"><span>{{.OpenConns}}</span></div>

View File

@ -9,7 +9,7 @@
<main class="colstack_right"> <main class="colstack_right">
<div class="colstack_item colstack_head"> <div class="colstack_item colstack_head">
<div class="rowitem"><h1>Forums</h1></div> <div class="rowitem"><h1>{{lang "panel_forums_head"}}</h1></div>
</div> </div>
<div id="panel_forums" class="colstack_item rowlist"> <div id="panel_forums" class="colstack_item rowlist">
{{range .ItemList}} {{range .ItemList}}
@ -20,53 +20,53 @@
<br /><span data-field="forum_desc" data-type="text" class="editable_block forum_desc rowsmall">{{.Desc}}</span> <br /><span data-field="forum_desc" data-type="text" class="editable_block forum_desc rowsmall">{{.Desc}}</span>
</span> </span>
<span class="panel_floater"> <span class="panel_floater">
<span data-field="forum_active" data-type="list" class="panel_tag editable_block forum_active {{if .Active}}forum_active_Show" data-value="1{{else}}forum_active_Hide" data-value="0{{end}}" title="Hidden"></span> <span data-field="forum_active" data-type="list" class="panel_tag editable_block forum_active {{if .Active}}forum_active_Show" data-value="1{{else}}forum_active_Hide" data-value="0{{end}}" title="{{lang "panel_forums_hidden"}}"></span>
<span data-field="forum_preset" data-type="list" data-value="{{.Preset}}" class="panel_tag editable_block forum_preset forum_preset_{{.Preset}}" title="{{.PresetLang}}"></span> <span data-field="forum_preset" data-type="list" data-value="{{.Preset}}" class="panel_tag editable_block forum_preset forum_preset_{{.Preset}}" title="{{.PresetLang}}"></span>
</span> </span>
<span class="panel_buttons"> <span class="panel_buttons">
<a class="panel_tag edit_fields hide_on_edit panel_right_button edit_button" aria-label="Edit Forum"></a> <a class="panel_tag edit_fields hide_on_edit panel_right_button edit_button" title="{{lang "panel_forums_edit_button_tooltip"}}" aria-label="{{lang "panel_forums_edit_button_aria"}}"></a>
<a class="panel_right_button" href="/panel/forums/edit/submit/{{.ID}}"><button class='panel_tag submit_edit show_on_edit' type='submit'>Update</button></a> <a class="panel_right_button" href="/panel/forums/edit/submit/{{.ID}}"><button class='panel_tag submit_edit show_on_edit' type='submit'>{{lang "panel_forums_update_button"}}</button></a>
{{if gt .ID 1}}<a href="/panel/forums/delete/{{.ID}}?session={{$.CurrentUser.Session}}" class="panel_tag panel_right_button hide_on_edit delete_button" aria-label="Delete Forum"></a>{{end}} {{if gt .ID 1}}<a href="/panel/forums/delete/{{.ID}}?session={{$.CurrentUser.Session}}" class="panel_tag panel_right_button hide_on_edit delete_button" title="{{lang "panel_forums_delete_button_tooltip"}}" aria-label="{{lang "panel_forums_delete_button_aria"}}"></a>{{end}}
<a href="/panel/forums/edit/{{.ID}}" class="panel_tag panel_right_button show_on_edit"><button>Full Edit</button></a> <a href="/panel/forums/edit/{{.ID}}" class="panel_tag panel_right_button show_on_edit"><button>{{lang "panel_forums_full_edit_button"}}</button></a>
</span> </span>
</div> </div>
{{end}} {{end}}
</div> </div>
<div class="colstack_item colstack_head"> <div class="colstack_item colstack_head">
<div class="rowitem"><h1>Add Forum</h1></div> <div class="rowitem"><h1>{{lang "panel_forums_create_head"}}</h1></div>
</div> </div>
<div class="colstack_item"> <div class="colstack_item">
<form action="/panel/forums/create/?session={{.CurrentUser.Session}}" method="post"> <form action="/panel/forums/create/?session={{.CurrentUser.Session}}" method="post">
<div class="formrow"> <div class="formrow">
<div class="formitem formlabel"><a>Name</a></div> <div class="formitem formlabel"><a>{{lang "panel_forums_create_name_label"}}</a></div>
<div class="formitem"><input name="forum-name" type="text" placeholder="Super Secret Forum" /></div> <div class="formitem"><input name="forum-name" type="text" placeholder="{{lang "panel_forums_create_name"}}" /></div>
</div> </div>
<div class="formrow"> <div class="formrow">
<div class="formitem formlabel"><a>Description</a></div> <div class="formitem formlabel"><a>{{lang "panel_forums_create_description_label"}}</a></div>
<div class="formitem"><input name="forum-desc" type="text" placeholder="Where all the super secret stuff happens" /></div> <div class="formitem"><input name="forum-desc" type="text" placeholder="{{lang "panel_forums_create_description"}}" /></div>
</div> </div>
<div class="formrow"> <div class="formrow">
<div class="formitem formlabel"><a>Active</a></div> <div class="formitem formlabel"><a>{{lang "panel_forums_active_label"}}</a></div>
<div class="formitem"><select name="forum-active"> <div class="formitem"><select name="forum-active">
<option selected value="1">Yes</option> <option selected value="1">{{lang "option_yes"}}</option>
<option value="0">No</option> <option value="0">{{lang "option_no"}}</option>
</select></div> </select></div>
</div> </div>
<div class="formrow"> <div class="formrow">
<div class="formitem formlabel"><a>Preset</a></div> <div class="formitem formlabel"><a>{{lang "panel_forums_preset_label"}}</a></div>
<div class="formitem"><select name="forum-preset"> <div class="formitem"><select name="forum-preset">
<option selected value="all">Everyone</option> <option selected value="all">{{lang "panel_preset_everyone"}}</option>
<option value="announce">Announcements</option> <option value="announce">{{lang "panel_preset_announcements"}}</option>
<option value="members">Member Only</option> <option value="members">{{lang "panel_preset_member_only"}}</option>
<option value="staff">Staff Only</option> <option value="staff">{{lang "panel_preset_staff_only"}}</option>
<option value="admins">Admin Only</option> <option value="admins">{{lang "panel_preset_admin_only"}}</option>
<option value="archive">Archive</option> <option value="archive">{{lang "panel_preset_archive"}}</option>
<option value="custom">Custom</option> <option value="custom">{{lang "panel_preset_custom"}}</option>
</select></div> </select></div>
</div> </div>
<div class="formrow"> <div class="formrow">
<div class="formitem"><button name="panel-button" class="formbutton">Add Forum</button></div> <div class="formitem"><button name="panel-button" class="formbutton">{{lang "panel_forums_create_button"}}</button></div>
</div> </div>
</form> </form>
</div> </div>

View File

@ -4,41 +4,35 @@
{{template "panel-menu.html" . }} {{template "panel-menu.html" . }}
<main class="colstack_right"> <main class="colstack_right">
<div class="colstack_item colstack_head"> <div class="colstack_item colstack_head">
<div class="rowitem"><h1>Groups</h1></div> <div class="rowitem"><h1>{{lang "panel_groups_head"}}</h1></div>
</div> </div>
<div id="panel_groups" class="colstack_item rowlist"> <div id="panel_groups" class="colstack_item rowlist">
{{range .ItemList}} {{range .ItemList}}
<div class="rowitem panel_compactrow editable_parent"> <div class="rowitem panel_compactrow editable_parent">
<a href="/panel/groups/edit/{{.ID}}" class="panel_upshift">{{.Name}}</a> <a href="/panel/groups/edit/{{.ID}}" class="panel_upshift">{{.Name}}</a>
<span class="panel_floater"> <span class="panel_floater">
{{if .RankClass}}<a class="panel_tag panel_rank_tag panel_rank_tag_{{.RankClass}}" title="{{.Rank}}"></a> {{if .RankClass}}<a class="panel_tag panel_rank_tag panel_rank_tag_{{.RankClass}}" title="{{.Rank}}" aria-label="{{lang "panel_groups_rank_prefix"}}{{.Rank}}"></a>
{{else}}<span class="panel_tag">{{.Rank}}</span>{{end}} {{else}}<span class="panel_tag">{{.Rank}}</span>{{end}}
{{if .CanEdit}}<a href="/panel/groups/edit/{{.ID}}" class="panel_tag panel_right_button edit_button" aria-label="Edit Group"></a>{{end}} {{if .CanEdit}}<a href="/panel/groups/edit/{{.ID}}" class="panel_tag panel_right_button edit_button" aria-label="{{lang "panel_groups_edit_group_button_aria"}}"></a>{{end}}
</span> </span>
</div> </div>
{{end}} {{end}}
</div> </div>
{{if gt .LastPage 1}} {{if gt .LastPage 1}}
<div class="pageset"> {{template "paginator.html" . }}
{{if gt .Page 1}}<div class="pageitem"><a href="?page={{subtract .Page 1}}">Prev</a></div>{{end}}
{{range .PageList}}
<div class="pageitem"><a href="?page={{.}}">{{.}}</a></div>
{{end}}
{{if ne .LastPage .Page}}<div class="pageitem"><a href="?page={{add .Page 1}}">Next</a></div>{{end}}
</div>
{{end}} {{end}}
<div class="colstack_item colstack_head"> <div class="colstack_item colstack_head">
<div class="rowitem"><h1>Create Group</h1></div> <div class="rowitem"><h1>{{lang "panel_groups_create_head"}}</h1></div>
</div> </div>
<div class="colstack_item the_form"> <div class="colstack_item the_form">
<form action="/panel/groups/create/?session={{.CurrentUser.Session}}" method="post"> <form action="/panel/groups/create/?session={{.CurrentUser.Session}}" method="post">
<div class="formrow"> <div class="formrow">
<div class="formitem formlabel"><a>Name</a></div> <div class="formitem formlabel"><a>{{lang "panel_groups_create_name"}}</a></div>
<div class="formitem"><input name="group-name" type="text" placeholder="Administrator" /></div> <div class="formitem"><input name="group-name" type="text" placeholder="{{lang "panel_groups_create_name_placeholder"}}" /></div>
</div> </div>
<div class="formrow"> <div class="formrow">
<div class="formitem formlabel"><a>Type</a></div> <div class="formitem formlabel"><a>{{lang "panel_groups_create_type"}}</a></div>
<div class="formitem"> <div class="formitem">
<select name="group-type"{{if not .CurrentUser.Perms.EditGroupGlobalPerms}} disabled{{end}}> <select name="group-type"{{if not .CurrentUser.Perms.EditGroupGlobalPerms}} disabled{{end}}>
<option selected>Member</option> <option selected>Member</option>
@ -49,11 +43,11 @@
</div> </div>
</div> </div>
<div class="formrow"> <div class="formrow">
<div class="formitem formlabel"><a>Tag</a></div> <div class="formitem formlabel"><a>{{lang "panel_groups_create_tag"}}</a></div>
<div class="formitem"><input name="group-tag" type="text" /></div> <div class="formitem"><input name="group-tag" type="text" /></div>
</div> </div>
<div class="formrow"> <div class="formrow">
<div class="formitem"><button name="panel-button" class="formbutton">Add Group</button></div> <div class="formitem"><button name="panel-button" class="formbutton">{{lang "panel_groups_create_create_group_button"}}</button></div>
</div> </div>
</form> </form>
</div> </div>

View File

@ -2,17 +2,17 @@
<div class="colstack panel_stack"> <div class="colstack panel_stack">
<nav class="colstack_left" aria-label="The control panel menu"> <nav class="colstack_left" aria-label="The control panel menu">
<div class="colstack_item colstack_head submenu_fallback"> <div class="colstack_item colstack_head submenu_fallback">
<div class="rowitem"><a href="/panel/logs/mod/">Logs</a></div> <div class="rowitem"><a href="/panel/logs/mod/">{{lang "panel_logs_menu_head"}}</a></div>
</div> </div>
<div class="colstack_item rowmenu submenu_fallback"> <div class="colstack_item rowmenu submenu_fallback">
<div class="rowitem passive"><a href="/panel/logs/mod/">Moderation Logs</a></div> <div class="rowitem passive"><a href="/panel/logs/mod/">{{lang "panel_logs_menu_moderation"}}</a></div>
{{if .CurrentUser.Perms.ViewAdminLogs}}<div class="rowitem passive"><a>Administration Logs</a></div>{{end}} {{if .CurrentUser.Perms.ViewAdminLogs}}<div class="rowitem passive"><a>{{lang "panel_logs_menu_administration"}}</a></div>{{end}}
</div> </div>
{{template "panel-inner-menu.html" . }} {{template "panel-inner-menu.html" . }}
</nav> </nav>
<main class="colstack_right"> <main class="colstack_right">
<div class="colstack_item colstack_head"> <div class="colstack_item colstack_head">
<div class="rowitem"><h1>Moderation Logs</h1></div> <div class="rowitem"><h1>{{lang "panel_logs_moderation_head"}}</h1></div>
</div> </div>
<div id="panel_modlogs" class="colstack_item rowlist"> <div id="panel_modlogs" class="colstack_item rowlist">
{{range .Logs}} {{range .Logs}}
@ -29,13 +29,7 @@
{{end}} {{end}}
</div> </div>
{{if gt .LastPage 1}} {{if gt .LastPage 1}}
<div class="pageset"> {{template "paginator.html" . }}
{{if gt .Page 1}}<div class="pageitem"><a href="?page={{subtract .Page 1}}" aria-label="Previous Page">Prev</a></div>{{end}}
{{range .PageList}}
<div class="pageitem"><a href="?page={{.}}" aria-label="Page {{.}}">{{.}}</a></div>
{{end}}
{{if ne .LastPage .Page}}<div class="pageitem"><a href="?page={{add .Page 1}}" aria-label="Next Page">Next</a></div>{{end}}
</div>
{{end}} {{end}}
</main> </main>
</div> </div>

View File

@ -4,20 +4,20 @@
{{template "panel-menu.html" . }} {{template "panel-menu.html" . }}
<main class="colstack_right"> <main class="colstack_right">
<div class="colstack_item colstack_head"> <div class="colstack_item colstack_head">
<div class="rowitem"><h1>Plugins</h1></div> <div class="rowitem"><h1>{{lang "panel_plugins_head"}}</h1></div>
</div> </div>
<div id="panel_plugins" class="colstack_item complex_rowlist"> <div id="panel_plugins" class="colstack_item complex_rowlist">
{{range .ItemList}} {{range .ItemList}}
<div class="rowitem editable_parent"> <div class="rowitem editable_parent">
<a {{if .URL}}href="{{.URL}}" {{end}}class="editable_block" class="panel_upshift">{{.Name}}</a><br /> <a {{if .URL}}href="{{.URL}}" {{end}}class="editable_block" class="panel_upshift">{{.Name}}</a><br />
<small style="margin-left: 2px;">Author: {{.Author}}</small> <small style="margin-left: 2px;">{{lang "panel_plugins_author_prefix"}}{{.Author}}</small>
<span style="float: right;"> <span style="float: right;">
{{if .Settings}}<a href="/panel/settings/" class="panel_tag">Settings</a>{{end}} {{if .Settings}}<a href="/panel/settings/" class="panel_tag">{{lang "panel_plugins_settings"}}</a>{{end}}
{{if .Active}}<a href="/panel/plugins/deactivate/{{.UName}}?session={{$.CurrentUser.Session}}" class="panel_tag">Deactivate</a> {{if .Active}}<a href="/panel/plugins/deactivate/{{.UName}}?session={{$.CurrentUser.Session}}" class="panel_tag">{{lang "panel_plugins_deactivate"}}</a>
{{else if .Installable}} {{else if .Installable}}
{{/** TODO: Write a custom template interpreter to fix this nonsense **/}} {{/** TODO: Write a custom template interpreter to fix this nonsense **/}}
{{if .Installed}}<a href="/panel/plugins/activate/{{.UName}}?session={{$.CurrentUser.Session}}" class="panel_tag">Activate</a>{{else}}<a href="/panel/plugins/install/{{.UName}}?session={{$.CurrentUser.Session}}" class="panel_tag">Install</a>{{end}} {{if .Installed}}<a href="/panel/plugins/activate/{{.UName}}?session={{$.CurrentUser.Session}}" class="panel_tag">{{lang "panel_plugins_activate"}}</a>{{else}}<a href="/panel/plugins/install/{{.UName}}?session={{$.CurrentUser.Session}}" class="panel_tag">{{lang "panel_plugins_install"}}</a>{{end}}
{{else}}<a href="/panel/plugins/activate/{{.UName}}?session={{$.CurrentUser.Session}}" class="panel_tag">Activate</a>{{end}} {{else}}<a href="/panel/plugins/activate/{{.UName}}?session={{$.CurrentUser.Session}}" class="panel_tag">{{lang "panel_plugins_activate"}}</a>{{end}}
</span> </span>
</div> </div>
{{end}} {{end}}

View File

@ -4,17 +4,17 @@
{{template "panel-menu.html" . }} {{template "panel-menu.html" . }}
<main class="colstack_right"> <main class="colstack_right">
<div class="colstack_item colstack_head"> <div class="colstack_item colstack_head">
<div class="rowitem"><h1>Edit Setting</h1></div> <div class="rowitem"><h1>{{lang "panel_setting_head"}}</h1></div>
</div> </div>
<div id="panel_setting" class="colstack_item"> <div id="panel_setting" class="colstack_item">
<form action="/panel/settings/edit/submit/{{.Something.Name}}?session={{.CurrentUser.Session}}" method="post"> <form action="/panel/settings/edit/submit/{{.Something.Name}}?session={{.CurrentUser.Session}}" method="post">
<div class="formrow"> <div class="formrow">
<div class="formitem formlabel"><a>Setting Name</a></div> <div class="formitem formlabel"><a>{{lang "panel_setting_name"}}</a></div>
<div class="formitem formlabel">{{.Something.Name}}</div> <div class="formitem formlabel">{{.Something.Name}}</div>
</div> </div>
{{if eq .Something.Type "list"}} {{if eq .Something.Type "list"}}
<div class="formrow"> <div class="formrow">
<div class="formitem formlabel"><a>Setting Value</a></div> <div class="formitem formlabel"><a>{{lang "panel_setting_value"}}</a></div>
<div class="formitem"> <div class="formitem">
<select name="setting-value"> <select name="setting-value">
{{range .ItemList}}<option{{if .Selected}} selected{{end}} value="{{.Value}}">{{.Label}}</option>{{end}} {{range .ItemList}}<option{{if .Selected}} selected{{end}} value="{{.Value}}">{{.Label}}</option>{{end}}
@ -23,15 +23,15 @@
</div> </div>
{{else if eq .Something.Type "bool"}} {{else if eq .Something.Type "bool"}}
<div class="formrow"> <div class="formrow">
<div class="formitem formlabel"><a>Setting Value</a></div> <div class="formitem formlabel"><a>{{lang "panel_setting_value"}}</a></div>
<div class="formitem"><input name="setting-value" type="checkbox"{{if eq .Something.Content "1"}} checked{{end}} /></div> <div class="formitem"><input name="setting-value" type="checkbox"{{if eq .Something.Content "1"}} checked{{end}} /></div>
</div> </div>
{{else}}<div class="formrow"> {{else}}<div class="formrow">
<div class="formitem formlabel"><a>Setting Value</a></div> <div class="formitem formlabel"><a>{{lang "panel_setting_value"}}</a></div>
<div class="formitem"><input name="setting-value" type="text" value="{{.Something.Content}}" /></div> <div class="formitem"><input name="setting-value" type="text" value="{{.Something.Content}}" /></div>
</div>{{end}} </div>{{end}}
<div class="formrow"> <div class="formrow">
<div class="formitem"><button name="panel-button" class="formbutton">Update Setting</button></div> <div class="formitem"><button name="panel-button" class="formbutton">{{lang "panel_setting_update_button"}}</button></div>
</div> </div>
</form> </form>
</div> </div>

View File

@ -3,7 +3,7 @@
{{template "panel-menu.html" . }} {{template "panel-menu.html" . }}
<main class="colstack_right"> <main class="colstack_right">
<div class="colstack_item colstack_head"> <div class="colstack_item colstack_head">
<div class="rowitem"><h1>Settings</h1></div> <div class="rowitem"><h1>{{lang "panel_settings_head"}}</h1></div>
</div> </div>
<div id="panel_settings" class="colstack_item rowlist"> <div id="panel_settings" class="colstack_item rowlist">
{{range $key, $value := .Something}} {{range $key, $value := .Something}}

View File

@ -22,38 +22,38 @@
<main class="colstack_right"> <main class="colstack_right">
<div class="colstack_item colstack_head"> <div class="colstack_item colstack_head">
<div class="rowitem"><h1>Primary Themes</h1></div> <div class="rowitem"><h1>{{lang "panel_themes_primary_themes"}}</h1></div>
</div> </div>
<div id="panel_primary_themes" class="colstack_item panel_themes complex_rowlist"> <div id="panel_primary_themes" class="colstack_item panel_themes complex_rowlist">
{{range .PrimaryThemes}} {{range .PrimaryThemes}}
<div class="theme_row rowitem editable_parent"{{if .FullImage}} style="background-image: url('/static/{{.FullImage}}');background-position: center;background-size: 50%;background-repeat: no-repeat;"{{end}}> <div class="theme_row rowitem editable_parent"{{if .FullImage}} style="background-image: url('/static/{{.FullImage}}');background-position: center;background-size: 50%;background-repeat: no-repeat;"{{end}}>
<span style="float: left;"> <span style="float: left;">
<a href="/panel/themes/{{.Name}}" class="editable_block" style="font-size: 17px;">{{.FriendlyName}}</a><br /> <a href="/panel/themes/{{.Name}}" class="editable_block" style="font-size: 17px;">{{.FriendlyName}}</a><br />
<small class="panel_theme_author" style="margin-left: 2px;">Author: <a href="//{{.URL}}">{{.Creator}}</a></small> <small class="panel_theme_author" style="margin-left: 2px;">{{lang "panel_themes_author_prefix"}}<a href="//{{.URL}}">{{.Creator}}</a></small>
</span> </span>
<span class="panel_floater"> <span class="panel_floater">
{{if .MobileFriendly}}<span class="panel_tag panel_theme_mobile" title="Mobile Friendly">📱</span>{{end}} {{if .MobileFriendly}}<span class="panel_tag panel_theme_mobile" title="{{lang "panel_themes_mobile_friendly_tooltip"}}" aria-label="{{lang "panel_themes_mobile_friendly_aria"}}">📱</span>{{end}}
{{if .Tag}}<span class="panel_tag panel_theme_tag">{{.Tag}}</span>{{end}} {{if .Tag}}<span class="panel_tag panel_theme_tag">{{.Tag}}</span>{{end}}
{{if .Active}}<span class="panel_tag panel_right_button">Default</span>{{else}}<a href="/panel/themes/default/{{.Name}}?session={{$.CurrentUser.Session}}" class="panel_tag panel_right_button">Make Default</a>{{end}} {{if .Active}}<span class="panel_tag panel_right_button">{{lang "panel_themes_default"}}</span>{{else}}<a href="/panel/themes/default/{{.Name}}?session={{$.CurrentUser.Session}}" class="panel_tag panel_right_button">{{lang "panel_themes_make_default"}}</a>{{end}}
</span> </span>
</div> </div>
{{end}} {{end}}
</div> </div>
{{if .VariantThemes}} {{if .VariantThemes}}
<div class="colstack_item colstack_head"> <div class="colstack_item colstack_head">
<div class="rowitem"><h1>Variant Themes</h1></div> <div class="rowitem"><h1>{{lang "panel_themes_variant_themes"}}</h1></div>
</div> </div>
<div id="panel_variant_themes" class="colstack_item panel_themes"> <div id="panel_variant_themes" class="colstack_item panel_themes">
{{range .VariantThemes}} {{range .VariantThemes}}
<div class="theme_row rowitem editable_parent"{{if .FullImage}} style="background-image: url('/static/{{.FullImage}}');background-position: center;background-size: 50%;background-repeat: no-repeat;"{{end}}> <div class="theme_row rowitem editable_parent"{{if .FullImage}} style="background-image: url('/static/{{.FullImage}}');background-position: center;background-size: 50%;background-repeat: no-repeat;"{{end}}>
<span style="float: left;"> <span style="float: left;">
<a href="/panel/themes/{{.Name}}" class="editable_block" style="font-size: 17px;">{{.FriendlyName}}</a><br /> <a href="/panel/themes/{{.Name}}" class="editable_block" style="font-size: 17px;">{{.FriendlyName}}</a><br />
<small class="panel_theme_author" style="margin-left: 2px;">Author: <a href="//{{.URL}}">{{.Creator}}</a></small> <small class="panel_theme_author" style="margin-left: 2px;">{{lang "panel_themes_author_prefix"}}<a href="//{{.URL}}">{{.Creator}}</a></small>
</span> </span>
<span class="panel_floater"> <span class="panel_floater">
{{if .MobileFriendly}}<span class="panel_tag panel_theme_mobile" title="Mobile Friendly">📱</span>{{end}} {{if .MobileFriendly}}<span class="panel_tag panel_theme_mobile" title="{{lang "panel_themes_mobile_friendly_tooltip"}}" aria-label="{{lang "panel_themes_mobile_friendly_aria"}}">📱</span>{{end}}
{{if .Tag}}<span class="panel_tag panel_theme_tag">{{.Tag}}</span>{{end}} {{if .Tag}}<span class="panel_tag panel_theme_tag">{{.Tag}}</span>{{end}}
{{if .Active}}<span class="panel_tag panel_right_button">Default</span>{{else}}<a href="/panel/themes/default/{{.Name}}?session={{$.CurrentUser.Session}}" class="panel_tag panel_right_button">Make Default</a>{{end}} {{if .Active}}<span class="panel_tag panel_right_button">{{lang "panel_themes_default"}}</span>{{else}}<a href="/panel/themes/default/{{.Name}}?session={{$.CurrentUser.Session}}" class="panel_tag panel_right_button">{{lang "panel_themes_make_default"}}</a>{{end}}
</span> </span>
</div> </div>
{{end}} {{end}}

View File

@ -4,31 +4,25 @@
{{template "panel-menu.html" . }} {{template "panel-menu.html" . }}
<main class="colstack_right"> <main class="colstack_right">
<div class="colstack_item colstack_head"> <div class="colstack_item colstack_head">
<div class="rowitem"><h1>Users</h1></div> <div class="rowitem"><h1>{{lang "panel_users_head"}}</h1></div>
</div> </div>
<div id="panel_users" class="colstack_item rowlist bgavatars"> <div id="panel_users" class="colstack_item rowlist bgavatars">
{{range .ItemList}} {{range .ItemList}}
<div class="rowitem editable_parent" style="background-image: url('{{.Avatar}}');"> <div class="rowitem editable_parent" style="background-image: url('{{.Avatar}}');">
<img class="bgsub" src="{{.Avatar}}" alt="{{.Name}}'s Avatar" /> <img class="bgsub" src="{{.Avatar}}" alt="{{.Name}}'s Avatar" />
<a class="rowTitle editable_block"{{if $.CurrentUser.Perms.EditUser}} href="/panel/users/edit/{{.ID}}?session={{$.CurrentUser.Session}}"{{end}}>{{.Name}}</a> <a class="rowTitle editable_block"{{if $.CurrentUser.Perms.EditUser}} href="/panel/users/edit/{{.ID}}?session={{$.CurrentUser.Session}}"{{end}}>{{.Name}}</a>
<a href="/user/{{.ID}}" class="tag-mini profile_url">Profile</a> <a href="/user/{{.ID}}" class="tag-mini profile_url">{{lang "panel_users_profile"}}</a>
{{if (.Tag) and (.IsSuperMod)}}<span style="float: right;"><span class="panel_tag" style="margin-left 4px;">{{.Tag}}</span></span>{{end}} {{if (.Tag) and (.IsSuperMod)}}<span style="float: right;"><span class="panel_tag" style="margin-left 4px;">{{.Tag}}</span></span>{{end}}
<span class="panel_floater"> <span class="panel_floater">
{{if .IsBanned}}<a href="/users/unban/{{.ID}}?session={{$.CurrentUser.Session}}" class="panel_tag panel_right_button ban_button">Unban</a>{{else if not .IsSuperMod}}<a href="/user/{{.ID}}#ban_user" class="panel_tag panel_right_button ban_button">Ban</a>{{end}} {{if .IsBanned}}<a href="/users/unban/{{.ID}}?session={{$.CurrentUser.Session}}" class="panel_tag panel_right_button ban_button">{{lang "panel_users_unban"}}</a>{{else if not .IsSuperMod}}<a href="/user/{{.ID}}#ban_user" class="panel_tag panel_right_button ban_button">{{lang "panel_users_ban"}}</a>{{end}}
{{if not .Active}}<a href="/users/activate/{{.ID}}?session={{$.CurrentUser.Session}}" class="panel_tag panel_right_button">Activate</a>{{end}} {{if not .Active}}<a href="/users/activate/{{.ID}}?session={{$.CurrentUser.Session}}" class="panel_tag panel_right_button">{{lang "panel_users_activate"}}</a>{{end}}
</span> </span>
</div> </div>
{{end}} {{end}}
</div> </div>
{{if gt .LastPage 1}} {{if gt .LastPage 1}}
<div class="pageset"> {{template "paginator.html" . }}
{{if gt .Page 1}}<div class="pageitem"><a href="?page={{subtract .Page 1}}">Prev</a></div>{{end}}
{{range .PageList}}
<div class="pageitem"><a href="?page={{.}}">{{.}}</a></div>
{{end}}
{{if ne .LastPage .Page}}<div class="pageitem"><a href="?page={{add .Page 1}}">Next</a></div>{{end}}
</div>
{{end}} {{end}}
</main> </main>

View File

@ -4,7 +4,7 @@
{{template "panel-menu.html" . }} {{template "panel-menu.html" . }}
<main class="colstack_right"> <main class="colstack_right">
<div class="colstack_item colstack_head"> <div class="colstack_item colstack_head">
<div class="rowitem"><h1>Word Filters</h1></div> <div class="rowitem"><h1>{{lang "panel_word_filters_head"}}</h1></div>
</div> </div>
<div id="panel_word_filters" class="colstack_item rowlist"> <div id="panel_word_filters" class="colstack_item rowlist">
{{range .Something}} {{range .Something}}
@ -13,33 +13,33 @@
<span class="itemSeparator"></span> <span class="itemSeparator"></span>
<a data-field="replacement" data-type="text" class="editable_block panel_compacttext">{{.Replacement}}</a> <a data-field="replacement" data-type="text" class="editable_block panel_compacttext">{{.Replacement}}</a>
<span class="panel_buttons"> <span class="panel_buttons">
<a class="panel_tag edit_fields hide_on_edit panel_right_button edit_button" aria-label="Edit Word Filter"></a> <a class="panel_tag edit_fields hide_on_edit panel_right_button edit_button" aria-label="{{lang "panel_word_filters_edit_button_aria"}}"></a>
<a class="panel_right_button" href="/panel/settings/word-filters/edit/submit/{{.ID}}"><button class='panel_tag submit_edit show_on_edit' type='submit'>Update</button></a> <a class="panel_right_button" href="/panel/settings/word-filters/edit/submit/{{.ID}}"><button class='panel_tag submit_edit show_on_edit' type='submit'>{{lang "panel_word_filters_update_button"}}</button></a>
<a href="/panel/settings/word-filters/delete/submit/{{.ID}}?session={{$.CurrentUser.Session}}" class="panel_tag panel_right_button hide_on_edit delete_button" aria-label="Delete Word Filter"></a> <a href="/panel/settings/word-filters/delete/submit/{{.ID}}?session={{$.CurrentUser.Session}}" class="panel_tag panel_right_button hide_on_edit delete_button" aria-label="{{lang "panel_word_filters_delete_button_aria"}}"></a>
</span> </span>
</div> </div>
{{else}} {{else}}
<div class="rowitem editable_parent rowmsg"> <div class="rowitem editable_parent rowmsg">
<a>You don't have any word filters yet.</a> <a>{{lang "panel_word_filters_no_filters"}}</a>
</div> </div>
{{end}} {{end}}
</div> </div>
<div class="colstack_item colstack_head"> <div class="colstack_item colstack_head">
<div class="rowitem"><h1>Add Filter</h1></div> <div class="rowitem"><h1>{{lang "panel_word_filters_create_head"}}</h1></div>
</div> </div>
<div class="colstack_item the_form"> <div class="colstack_item the_form">
<form action="/panel/settings/word-filters/create/?session={{.CurrentUser.Session}}" method="post"> <form action="/panel/settings/word-filters/create/?session={{.CurrentUser.Session}}" method="post">
<div class="formrow"> <div class="formrow">
<div class="formitem formlabel"><a>Find</a></div> <div class="formitem formlabel"><a>{{lang "panel_word_filters_create_find"}}</a></div>
<div class="formitem"><input name="find" type="text" placeholder="fuck" /></div> <div class="formitem"><input name="find" type="text" placeholder="{{lang "panel_word_filters_create_find_placeholder"}}" /></div>
</div> </div>
<div class="formrow"> <div class="formrow">
<div class="formitem formlabel"><a>Replacement</a></div> <div class="formitem formlabel"><a>{{lang "panel_word_filters_create_replacement"}}</a></div>
<div class="formitem"><input name="replacement" type="text" placeholder="fudge" /></div> <div class="formitem"><input name="replacement" type="text" placeholder="{{lang "panel_word_filters_create_replacement_placeholder"}}" /></div>
</div> </div>
<div class="formrow"> <div class="formrow">
<div class="formitem"><button name="panel-button" class="formbutton form_middle_button">Add Filter</button></div> <div class="formitem"><button name="panel-button" class="formbutton form_middle_button">{{lang "panel_word_filters_create_create_word_filter_button"}}</button></div>
</div> </div>
</form> </form>
</div> </div>

View File

@ -14,17 +14,17 @@
</div> </div>
<div class="passiveBlock"> <div class="passiveBlock">
{{if not .CurrentUser.Loggedin}}<div class="rowitem passive"> {{if not .CurrentUser.Loggedin}}<div class="rowitem passive">
<a class="profile_menu_item">Login for options</a> <a class="profile_menu_item">{{lang "profile_login_for_options"}}</a>
</div>{{else}} </div>{{else}}
<!--<div class="rowitem passive"> <!--<div class="rowitem passive">
<a class="profile_menu_item">Add Friend</a> <a class="profile_menu_item">{{lang "profile_add_friend"}}</a>
</div>--> </div>-->
{{if (.CurrentUser.IsSuperMod) and not (.ProfileOwner.IsSuperMod) }}<div class="rowitem passive"> {{if (.CurrentUser.IsSuperMod) and not (.ProfileOwner.IsSuperMod) }}<div class="rowitem passive">
{{if .ProfileOwner.IsBanned }}<a href="/users/unban/{{.ProfileOwner.ID}}?session={{.CurrentUser.Session}}" class="profile_menu_item">Unban</a> {{if .ProfileOwner.IsBanned }}<a href="/users/unban/{{.ProfileOwner.ID}}?session={{.CurrentUser.Session}}" class="profile_menu_item">{{lang "profile_unban"}}</a>
{{else}}<a href="#ban_user" class="profile_menu_item">Ban</a>{{end}} {{else}}<a href="#ban_user" class="profile_menu_item">{{lang "profile_ban"}}</a>{{end}}
</div>{{end}} </div>{{end}}
<div class="rowitem passive"> <div class="rowitem passive">
<a href="/report/submit/{{.ProfileOwner.ID}}?session={{.CurrentUser.Session}}&type=user" class="profile_menu_item report_item" aria-label="Report User" title="Report User"></a> <a href="/report/submit/{{.ProfileOwner.ID}}?session={{.CurrentUser.Session}}&type=user" class="profile_menu_item report_item" aria-label="{{lang "profile_report_user_aria"}}" title="{{lang "profile_report_user_tooltip"}}"></a>
</div> </div>
{{end}} {{end}}
</div> </div>
@ -35,43 +35,43 @@
{{if .CurrentUser.Perms.BanUsers}} {{if .CurrentUser.Perms.BanUsers}}
<!-- TODO: Inline the display: none; CSS --> <!-- TODO: Inline the display: none; CSS -->
<div id="ban_user_head" class="colstack_item colstack_head hash_hide ban_user_hash" style="display: none;"> <div id="ban_user_head" class="colstack_item colstack_head hash_hide ban_user_hash" style="display: none;">
<div class="rowitem"><h1><a>Ban User</a></h1></div> <div class="rowitem"><h1><a>{{lang "profile_ban_user_head"}}</a></h1></div>
</div> </div>
<form id="ban_user_form" class="hash_hide ban_user_hash" action="/users/ban/submit/{{.ProfileOwner.ID}}?session={{.CurrentUser.Session}}" method="post" style="display: none;"> <form id="ban_user_form" class="hash_hide ban_user_hash" action="/users/ban/submit/{{.ProfileOwner.ID}}?session={{.CurrentUser.Session}}" method="post" style="display: none;">
{{/** TODO: Put a JS duration calculator here instead of this text? **/}} {{/** TODO: Put a JS duration calculator here instead of this text? **/}}
<div class="colline">If all the fields are left blank, the ban will be permanent.</div> <div class="colline">{{lang "profile_ban_user_notice"}}</div>
<div class="colstack_item"> <div class="colstack_item">
<div class="formrow real_first_child"> <div class="formrow real_first_child">
<div class="formitem formlabel"><a>Days</a></div> <div class="formitem formlabel"><a>{{lang "profile_ban_user_days"}}</a></div>
<div class="formitem"> <div class="formitem">
<input name="ban-duration-days" type="number" value="0" min="0" /> <input name="ban-duration-days" type="number" value="0" min="0" />
</div> </div>
</div> </div>
<div class="formrow"> <div class="formrow">
<div class="formitem formlabel"><a>Weeks</a></div> <div class="formitem formlabel"><a>{{lang "profile_ban_user_weeks"}}</a></div>
<div class="formitem"> <div class="formitem">
<input name="ban-duration-weeks" type="number" value="0" min="0" /> <input name="ban-duration-weeks" type="number" value="0" min="0" />
</div> </div>
</div> </div>
<div class="formrow"> <div class="formrow">
<div class="formitem formlabel"><a>Months</a></div> <div class="formitem formlabel"><a>{{lang "profile_ban_user_months"}}</a></div>
<div class="formitem"> <div class="formitem">
<input name="ban-duration-months" type="number" value="0" min="0" /> <input name="ban-duration-months" type="number" value="0" min="0" />
</div> </div>
</div> </div>
<!--<div class="formrow"> <!--<div class="formrow">
<div class="formitem formlabel"><a>Reason</a></div> <div class="formitem formlabel"><a>{{lang "profile_ban_user_reason"}}</a></div>
<div class="formitem"><textarea name="ban-reason" placeholder="A really horrible person" required></textarea></div> <div class="formitem"><textarea name="ban-reason" placeholder="A really horrible person" required></textarea></div>
</div>--> </div>-->
<div class="formrow"> <div class="formrow">
<div class="formitem"><button name="ban-button" class="formbutton form_middle_button">Ban User</button></div> <div class="formitem"><button name="ban-button" class="formbutton form_middle_button">{{lang "profile_ban_user_button"}}</button></div>
</div> </div>
</div> </div>
</form> </form>
{{end}} {{end}}
<div id="profile_comments_head" class="colstack_item colstack_head hash_hide"> <div id="profile_comments_head" class="colstack_item colstack_head hash_hide">
<div class="rowitem"><h1><a>Comments</a></h1></div> <div class="rowitem"><h1><a>{{lang "profile_comments_head"}}</a></h1></div>
</div> </div>
<div id="profile_comments" class="colstack_item hash_hide">{{template "profile_comments_row.html" . }}</div> <div id="profile_comments" class="colstack_item hash_hide">{{template "profile_comments_row.html" . }}</div>
@ -80,10 +80,10 @@
<input name="uid" value='{{.ProfileOwner.ID}}' type="hidden" /> <input name="uid" value='{{.ProfileOwner.ID}}' type="hidden" />
<div class="colstack_item topic_reply_form" style="border-top: none;"> <div class="colstack_item topic_reply_form" style="border-top: none;">
<div class="formrow"> <div class="formrow">
<div class="formitem"><textarea class="input_content" name="reply-content" placeholder="Insert comment here"></textarea></div> <div class="formitem"><textarea class="input_content" name="reply-content" placeholder="{{lang "profile_comments_form_content"}}"></textarea></div>
</div> </div>
<div class="formrow quick_button_row"> <div class="formrow quick_button_row">
<div class="formitem"><button name="reply-button" class="formbutton">Create Reply</button></div> <div class="formitem"><button name="reply-button" class="formbutton">{{lang "profile_comments_form_button"}}</button></div>
</div> </div>
</div> </div>
</form> </form>

View File

@ -6,11 +6,11 @@
<span class="controls"> <span class="controls">
<a href="{{.UserLink}}" class="real_username username">{{.CreatedByName}}</a>&nbsp;&nbsp; <a href="{{.UserLink}}" class="real_username username">{{.CreatedByName}}</a>&nbsp;&nbsp;
{{if $.CurrentUser.IsMod}}<a href="/profile/reply/edit/submit/{{.ID}}?session={{$.CurrentUser.Session}}" class="mod_button" title="Edit Item"><button class="username edit_item edit_label"></button></a> {{if $.CurrentUser.IsMod}}<a href="/profile/reply/edit/submit/{{.ID}}?session={{$.CurrentUser.Session}}" class="mod_button" title="{{lang "profile_comments_edit_tooltip"}}" aria-label="{{lang "profile_comments_edit_aria"}}"><button class="username edit_item edit_label"></button></a>
<a href="/profile/reply/delete/submit/{{.ID}}?session={{$.CurrentUser.Session}}" class="mod_button" title="Delete Item"><button class="username delete_item trash_label"></button></a>{{end}} <a href="/profile/reply/delete/submit/{{.ID}}?session={{$.CurrentUser.Session}}" class="mod_button" title="{{lang "profile_comments_delete_tooltip"}}" aria-label="{{lang "profile_comments_delete_aria"}}"><button class="username delete_item trash_label"></button></a>{{end}}
<a class="mod_button" href="/report/submit/{{.ID}}?session={{$.CurrentUser.Session}}&type=user-reply"><button class="username report_item flag_label"></button></a> <a class="mod_button" href="/report/submit/{{.ID}}?session={{$.CurrentUser.Session}}&type=user-reply"><button class="username report_item flag_label" title="{{lang "profile_comments_report_tooltip"}}" aria-label="{{lang "profile_comments_report_aria"}}"></button></a>
{{if .Tag}}<a class="username hide_on_mobile user_tag" style="float: right;">{{.Tag}}</a>{{end}} {{if .Tag}}<a class="username hide_on_mobile user_tag" style="float: right;">{{.Tag}}</a>{{end}}
</span> </span>
@ -29,10 +29,10 @@
</div> </div>
<span class="controls"> <span class="controls">
{{if $.CurrentUser.IsMod}} {{if $.CurrentUser.IsMod}}
<a href="/profile/reply/edit/submit/{{.ID}}?session={{$.CurrentUser.Session}}" class="mod_button" title="Edit Item"><button class="username edit_item edit_label"></button></a> <a href="/profile/reply/edit/submit/{{.ID}}?session={{$.CurrentUser.Session}}" class="mod_button" title="{{lang "profile_comments_edit_tooltip"}}" aria-label="{{lang "profile_comments_edit_aria"}}"><button class="username edit_item edit_label"></button></a>
<a href="/profile/reply/delete/submit/{{.ID}}?session={{$.CurrentUser.Session}}" class="mod_button" title="Delete Item"><button class="username delete_item trash_label"></button></a> <a href="/profile/reply/delete/submit/{{.ID}}?session={{$.CurrentUser.Session}}" class="mod_button" title="{{lang "profile_comments_delete_tooltip"}}" aria-label="{{lang "profile_comments_delete_aria"}}"><button class="username delete_item trash_label"></button></a>
{{end}} {{end}}
<a class="mod_button" href="/report/submit/{{.ID}}?session={{$.CurrentUser.Session}}&type=user-reply"><button class="username report_item flag_label"></button></a> <a class="mod_button" href="/report/submit/{{.ID}}?session={{$.CurrentUser.Session}}&type=user-reply"><button class="username report_item flag_label" title="{{lang "profile_comments_report_tooltip"}}" aria-label="{{lang "profile_comments_report_aria"}}"></button></a>
</span> </span>
</div> </div>
<div class="content_column"> <div class="content_column">

View File

@ -2,27 +2,27 @@
<form id="edit_topic_form" action='/topic/edit/submit/{{.Topic.ID}}?session={{.CurrentUser.Session}}' method="post"></form> <form id="edit_topic_form" action='/topic/edit/submit/{{.Topic.ID}}?session={{.CurrentUser.Session}}' method="post"></form>
{{if gt .Page 1}}<link rel="prev" href="/topic/{{.Topic.ID}}?page={{subtract .Page 1}}" /> {{if gt .Page 1}}<link rel="prev" href="/topic/{{.Topic.ID}}?page={{subtract .Page 1}}" />
<div id="prevFloat" class="prev_button"><a class="prev_link" aria-label="Go to the previous page" rel="prev" href="/topic/{{.Topic.ID}}?page={{subtract .Page 1}}">&lt;</a></div>{{end}} <div id="prevFloat" class="prev_button"><a class="prev_link" aria-label="{{lang "paginator_prev_page_aria"}}" rel="prev" href="/topic/{{.Topic.ID}}?page={{subtract .Page 1}}">{{lang "paginator_less_than"}}</a></div>{{end}}
{{if ne .LastPage .Page}}<link rel="prerender next" href="/topic/{{.Topic.ID}}?page={{add .Page 1}}" /> {{if ne .LastPage .Page}}<link rel="prerender next" href="/topic/{{.Topic.ID}}?page={{add .Page 1}}" />
<div id="nextFloat" class="next_button"> <div id="nextFloat" class="next_button">
<a class="next_link" aria-label="Go to the next page" rel="next" href="/topic/{{.Topic.ID}}?page={{add .Page 1}}">&gt;</a> <a class="next_link" aria-label="{{lang "paginator_next_page_aria"}}" rel="next" href="/topic/{{.Topic.ID}}?page={{add .Page 1}}">{{lang "paginator_greater_than"}}</a>
</div>{{end}} </div>{{end}}
<main> <main>
<div class="rowblock rowhead topic_block" aria-label="The opening post of this topic"> <div class="rowblock rowhead topic_block" aria-label="{{lang "topic_opening_post_aria"}}">
<div class="rowitem topic_item{{if .Topic.Sticky}} topic_sticky_head{{else if .Topic.IsClosed}} topic_closed_head{{end}}"> <div class="rowitem topic_item{{if .Topic.Sticky}} topic_sticky_head{{else if .Topic.IsClosed}} topic_closed_head{{end}}">
<h1 class='topic_name hide_on_edit'>{{.Topic.Title}}</h1> <h1 class='topic_name hide_on_edit'>{{.Topic.Title}}</h1>
{{if .Topic.IsClosed}}<span class='username hide_on_micro topic_status_e topic_status_closed hide_on_edit' title='Status: Closed'>&#x1F512;&#xFE0E</span>{{end}} {{if .Topic.IsClosed}}<span class='username hide_on_micro topic_status_e topic_status_closed hide_on_edit' title='{{lang "status_closed_tooltip"}}' aria-label='{{lang "topic_status_closed_aria"}}'>&#x1F512;&#xFE0E</span>{{end}}
{{if .CurrentUser.Perms.EditTopic}} {{if .CurrentUser.Perms.EditTopic}}
<input form='edit_topic_form' class='show_on_edit topic_name_input' name="topic_name" value='{{.Topic.Title}}' type="text" /> <input form='edit_topic_form' class='show_on_edit topic_name_input' name="topic_name" value='{{.Topic.Title}}' type="text" aria-label="{{lang "topic_title_input_aria"}}" />
<button form='edit_topic_form' name="topic-button" class="formbutton show_on_edit submit_edit">Update</button> <button form='edit_topic_form' name="topic-button" class="formbutton show_on_edit submit_edit">{{lang "topic_update_button"}}</button>
{{end}} {{end}}
</div> </div>
</div> </div>
{{if .Poll.ID}} {{if .Poll.ID}}
<article class="rowblock post_container poll"> <article class="rowblock post_container poll" aria-level="{{lang "topic_poll_aria"}}">
<div class="rowitem passive editable_parent post_item poll_item {{.Topic.ClassName}}" style="background-image: url({{.Topic.Avatar}}), url(/static/{{.Header.Theme.Name}}/post-avatar-bg.jpg);background-position: 0px {{if le .Topic.ContentLines 5}}-1{{end}}0px;background-repeat:no-repeat, repeat-y;"> <div class="rowitem passive editable_parent post_item poll_item {{.Topic.ClassName}}" style="background-image: url({{.Topic.Avatar}}), url(/static/{{.Header.Theme.Name}}/post-avatar-bg.jpg);background-position: 0px {{if le .Topic.ContentLines 5}}-1{{end}}0px;background-repeat:no-repeat, repeat-y;">
<div class="topic_content user_content" style="margin:0;padding:0;"> <div class="topic_content user_content" style="margin:0;padding:0;">
{{range .Poll.QuickOptions}} {{range .Poll.QuickOptions}}
@ -35,9 +35,9 @@
</div> </div>
{{end}} {{end}}
<div class="poll_buttons"> <div class="poll_buttons">
<button form="poll_{{.Poll.ID}}_form" class="poll_vote_button">Vote</button> <button form="poll_{{.Poll.ID}}_form" class="poll_vote_button">{{lang "topic_poll_vote"}}</button>
<button class="poll_results_button" data-poll-id="{{.Poll.ID}}">Results</button> <button class="poll_results_button" data-poll-id="{{.Poll.ID}}">{{lang "topic_poll_results"}}</button>
<a href="#"><button class="poll_cancel_button">Cancel</button></a> <a href="#"><button class="poll_cancel_button">{{lang "topic_poll_cancel"}}</button></a>
</div> </div>
</div> </div>
<div id="poll_results_{{.Poll.ID}}" class="poll_results auto_hide"> <div id="poll_results_{{.Poll.ID}}" class="poll_results auto_hide">
@ -47,36 +47,36 @@
</article> </article>
{{end}} {{end}}
<article itemscope itemtype="http://schema.org/CreativeWork" class="rowblock post_container top_post" aria-label="The opening post for this topic"> <article itemscope itemtype="http://schema.org/CreativeWork" class="rowblock post_container top_post" aria-label="{{lang "topic_opening_post_aria"}}">
<div class="rowitem passive editable_parent post_item {{.Topic.ClassName}}" style="background-image: url({{.Topic.Avatar}}), url(/static/{{.Header.Theme.Name}}/post-avatar-bg.jpg);background-position: 0px {{if le .Topic.ContentLines 5}}-1{{end}}0px;background-repeat:no-repeat, repeat-y;"> <div class="rowitem passive editable_parent post_item {{.Topic.ClassName}}" style="background-image: url({{.Topic.Avatar}}), url(/static/{{.Header.Theme.Name}}/post-avatar-bg.jpg);background-position: 0px {{if le .Topic.ContentLines 5}}-1{{end}}0px;background-repeat:no-repeat, repeat-y;">
<p class="hide_on_edit topic_content user_content" itemprop="text" style="margin:0;padding:0;">{{.Topic.ContentHTML}}</p> <p class="hide_on_edit topic_content user_content" itemprop="text" style="margin:0;padding:0;">{{.Topic.ContentHTML}}</p>
<textarea name="topic_content" class="show_on_edit topic_content_input">{{.Topic.Content}}</textarea> <textarea name="topic_content" class="show_on_edit topic_content_input">{{.Topic.Content}}</textarea>
<span class="controls" aria-label="Controls and Author Information"> <span class="controls" aria-label="{{lang "topic_post_controls_aria"}}">
<a href="{{.Topic.UserLink}}" class="username real_username" rel="author">{{.Topic.CreatedByName}}</a>&nbsp;&nbsp; <a href="{{.Topic.UserLink}}" class="username real_username" rel="author">{{.Topic.CreatedByName}}</a>&nbsp;&nbsp;
{{if .CurrentUser.Perms.LikeItem}}<a href="/topic/like/submit/{{.Topic.ID}}?session={{.CurrentUser.Session}}" class="mod_button" title="Love it" {{if .Topic.Liked}}aria-label="Unlike this topic"{{else}}aria-label="Like this topic"{{end}} style="color:#202020;"> {{if .CurrentUser.Perms.LikeItem}}<a href="/topic/like/submit/{{.Topic.ID}}?session={{.CurrentUser.Session}}" class="mod_button"{{if .Topic.Liked}} title="{{lang "topic_unlike_tooltip"}}" aria-label="{{lang "topic_unlike_aria"}}"{{else}} title="{{lang "topic_like_tooltip"}}" aria-label="{{lang "topic_like_aria"}}"{{end}} style="color:#202020;">
<button class="username like_label"{{if .Topic.Liked}} style="background-color:#D6FFD6;"{{end}}></button></a>{{end}} <button class="username like_label"{{if .Topic.Liked}} style="background-color:#D6FFD6;"{{end}}></button></a>{{end}}
{{if .CurrentUser.Perms.EditTopic}}<a href='/topic/edit/{{.Topic.ID}}' class="mod_button open_edit" style="font-weight:normal;" title="Edit Topic" aria-label="Edit this topic"><button class="username edit_label"></button></a>{{end}} {{if .CurrentUser.Perms.EditTopic}}<a href='/topic/edit/{{.Topic.ID}}' class="mod_button open_edit" style="font-weight:normal;" title="{{lang "topic_edit_tooltip"}}" aria-label="{{lang "topic_edit_aria"}}"><button class="username edit_label"></button></a>{{end}}
{{if .CurrentUser.Perms.DeleteTopic}}<a href='/topic/delete/submit/{{.Topic.ID}}?session={{.CurrentUser.Session}}' class="mod_button" style="font-weight:normal;" title="Delete Topic" aria-label="Delete this topic"><button class="username trash_label"></button></a>{{end}} {{if .CurrentUser.Perms.DeleteTopic}}<a href='/topic/delete/submit/{{.Topic.ID}}?session={{.CurrentUser.Session}}' class="mod_button" style="font-weight:normal;" title="{{lang "topic_delete_tooltip"}}" aria-label="{{lang "topic_delete_aria"}}"><button class="username trash_label"></button></a>{{end}}
{{if .CurrentUser.Perms.CloseTopic}}{{if .Topic.IsClosed}}<a class="mod_button" href='/topic/unlock/submit/{{.Topic.ID}}?session={{.CurrentUser.Session}}' style="font-weight:normal;" title="Unlock Topic" aria-label="Unlock this topic"><button class="username unlock_label"></button></a>{{else}}<a href='/topic/lock/submit/{{.Topic.ID}}?session={{.CurrentUser.Session}}' class="mod_button" style="font-weight:normal;" title="Lock Topic" aria-label="Lock this topic"><button class="username lock_label"></button></a>{{end}}{{end}} {{if .CurrentUser.Perms.CloseTopic}}{{if .Topic.IsClosed}}<a class="mod_button" href='/topic/unlock/submit/{{.Topic.ID}}?session={{.CurrentUser.Session}}' style="font-weight:normal;" title="{{lang "topic_unlock_tooltip"}}" aria-label="{{lang "topic_unlock_aria"}}"><button class="username unlock_label"></button></a>{{else}}<a href='/topic/lock/submit/{{.Topic.ID}}?session={{.CurrentUser.Session}}' class="mod_button" style="font-weight:normal;" title="{{lang "topic_lock_tooltip"}}" aria-label="{{lang "topic_lock_aria"}}"><button class="username lock_label"></button></a>{{end}}{{end}}
{{if .CurrentUser.Perms.PinTopic}}{{if .Topic.Sticky}}<a class="mod_button" href='/topic/unstick/submit/{{.Topic.ID}}?session={{.CurrentUser.Session}}' style="font-weight:normal;" title="Unpin Topic" aria-label="Unpin this topic"><button class="username unpin_label"></button></a>{{else}}<a href='/topic/stick/submit/{{.Topic.ID}}?session={{.CurrentUser.Session}}' class="mod_button" style="font-weight:normal;" title="Pin Topic" aria-label="Pin this topic"><button class="username pin_label"></button></a>{{end}}{{end}} {{if .CurrentUser.Perms.PinTopic}}{{if .Topic.Sticky}}<a class="mod_button" href='/topic/unstick/submit/{{.Topic.ID}}?session={{.CurrentUser.Session}}' style="font-weight:normal;" title="{{lang "topic_unpin_tooltip"}}" aria-label="{{lang "topic_unpin_aria"}}"><button class="username unpin_label"></button></a>{{else}}<a href='/topic/stick/submit/{{.Topic.ID}}?session={{.CurrentUser.Session}}' class="mod_button" style="font-weight:normal;" title="{{lang "topic_pin_tooltip"}}" aria-label="{{lang "topic_pin_aria"}}"><button class="username pin_label"></button></a>{{end}}{{end}}
{{if .CurrentUser.Perms.ViewIPs}}<a class="mod_button" href='/users/ips/?ip={{.Topic.IPAddress}}' style="font-weight:normal;" title="View IP" aria-label="The poster's IP is {{.Topic.IPAddress}}"><button class="username ip_label"></button></a>{{end}} {{if .CurrentUser.Perms.ViewIPs}}<a class="mod_button" href='/users/ips/?ip={{.Topic.IPAddress}}' style="font-weight:normal;" title="{{lang "topic_ip_tooltip"}}" aria-label="The poster's IP is {{.Topic.IPAddress}}"><button class="username ip_label"></button></a>{{end}}
<a href="/report/submit/{{.Topic.ID}}?session={{.CurrentUser.Session}}&type=topic" class="mod_button report_item" style="font-weight:normal;" title="Flag this topic" aria-label="Flag this topic" rel="nofollow"><button class="username flag_label"></button></a> <a href="/report/submit/{{.Topic.ID}}?session={{.CurrentUser.Session}}&type=topic" class="mod_button report_item" style="font-weight:normal;" title="{{lang "topic_flag_tooltip"}}" aria-label="{{lang "topic_flag_aria"}}" rel="nofollow"><button class="username flag_label"></button></a>
{{if .Topic.LikeCount}}<a class="username hide_on_micro like_count" aria-label="The number of likes on this topic">{{.Topic.LikeCount}}</a><a class="username hide_on_micro like_count_label" title="Like Count"></a>{{end}} {{if .Topic.LikeCount}}<a class="username hide_on_micro like_count" aria-label="{{lang "topic_like_count_aria"}}">{{.Topic.LikeCount}}</a><a class="username hide_on_micro like_count_label" title="{{lang "topic_like_count_tooltip"}}"></a>{{end}}
{{if .Topic.Tag}}<a class="username hide_on_micro user_tag">{{.Topic.Tag}}</a>{{else}}<a class="username hide_on_micro level" aria-label="The poster's level">{{.Topic.Level}}</a><a class="username hide_on_micro level_label" style="float:right;" title="Level"></a>{{end}} {{if .Topic.Tag}}<a class="username hide_on_micro user_tag">{{.Topic.Tag}}</a>{{else}}<a class="username hide_on_micro level" aria-label="{{lang "topic_level_aria"}}">{{.Topic.Level}}</a><a class="username hide_on_micro level_label" style="float:right;" title="{{lang "topic_level_tooltip"}}"></a>{{end}}
</span> </span>
</div> </div>
</article> </article>
<div class="rowblock post_container" aria-label="The current page for this topic" style="overflow: hidden;">{{range .ItemList}}{{if .ActionType}} <div class="rowblock post_container" aria-label="{{lang "topic_current_page_aria"}}" style="overflow: hidden;">{{range .ItemList}}{{if .ActionType}}
<article itemscope itemtype="http://schema.org/CreativeWork" class="rowitem passive deletable_block editable_parent post_item action_item"> <article itemscope itemtype="http://schema.org/CreativeWork" class="rowitem passive deletable_block editable_parent post_item action_item">
<span class="action_icon" style="font-size: 18px;padding-right: 5px;">{{.ActionIcon}}</span> <span class="action_icon" style="font-size: 18px;padding-right: 5px;">{{.ActionIcon}}</span>
<span itemprop="text">{{.ActionType}}</span> <span itemprop="text">{{.ActionType}}</span>
@ -89,30 +89,30 @@
<span class="controls"> <span class="controls">
<a href="{{.UserLink}}" class="username real_username" rel="author">{{.CreatedByName}}</a>&nbsp;&nbsp; <a href="{{.UserLink}}" class="username real_username" rel="author">{{.CreatedByName}}</a>&nbsp;&nbsp;
{{if $.CurrentUser.Perms.LikeItem}}<a href="/reply/like/submit/{{.ID}}?session={{$.CurrentUser.Session}}" class="mod_button" title="Love it" style="color:#202020;"><button class="username like_label"{{if .Liked}} style="background-color:#D6FFD6;"{{end}}></button></a>{{end}} {{if $.CurrentUser.Perms.LikeItem}}{{if .Liked}}<a href="/reply/like/submit/{{.ID}}?session={{$.CurrentUser.Session}}" class="mod_button" title="{{lang "topic_post_like_tooltip"}}" aria-label="{{lang "topic_post_like_aria"}}" style="color:#202020;"><button class="username like_label" style="background-color:#D6FFD6;"></button></a>{{else}}<a href="/reply/like/submit/{{.ID}}?session={{$.CurrentUser.Session}}" class="mod_button" title="{{lang "topic_post_unlike_tooltip"}}" aria-label="{{lang "topic_post_unlike_aria"}}" style="color:#202020;"><button class="username like_label"></button></a>{{end}}{{end}}
{{if $.CurrentUser.Perms.EditReply}}<a href="/reply/edit/submit/{{.ID}}?session={{$.CurrentUser.Session}}" class="mod_button" title="Edit Reply"><button class="username edit_item edit_label"></button></a>{{end}} {{if $.CurrentUser.Perms.EditReply}}<a href="/reply/edit/submit/{{.ID}}?session={{$.CurrentUser.Session}}" class="mod_button" title="{{lang "topic_post_edit_tooltip"}}" aria-label="{{lang "topic_post_edit_aria"}}"><button class="username edit_item edit_label"></button></a>{{end}}
{{if $.CurrentUser.Perms.DeleteReply}}<a href="/reply/delete/submit/{{.ID}}?session={{$.CurrentUser.Session}}" class="mod_button" title="Delete Reply"><button class="username delete_item trash_label"></button></a>{{end}} {{if $.CurrentUser.Perms.DeleteReply}}<a href="/reply/delete/submit/{{.ID}}?session={{$.CurrentUser.Session}}" class="mod_button" title="{{lang "topic_post_delete_tooltip"}}" aria-label="{{lang "topic_post_delete_aria"}}"><button class="username delete_item trash_label"></button></a>{{end}}
{{if $.CurrentUser.Perms.ViewIPs}}<a class="mod_button" href='/users/ips/?ip={{.IPAddress}}' style="font-weight:normal;" title="View IP"><button class="username ip_label"></button></a>{{end}} {{if $.CurrentUser.Perms.ViewIPs}}<a class="mod_button" href='/users/ips/?ip={{.IPAddress}}' style="font-weight:normal;" title="{{lang "topic_post_ip_tooltip"}}" aria-label="The poster's IP is {{.IPAddress}}"><button class="username ip_label"></button></a>{{end}}
<a href="/report/submit/{{.ID}}?session={{$.CurrentUser.Session}}&type=reply" class="mod_button report_item" title="Flag this reply" aria-label="Flag this reply" rel="nofollow"><button class="username report_item flag_label"></button></a> <a href="/report/submit/{{.ID}}?session={{$.CurrentUser.Session}}&type=reply" class="mod_button report_item" title="{{lang "topic_post_flag_tooltip"}}" aria-label="{{lang "topic_post_flag_aria"}}" rel="nofollow"><button class="username report_item flag_label"></button></a>
{{if .LikeCount}}<a class="username hide_on_micro like_count">{{.LikeCount}}</a><a class="username hide_on_micro like_count_label" title="Like Count"></a>{{end}} {{if .LikeCount}}<a class="username hide_on_micro like_count">{{.LikeCount}}</a><a class="username hide_on_micro like_count_label" title="{{lang "topic_post_like_count_tooltip"}}"></a>{{end}}
{{if .Tag}}<a class="username hide_on_micro user_tag">{{.Tag}}</a>{{else}}<a class="username hide_on_micro level">{{.Level}}</a><a class="username hide_on_micro level_label" style="float:right;" title="Level"></a>{{end}} {{if .Tag}}<a class="username hide_on_micro user_tag">{{.Tag}}</a>{{else}}<a class="username hide_on_micro level" aria-label="{{lang "topic_post_level_aria"}}">{{.Level}}</a><a class="username hide_on_micro level_label" style="float:right;" title="{{lang "topic_post_level_tooltip"}}"></a>{{end}}
</span> </span>
</article> </article>
{{end}}{{end}}</div> {{end}}{{end}}</div>
{{if .CurrentUser.Perms.CreateReply}} {{if .CurrentUser.Perms.CreateReply}}
<div class="rowblock topic_reply_form quick_create_form"> <div class="rowblock topic_reply_form quick_create_form" aria-label="{{lang "topic_reply_aria"}}">
<form id="quick_post_form" enctype="multipart/form-data" action="/reply/create/?session={{.CurrentUser.Session}}" method="post"></form> <form id="quick_post_form" enctype="multipart/form-data" action="/reply/create/?session={{.CurrentUser.Session}}" method="post"></form>
<input form="quick_post_form" name="tid" value='{{.Topic.ID}}' type="hidden" /> <input form="quick_post_form" name="tid" value='{{.Topic.ID}}' type="hidden" />
<input form="quick_post_form" id="has_poll_input" name="has_poll" value="0" type="hidden" /> <input form="quick_post_form" id="has_poll_input" name="has_poll" value="0" type="hidden" />
<div class="formrow real_first_child"> <div class="formrow real_first_child">
<div class="formitem"> <div class="formitem">
<textarea id="input_content" form="quick_post_form" name="reply-content" placeholder="Insert reply here" required></textarea> <textarea id="input_content" form="quick_post_form" name="reply-content" placeholder="{{lang "topic_reply_content"}}" required></textarea>
</div> </div>
</div> </div>
<div class="formrow poll_content_row auto_hide"> <div class="formrow poll_content_row auto_hide">
@ -120,17 +120,17 @@
<div class="pollinput" data-pollinput="0"> <div class="pollinput" data-pollinput="0">
<input type="checkbox" disabled /> <input type="checkbox" disabled />
<label class="pollinputlabel"></label> <label class="pollinputlabel"></label>
<input form="quick_post_form" name="pollinputitem[0]" class="pollinputinput" type="text" placeholder="Add new poll option" /> <input form="quick_post_form" name="pollinputitem[0]" class="pollinputinput" type="text" placeholder="{{lang "topic_reply_add_poll_option"}}" />
</div> </div>
</div> </div>
</div> </div>
<div class="formrow quick_button_row"> <div class="formrow quick_button_row">
<div class="formitem"> <div class="formitem">
<button form="quick_post_form" name="reply-button" class="formbutton">Create Reply</button> <button form="quick_post_form" name="reply-button" class="formbutton">{{lang "topic_reply_button"}}</button>
<button form="quick_post_form" class="formbutton" id="add_poll_button">Add Poll</button> <button form="quick_post_form" class="formbutton" id="add_poll_button">{{lang "topic_reply_add_poll_button"}}</button>
{{if .CurrentUser.Perms.UploadFiles}} {{if .CurrentUser.Perms.UploadFiles}}
<input name="upload_files" form="quick_post_form" id="upload_files" multiple type="file" style="display: none;" /> <input name="upload_files" form="quick_post_form" id="upload_files" multiple type="file" style="display: none;" />
<label for="upload_files" class="formbutton add_file_button">Add File</label> <label for="upload_files" class="formbutton add_file_button">{{lang "topic_reply_add_file_button"}}</label>
<div id="upload_file_dock"></div>{{end}} <div id="upload_file_dock"></div>{{end}}
</div> </div>
</div> </div>

View File

@ -1,22 +1,22 @@
{{template "header.html" . }} {{template "header.html" . }}
{{if gt .Page 1}}<link rel="prev" href="/topic/{{.Topic.ID}}?page={{subtract .Page 1}}" /> {{if gt .Page 1}}<link rel="prev" href="/topic/{{.Topic.ID}}?page={{subtract .Page 1}}" />
<div id="prevFloat" class="prev_button"><a class="prev_link" aria-label="Go to the previous page" rel="prev" href="/topic/{{.Topic.ID}}?page={{subtract .Page 1}}">&lt;</a></div>{{end}} <div id="prevFloat" class="prev_button"><a class="prev_link" aria-label="{{lang "paginator_prev_page_aria"}}" rel="prev" href="/topic/{{.Topic.ID}}?page={{subtract .Page 1}}">{{lang "paginator_less_than"}}</a></div>{{end}}
{{if ne .LastPage .Page}}<link rel="prerender next" href="/topic/{{.Topic.ID}}?page={{add .Page 1}}" /> {{if ne .LastPage .Page}}<link rel="prerender next" href="/topic/{{.Topic.ID}}?page={{add .Page 1}}" />
<div id="nextFloat" class="next_button"><a class="next_link" aria-label="Go to the next page" rel="next" href="/topic/{{.Topic.ID}}?page={{add .Page 1}}">&gt;</a></div>{{end}} <div id="nextFloat" class="next_button"><a class="next_link" aria-label="{{lang "paginator_next_page_aria"}}" rel="next" href="/topic/{{.Topic.ID}}?page={{add .Page 1}}">{{lang "paginator_greater_than"}}</a></div>{{end}}
<main> <main>
<div class="rowblock rowhead topic_block" aria-label="The opening post of this topic"> <div class="rowblock rowhead topic_block" aria-label="{{lang "topic_opening_post_aria"}}">
<form action='/topic/edit/submit/{{.Topic.ID}}?session={{.CurrentUser.Session}}' method="post"> <form action='/topic/edit/submit/{{.Topic.ID}}?session={{.CurrentUser.Session}}' method="post">
<div class="rowitem topic_item{{if .Topic.Sticky}} topic_sticky_head{{else if .Topic.IsClosed}} topic_closed_head{{end}}"> <div class="rowitem topic_item{{if .Topic.Sticky}} topic_sticky_head{{else if .Topic.IsClosed}} topic_closed_head{{end}}">
<h1 class='topic_name hide_on_edit'>{{.Topic.Title}}</h1> <h1 class='topic_name hide_on_edit'>{{.Topic.Title}}</h1>
{{/** TODO: Inline this CSS **/}} {{/** TODO: Inline this CSS **/}}
{{if .Topic.IsClosed}}<span class='username hide_on_micro topic_status_e topic_status_closed hide_on_edit' title='Status: Closed' style="font-weight:normal;float: right;position:relative;top:-5px;">&#x1F512;&#xFE0E</span>{{end}} {{if .Topic.IsClosed}}<span class='username hide_on_micro topic_status_e topic_status_closed hide_on_edit' title='{{lang "status_closed_tooltip"}}' aria-label='{{lang "topic_status_closed_aria"}}' style="font-weight:normal;float: right;position:relative;top:-5px;">&#x1F512;&#xFE0E</span>{{end}}
{{if .CurrentUser.Perms.EditTopic}} {{if .CurrentUser.Perms.EditTopic}}
<input class='show_on_edit topic_name_input' name="topic_name" value='{{.Topic.Title}}' type="text" /> <input class='show_on_edit topic_name_input' name="topic_name" value='{{.Topic.Title}}' type="text" aria-label="{{lang "topic_title_input_aria"}}" />
<button name="topic-button" class="formbutton show_on_edit submit_edit">Update</button> <button name="topic-button" class="formbutton show_on_edit submit_edit">{{lang "topic_update_button"}}</button>
{{end}} {{end}}
</div> </div>
</form> </form>
@ -26,10 +26,10 @@
{{if .Poll.ID}} {{if .Poll.ID}}
<form id="poll_{{.Poll.ID}}_form" action="/poll/vote/{{.Poll.ID}}?session={{.CurrentUser.Session}}" method="post"></form> <form id="poll_{{.Poll.ID}}_form" action="/poll/vote/{{.Poll.ID}}?session={{.CurrentUser.Session}}" method="post"></form>
<article class="rowitem passive deletable_block editable_parent post_item poll_item top_post hide_on_edit"> <article class="rowitem passive deletable_block editable_parent post_item poll_item top_post hide_on_edit">
<div class="userinfo" aria-label="The information on the poster"> <div class="userinfo" aria-label="{{lang "topic_userinfo_aria"}}">
<div class="avatar_item" style="background-image: url({{.Topic.Avatar}}), url(/static/white-dot.jpg);background-position: 0px -10px;">&nbsp;</div> <div class="avatar_item" style="background-image: url({{.Topic.Avatar}}), url(/static/white-dot.jpg);background-position: 0px -10px;">&nbsp;</div>
<a href="{{.Topic.UserLink}}" class="the_name" rel="author">{{.Topic.CreatedByName}}</a> <a href="{{.Topic.UserLink}}" class="the_name" rel="author">{{.Topic.CreatedByName}}</a>
{{if .Topic.Tag}}<div class="tag_block"><div class="tag_pre"></div><div class="post_tag">{{.Topic.Tag}}</div><div class="tag_post"></div></div>{{else}}<div class="tag_block"><div class="tag_pre"></div><div class="post_tag post_level">Level {{.Topic.Level}}</div><div class="tag_post"></div></div>{{end}} {{if .Topic.Tag}}<div class="tag_block"><div class="tag_pre"></div><div class="post_tag">{{.Topic.Tag}}</div><div class="tag_post"></div></div>{{else}}<div class="tag_block"><div class="tag_pre"></div><div class="post_tag post_level">{{lang "topic_level_prefix"}}{{.Topic.Level}}</div><div class="tag_post"></div></div>{{end}}
</div> </div>
<div id="poll_voter_{{.Poll.ID}}" class="content_container poll_voter"> <div id="poll_voter_{{.Poll.ID}}" class="content_container poll_voter">
<div class="topic_content user_content"> <div class="topic_content user_content">
@ -43,9 +43,9 @@
</div> </div>
{{end}} {{end}}
<div class="poll_buttons"> <div class="poll_buttons">
<button form="poll_{{.Poll.ID}}_form" class="poll_vote_button">Vote</button> <button form="poll_{{.Poll.ID}}_form" class="poll_vote_button">{{lang "topic_poll_vote"}}</button>
<button class="poll_results_button" data-poll-id="{{.Poll.ID}}">Results</button> <button class="poll_results_button" data-poll-id="{{.Poll.ID}}">{{lang "topic_poll_results"}}</button>
<a href="#"><button class="poll_cancel_button">Cancel</button></a> <a href="#"><button class="poll_cancel_button">{{lang "topic_poll_cancel"}}</button></a>
</div> </div>
</div> </div>
</div> </div>
@ -54,32 +54,32 @@
</div> </div>
</article> </article>
{{end}} {{end}}
<article itemscope itemtype="http://schema.org/CreativeWork" class="rowitem passive deletable_block editable_parent post_item top_post" aria-label="The opening post for this topic"> <article itemscope itemtype="http://schema.org/CreativeWork" class="rowitem passive deletable_block editable_parent post_item top_post" aria-label="{{lang "topic_opening_post_aria"}}">
<div class="userinfo" aria-label="The information on the poster"> <div class="userinfo" aria-label="{{lang "topic_userinfo_aria"}}">
<div class="avatar_item" style="background-image: url({{.Topic.Avatar}}), url(/static/white-dot.jpg);background-position: 0px -10px;">&nbsp;</div> <div class="avatar_item" style="background-image: url({{.Topic.Avatar}}), url(/static/white-dot.jpg);background-position: 0px -10px;">&nbsp;</div>
<a href="{{.Topic.UserLink}}" class="the_name" rel="author">{{.Topic.CreatedByName}}</a> <a href="{{.Topic.UserLink}}" class="the_name" rel="author">{{.Topic.CreatedByName}}</a>
{{if .Topic.Tag}}<div class="tag_block"><div class="tag_pre"></div><div class="post_tag">{{.Topic.Tag}}</div><div class="tag_post"></div></div>{{else}}<div class="tag_block"><div class="tag_pre"></div><div class="post_tag post_level">Level {{.Topic.Level}}</div><div class="tag_post"></div></div>{{end}} {{if .Topic.Tag}}<div class="tag_block"><div class="tag_pre"></div><div class="post_tag">{{.Topic.Tag}}</div><div class="tag_post"></div></div>{{else}}<div class="tag_block"><div class="tag_pre"></div><div class="post_tag post_level">{{lang "topic_level_prefix"}}{{.Topic.Level}}</div><div class="tag_post"></div></div>{{end}}
</div> </div>
<div class="content_container"> <div class="content_container">
<div class="hide_on_edit topic_content user_content" itemprop="text">{{.Topic.ContentHTML}}</div> <div class="hide_on_edit topic_content user_content" itemprop="text">{{.Topic.ContentHTML}}</div>
<textarea name="topic_content" class="show_on_edit topic_content_input">{{.Topic.Content}}</textarea> <textarea name="topic_content" class="show_on_edit topic_content_input">{{.Topic.Content}}</textarea>
<div class="button_container"> <div class="button_container">
{{if .CurrentUser.Loggedin}} {{if .CurrentUser.Loggedin}}
{{if .CurrentUser.Perms.LikeItem}}<a href="/topic/like/submit/{{.Topic.ID}}?session={{.CurrentUser.Session}}" class="action_button like_item add_like" aria-label="Like this post" data-action="like"></a>{{end}} {{if .CurrentUser.Perms.LikeItem}}<a href="/topic/like/submit/{{.Topic.ID}}?session={{.CurrentUser.Session}}" class="action_button like_item add_like" aria-label="{{lang "topic_like_aria"}}" data-action="like"></a>{{end}}
{{if .CurrentUser.Perms.EditTopic}}<a href="/topic/edit/{{.Topic.ID}}" class="action_button open_edit" aria-label="Edit this post" data-action="edit"></a>{{end}} {{if .CurrentUser.Perms.EditTopic}}<a href="/topic/edit/{{.Topic.ID}}" class="action_button open_edit" aria-label="{{lang "topic_edit_aria"}}" data-action="edit"></a>{{end}}
{{if .CurrentUser.Perms.DeleteTopic}}<a href="/topic/delete/submit/{{.Topic.ID}}?session={{.CurrentUser.Session}}" class="action_button delete_item" aria-label="Delete this post" data-action="delete"></a>{{end}} {{if .CurrentUser.Perms.DeleteTopic}}<a href="/topic/delete/submit/{{.Topic.ID}}?session={{.CurrentUser.Session}}" class="action_button delete_item" aria-label="{{lang "topic_delete_aria"}}" data-action="delete"></a>{{end}}
{{if .CurrentUser.Perms.CloseTopic}} {{if .CurrentUser.Perms.CloseTopic}}
{{if .Topic.IsClosed}}<a href='/topic/unlock/submit/{{.Topic.ID}}?session={{.CurrentUser.Session}}' class="action_button unlock_item" data-action="unlock"></a>{{else}}<a href='/topic/lock/submit/{{.Topic.ID}}?session={{.CurrentUser.Session}}' class="action_button lock_item" data-action="lock"></a>{{end}}{{end}} {{if .Topic.IsClosed}}<a href='/topic/unlock/submit/{{.Topic.ID}}?session={{.CurrentUser.Session}}' class="action_button unlock_item" data-action="unlock" aria-label="{{lang "topic_unlock_aria"}}"></a>{{else}}<a href='/topic/lock/submit/{{.Topic.ID}}?session={{.CurrentUser.Session}}' class="action_button lock_item" data-action="lock" aria-label="{{lang "topic_lock_aria"}}"></a>{{end}}{{end}}
{{if .CurrentUser.Perms.PinTopic}} {{if .CurrentUser.Perms.PinTopic}}
{{if .Topic.Sticky}}<a href='/topic/unstick/submit/{{.Topic.ID}}?session={{.CurrentUser.Session}}' class="action_button unpin_item" data-action="unpin"></a>{{else}}<a href='/topic/stick/submit/{{.Topic.ID}}?session={{.CurrentUser.Session}}' class="action_button pin_item" data-action="pin"></a>{{end}}{{end}} {{if .Topic.Sticky}}<a href='/topic/unstick/submit/{{.Topic.ID}}?session={{.CurrentUser.Session}}' class="action_button unpin_item" data-action="unpin" aria-label="{{lang "topic_unpin_aria"}}"></a>{{else}}<a href='/topic/stick/submit/{{.Topic.ID}}?session={{.CurrentUser.Session}}' class="action_button pin_item" data-action="pin" aria-label="{{lang "topic_pin_aria"}}"></a>{{end}}{{end}}
{{if .CurrentUser.Perms.ViewIPs}}<a href="/users/ips/?ip={{.Topic.IPAddress}}" title="IP Address" class="action_button ip_item_button hide_on_big" aria-label="This user's IP" data-action="ip"></a>{{end}} {{if .CurrentUser.Perms.ViewIPs}}<a href="/users/ips/?ip={{.Topic.IPAddress}}" title="{{lang "topic_ip_full_tooltip"}}" class="action_button ip_item_button hide_on_big" aria-label="{{lang "topic_ip_full_aria"}}" data-action="ip"></a>{{end}}
<a href="/report/submit/{{.Topic.ID}}?session={{.CurrentUser.Session}}&type=topic" class="action_button report_item" aria-label="Report this post" data-action="report"></a> <a href="/report/submit/{{.Topic.ID}}?session={{.CurrentUser.Session}}&type=topic" class="action_button report_item" aria-label="{{lang "topic_report_aria"}}" data-action="report"></a>
<a href="#" class="action_button button_menu"></a> <a href="#" class="action_button button_menu"></a>
{{end}} {{end}}
<div class="action_button_right{{if .Topic.LikeCount}} has_likes{{end}}"> <div class="action_button_right{{if .Topic.LikeCount}} has_likes{{end}}">
{{if .Topic.LikeCount}}<a class="action_button like_count hide_on_micro">{{.Topic.LikeCount}}</a>{{end}} {{if .Topic.LikeCount}}<a class="action_button like_count hide_on_micro" aria-label="{{lang "topic_like_count_aria"}}">{{.Topic.LikeCount}}</a>{{end}}
<a class="action_button created_at hide_on_mobile">{{.Topic.RelativeCreatedAt}}</a> <a class="action_button created_at hide_on_mobile">{{.Topic.RelativeCreatedAt}}</a>
{{if .CurrentUser.Perms.ViewIPs}}<a href="/users/ips/?ip={{.Topic.IPAddress}}" title="IP Address" class="action_button ip_item hide_on_mobile">{{.Topic.IPAddress}}</a>{{end}} {{if .CurrentUser.Perms.ViewIPs}}<a href="/users/ips/?ip={{.Topic.IPAddress}}" title="{{lang "topic_ip_full_tooltip"}}" class="action_button ip_item hide_on_mobile" aria-hidden="true">{{.Topic.IPAddress}}</a>{{end}}
</div> </div>
</div> </div>
</div><div style="clear:both;"></div> </div><div style="clear:both;"></div>
@ -87,31 +87,31 @@
{{range .ItemList}} {{range .ItemList}}
<article itemscope itemtype="http://schema.org/CreativeWork" class="rowitem passive deletable_block editable_parent post_item {{if .ActionType}}action_item{{end}}"> <article itemscope itemtype="http://schema.org/CreativeWork" class="rowitem passive deletable_block editable_parent post_item {{if .ActionType}}action_item{{end}}">
<div class="userinfo" aria-label="The information on the poster"> <div class="userinfo" aria-label="{{lang "topic_userinfo_aria"}}">
<div class="avatar_item" style="background-image: url({{.Avatar}}), url(/static/white-dot.jpg);background-position: 0px -10px;">&nbsp;</div> <div class="avatar_item" style="background-image: url({{.Avatar}}), url(/static/white-dot.jpg);background-position: 0px -10px;">&nbsp;</div>
<a href="{{.UserLink}}" class="the_name" rel="author">{{.CreatedByName}}</a> <a href="{{.UserLink}}" class="the_name" rel="author">{{.CreatedByName}}</a>
{{if .Tag}}<div class="tag_block"><div class="tag_pre"></div><div class="post_tag">{{.Tag}}</div><div class="tag_post"></div></div>{{else}}<div class="tag_block"><div class="tag_pre"></div><div class="post_tag post_level">Level {{.Level}}</div><div class="tag_post"></div></div>{{end}} {{if .Tag}}<div class="tag_block"><div class="tag_pre"></div><div class="post_tag">{{.Tag}}</div><div class="tag_post"></div></div>{{else}}<div class="tag_block"><div class="tag_pre"></div><div class="post_tag post_level">{{lang "topic_level_prefix"}}{{.Level}}</div><div class="tag_post"></div></div>{{end}}
</div> </div>
<div class="content_container" {{if .ActionType}}style="margin-left: 0px;"{{end}}> <div class="content_container" {{if .ActionType}}style="margin-left: 0px;"{{end}}>
{{if .ActionType}} {{if .ActionType}}
<span class="action_icon" style="font-size: 18px;padding-right: 5px;">{{.ActionIcon}}</span> <span class="action_icon" style="font-size: 18px;padding-right: 5px;" aria-hidden="true">{{.ActionIcon}}</span>
<span itemprop="text">{{.ActionType}}</span> <span itemprop="text">{{.ActionType}}</span>
{{else}} {{else}}
{{/** TODO: We might end up with <br>s in the inline editor, fix this **/}} {{/** TODO: We might end up with <br>s in the inline editor, fix this **/}}
<div class="editable_block user_content" itemprop="text">{{.ContentHtml}}</div> <div class="editable_block user_content" itemprop="text">{{.ContentHtml}}</div>
<div class="button_container"> <div class="button_container">
{{if $.CurrentUser.Loggedin}} {{if $.CurrentUser.Loggedin}}
{{if $.CurrentUser.Perms.LikeItem}}<a href="/reply/like/submit/{{.ID}}?session={{$.CurrentUser.Session}}" class="action_button like_item add_like" aria-label="Like this post" data-action="like"></a>{{end}} {{if $.CurrentUser.Perms.LikeItem}}<a href="/reply/like/submit/{{.ID}}?session={{$.CurrentUser.Session}}" class="action_button like_item add_like" aria-label="{{lang "topic_post_like_aria"}}" data-action="like"></a>{{end}}
{{if $.CurrentUser.Perms.EditReply}}<a href="/reply/edit/submit/{{.ID}}?session={{$.CurrentUser.Session}}" class="action_button edit_item" aria-label="Edit this post" data-action="edit"></a>{{end}} {{if $.CurrentUser.Perms.EditReply}}<a href="/reply/edit/submit/{{.ID}}?session={{$.CurrentUser.Session}}" class="action_button edit_item" aria-label="{{lang "topic_post_edit_aria"}}" data-action="edit"></a>{{end}}
{{if $.CurrentUser.Perms.DeleteReply}}<a href="/reply/delete/submit/{{.ID}}?session={{$.CurrentUser.Session}}" class="action_button delete_item" aria-label="Delete this post" data-action="delete"></a>{{end}} {{if $.CurrentUser.Perms.DeleteReply}}<a href="/reply/delete/submit/{{.ID}}?session={{$.CurrentUser.Session}}" class="action_button delete_item" aria-label="{{lang "topic_post_delete_aria"}}" data-action="delete"></a>{{end}}
{{if $.CurrentUser.Perms.ViewIPs}}<a href="/users/ips/?ip={{.IPAddress}}" title="IP Address" class="action_button ip_item_button hide_on_big" aria-label="This user's IP Address" data-action="ip"></a>{{end}} {{if $.CurrentUser.Perms.ViewIPs}}<a href="/users/ips/?ip={{.IPAddress}}" title="{{lang "topic_ip_full_tooltip"}}" class="action_button ip_item_button hide_on_big" aria-label="{{lang "topic_ip_full_aria"}}" data-action="ip"></a>{{end}}
<a href="/report/submit/{{.ID}}?session={{$.CurrentUser.Session}}&type=reply" class="action_button report_item" aria-label="Report this post" data-action="report"></a> <a href="/report/submit/{{.ID}}?session={{$.CurrentUser.Session}}&type=reply" class="action_button report_item" aria-label="{{lang "topic_report_aria"}}" data-action="report"></a>
<a href="#" class="action_button button_menu"></a> <a href="#" class="action_button button_menu"></a>
{{end}} {{end}}
<div class="action_button_right{{if .LikeCount}} has_likes{{end}}"> <div class="action_button_right{{if .LikeCount}} has_likes{{end}}">
{{if .LikeCount}}<a class="action_button like_count hide_on_micro">{{.LikeCount}}</a>{{end}} {{if .LikeCount}}<a class="action_button like_count hide_on_micro" aria-label="{{lang "topic_post_like_count_tooltip"}}">{{.LikeCount}}</a>{{end}}
<a class="action_button created_at hide_on_mobile">{{.RelativeCreatedAt}}</a> <a class="action_button created_at hide_on_mobile">{{.RelativeCreatedAt}}</a>
{{if $.CurrentUser.Perms.ViewIPs}}<a href="/users/ips/?ip={{.IPAddress}}" title="IP Address" class="action_button ip_item hide_on_mobile">{{.IPAddress}}</a>{{end}} {{if $.CurrentUser.Perms.ViewIPs}}<a href="/users/ips/?ip={{.IPAddress}}" title="IP Address" class="action_button ip_item hide_on_mobile" aria-hidden="true">{{.IPAddress}}</a>{{end}}
</div> </div>
</div> </div>
{{end}} {{end}}
@ -122,18 +122,18 @@
{{if .CurrentUser.Perms.CreateReply}} {{if .CurrentUser.Perms.CreateReply}}
<div class="rowblock topic_reply_container"> <div class="rowblock topic_reply_container">
<div class="userinfo" aria-label="The information on the poster"> <div class="userinfo" aria-label="{{lang "topic_your_information"}}">
<div class="avatar_item" style="background-image: url({{.CurrentUser.Avatar}}), url(/static/white-dot.jpg);background-position: 0px -10px;">&nbsp;</div> <div class="avatar_item" style="background-image: url({{.CurrentUser.Avatar}}), url(/static/white-dot.jpg);background-position: 0px -10px;">&nbsp;</div>
<a href="{{.CurrentUser.Link}}" class="the_name" rel="author">{{.CurrentUser.Name}}</a> <a href="{{.CurrentUser.Link}}" class="the_name" rel="author">{{.CurrentUser.Name}}</a>
{{if .CurrentUser.Tag}}<div class="tag_block"><div class="tag_pre"></div><div class="post_tag">{{.CurrentUser.Tag}}</div><div class="tag_post"></div></div>{{else}}<div class="tag_block"><div class="tag_pre"></div><div class="post_tag post_level">Level {{.CurrentUser.Level}}</div><div class="tag_post"></div></div>{{end}} {{if .CurrentUser.Tag}}<div class="tag_block"><div class="tag_pre"></div><div class="post_tag">{{.CurrentUser.Tag}}</div><div class="tag_post"></div></div>{{else}}<div class="tag_block"><div class="tag_pre"></div><div class="post_tag post_level">{{lang "topic_level_prefix"}}{{.CurrentUser.Level}}</div><div class="tag_post"></div></div>{{end}}
</div> </div>
<div class="rowblock topic_reply_form quick_create_form"> <div class="rowblock topic_reply_form quick_create_form" aria-label="{{lang "topic_reply_aria"}}">
<form id="quick_post_form" enctype="multipart/form-data" action="/reply/create/?session={{.CurrentUser.Session}}" method="post"></form> <form id="quick_post_form" enctype="multipart/form-data" action="/reply/create/?session={{.CurrentUser.Session}}" method="post"></form>
<input form="quick_post_form" name="tid" value='{{.Topic.ID}}' type="hidden" /> <input form="quick_post_form" name="tid" value='{{.Topic.ID}}' type="hidden" />
<input form="quick_post_form" id="has_poll_input" name="has_poll" value="0" type="hidden" /> <input form="quick_post_form" id="has_poll_input" name="has_poll" value="0" type="hidden" />
<div class="formrow real_first_child"> <div class="formrow real_first_child">
<div class="formitem"> <div class="formitem">
<textarea id="input_content" form="quick_post_form" name="reply-content" placeholder="What do you think?" required></textarea> <textarea id="input_content" form="quick_post_form" name="reply-content" placeholder="{{lang "topic_reply_content_alt"}}" required></textarea>
</div> </div>
</div> </div>
<div class="formrow poll_content_row auto_hide"> <div class="formrow poll_content_row auto_hide">
@ -141,17 +141,17 @@
<div class="pollinput" data-pollinput="0"> <div class="pollinput" data-pollinput="0">
<input type="checkbox" disabled /> <input type="checkbox" disabled />
<label class="pollinputlabel"></label> <label class="pollinputlabel"></label>
<input form="quick_post_form" name="pollinputitem[0]" class="pollinputinput" type="text" placeholder="Add new poll option" /> <input form="quick_post_form" name="pollinputitem[0]" class="pollinputinput" type="text" placeholder="{{lang "topic_reply_add_poll_option"}}" />
</div> </div>
</div> </div>
</div> </div>
<div class="formrow quick_button_row"> <div class="formrow quick_button_row">
<div class="formitem"> <div class="formitem">
<button form="quick_post_form" name="reply-button" class="formbutton">Create Reply</button> <button form="quick_post_form" name="reply-button" class="formbutton">{{lang "topic_reply_button"}}</button>
<button form="quick_post_form" class="formbutton" id="add_poll_button">Add Poll</button> <button form="quick_post_form" class="formbutton" id="add_poll_button">{{lang "topic_reply_add_poll_button"}}</button>
{{if .CurrentUser.Perms.UploadFiles}} {{if .CurrentUser.Perms.UploadFiles}}
<input name="upload_files" form="quick_post_form" id="upload_files" multiple type="file" style="display: none;" /> <input name="upload_files" form="quick_post_form" id="upload_files" multiple type="file" style="display: none;" />
<label for="upload_files" class="formbutton add_file_button">Add File</label> <label for="upload_files" class="formbutton add_file_button">{{lang "topic_reply_add_file_button"}}</label>
<div id="upload_file_dock"></div>{{end}} <div id="upload_file_dock"></div>{{end}}
</div> </div>
</div> </div>

View File

@ -2,17 +2,17 @@
<main id="topicsItemList" itemscope itemtype="http://schema.org/ItemList"> <main id="topicsItemList" itemscope itemtype="http://schema.org/ItemList">
<div class="rowblock rowhead topic_list_title_block{{if ne .CurrentUser.ID 0}} has_opt{{end}}"> <div class="rowblock rowhead topic_list_title_block{{if ne .CurrentUser.ID 0}} has_opt{{end}}">
<div class="rowitem topic_list_title"><h1 itemprop="name">All Topics</h1></div> <div class="rowitem topic_list_title"><h1 itemprop="name">{{lang "topics_head"}}</h1></div>
{{if ne .CurrentUser.ID 0}} {{if ne .CurrentUser.ID 0}}
<div class="optbox"> <div class="optbox">
{{if .ForumList}} {{if .ForumList}}
<div class="pre_opt auto_hide"></div> <div class="pre_opt auto_hide"></div>
<div class="opt create_topic_opt" title="Create Topic" aria-label="Create a topic"><a class="create_topic_link" href="/topics/create/"></a></div> <div class="opt create_topic_opt" title="{{lang "topic_list_create_topic_tooltip"}}" aria-label="{{lang "topic_list_create_topic_aria"}}"><a class="create_topic_link" href="/topics/create/"></a></div>
{{/** TODO: Add a permissions check for this **/}} {{/** TODO: Add a permissions check for this **/}}
<div class="opt mod_opt" title="Moderate"> <div class="opt mod_opt" title="{{lang "topic_list_moderate_tooltip"}}">
<a class="moderate_link" href="#" aria-label="Moderate Posts"></a> <a class="moderate_link" href="#" aria-label="{{lang "topic_list_moderate_aria"}}"></a>
</div> </div>
{{else}}<div class="opt locked_opt" title="You don't have the permissions needed to create a topic" aria-label="You don't have the permissions needed to make a topic anywhere"><a></a></div>{{end}} {{else}}<div class="opt locked_opt" title="{{lang "topics_locked_tooltip"}}" aria-label="{{lang "topics_locked_aria"}}"><a></a></div>{{end}}
</div> </div>
<div style="clear: both;"></div> <div style="clear: both;"></div>
{{end}} {{end}}
@ -23,15 +23,15 @@
<div class="mod_floater auto_hide"> <div class="mod_floater auto_hide">
<form method="post"> <form method="post">
<div class="mod_floater_head"> <div class="mod_floater_head">
<span>What do you want to do with these 18 topics?</span> <span>{{lang "topic_list_what_to_do"}}</span>
</div> </div>
<div class="mod_floater_body"> <div class="mod_floater_body">
<select class="mod_floater_options"> <select class="mod_floater_options">
<option val="delete">Delete them</option> <option val="delete">{{lang "topic_list_moderate_delete"}}</option>
<option val="lock">Lock them</option> <option val="lock">{{lang "topic_list_moderate_lock"}}</option>
<option val="move">Move them</option> <option val="move">{{lang "topic_list_moderate_move"}}</option>
</select> </select>
<button class="mod_floater_submit">Run</button> <button class="mod_floater_submit">{{lang "topic_list_moderate_run"}}</button>
</div> </div>
</form> </form>
</div> </div>
@ -43,7 +43,7 @@
<form action="/topic/move/submit/?session={{.CurrentUser.Session}}" method="post"> <form action="/topic/move/submit/?session={{.CurrentUser.Session}}" method="post">
<input id="mover_fid" name="fid" value="0" type="hidden" /> <input id="mover_fid" name="fid" value="0" type="hidden" />
<div class="pane_header"> <div class="pane_header">
<h3>Move these topics to?</h3> <h3>{{lang "topic_list_move_head"}}</h3>
</div> </div>
<div class="pane_body"> <div class="pane_body">
<div class="pane_table"> <div class="pane_table">
@ -51,14 +51,14 @@
</div> </div>
</div> </div>
<div class="pane_buttons"> <div class="pane_buttons">
<button id="mover_submit">Move Topics</button> <button id="mover_submit">{{lang "topic_list_move_button"}}</button>
</div> </div>
</form> </form>
</div> </div>
<div class="rowblock topic_create_form quick_create_form" style="display: none;" aria-label="Quick Topic Form"> <div class="rowblock topic_create_form quick_create_form" style="display: none;" aria-label="{{lang "quick_topic_aria"}}">
<form name="topic_create_form_form" id="quick_post_form" enctype="multipart/form-data" action="/topic/create/submit/?session={{.CurrentUser.Session}}" method="post"></form> <form name="topic_create_form_form" id="quick_post_form" enctype="multipart/form-data" action="/topic/create/submit/?session={{.CurrentUser.Session}}" method="post"></form>
<input form="quick_post_form" id="has_poll_input" name="has_poll" value="0" type="hidden" /> <input form="quick_post_form" id="has_poll_input" name="has_poll" value="0" type="hidden" />
<img class="little_row_avatar" src="{{.CurrentUser.Avatar}}" height="64" alt="Your Avatar" title="Your Avatar" /> <img class="little_row_avatar" src="{{.CurrentUser.Avatar}}" height="64" alt="{{lang "quick_topic_avatar_alt"}}" title="{{lang "quick_topic_avatar_tooltip"}}" />
<div class="main_form"> <div class="main_form">
<div class="topic_meta"> <div class="topic_meta">
<div class="formrow topic_board_row real_first_child"> <div class="formrow topic_board_row real_first_child">
@ -68,13 +68,13 @@
</div> </div>
<div class="formrow topic_name_row"> <div class="formrow topic_name_row">
<div class="formitem"> <div class="formitem">
<input form="quick_post_form" name="topic-name" placeholder="What's up?" required> <input form="quick_post_form" name="topic-name" placeholder="{{lang "quick_topic_whatsup"}}" required>
</div> </div>
</div> </div>
</div> </div>
<div class="formrow topic_content_row"> <div class="formrow topic_content_row">
<div class="formitem"> <div class="formitem">
<textarea form="quick_post_form" id="input_content" name="topic-content" placeholder="Insert post here" required></textarea> <textarea form="quick_post_form" id="input_content" name="topic-content" placeholder="{{lang "quick_topic_content_placeholder"}}" required></textarea>
</div> </div>
</div> </div>
<div class="formrow poll_content_row auto_hide"> <div class="formrow poll_content_row auto_hide">
@ -82,26 +82,26 @@
<div class="pollinput" data-pollinput="0"> <div class="pollinput" data-pollinput="0">
<input type="checkbox" disabled /> <input type="checkbox" disabled />
<label class="pollinputlabel"></label> <label class="pollinputlabel"></label>
<input form="quick_post_form" name="pollinputitem[0]" class="pollinputinput" type="text" placeholder="Add new poll option" /> <input form="quick_post_form" name="pollinputitem[0]" class="pollinputinput" type="text" placeholder="{{lang "quick_topic_add_poll_option"}}" />
</div> </div>
</div> </div>
</div> </div>
<div class="formrow quick_button_row"> <div class="formrow quick_button_row">
<div class="formitem"> <div class="formitem">
<button form="quick_post_form" class="formbutton">Create Topic</button> <button form="quick_post_form" class="formbutton">{{lang "quick_topic_create_topic_button"}}</button>
<button form="quick_post_form" class="formbutton" id="add_poll_button">Add Poll</button> <button form="quick_post_form" class="formbutton" id="add_poll_button">{{lang "quick_topic_add_poll_button"}}</button>
{{if .CurrentUser.Perms.UploadFiles}} {{if .CurrentUser.Perms.UploadFiles}}
<input name="upload_files" form="quick_post_form" id="upload_files" multiple type="file" style="display: none;" /> <input name="upload_files" form="quick_post_form" id="upload_files" multiple type="file" style="display: none;" />
<label for="upload_files" class="formbutton add_file_button">Add File</label> <label for="upload_files" class="formbutton add_file_button">{{lang "quick_topic_add_file_button"}}</label>
<div id="upload_file_dock"></div>{{end}} <div id="upload_file_dock"></div>{{end}}
<button class="formbutton close_form">Cancel</button> <button class="formbutton close_form">{{lang "quick_topic_cancel_button"}}</button>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
{{end}} {{end}}
{{end}} {{end}}
<div id="topic_list" class="rowblock topic_list" aria-label="A list containing topics from every forum"> <div id="topic_list" class="rowblock topic_list" aria-label="{{lang "topics_list_aria"}}">
{{range .TopicList}}<div class="topic_row" data-tid="{{.ID}}"> {{range .TopicList}}<div class="topic_row" data-tid="{{.ID}}">
<div class="rowitem topic_left passive datarow {{if .Sticky}}topic_sticky{{else if .IsClosed}}topic_closed{{end}}"> <div class="rowitem topic_left passive datarow {{if .Sticky}}topic_sticky{{else if .IsClosed}}topic_closed{{end}}">
<span class="selector"></span> <span class="selector"></span>
@ -110,8 +110,8 @@
<a class="rowtopic" href="{{.Link}}" itemprop="itemListElement"><span>{{.Title}}</span></a> {{if .ForumName}}<a class="rowsmall parent_forum" href="{{.ForumLink}}">{{.ForumName}}</a>{{end}} <a class="rowtopic" href="{{.Link}}" itemprop="itemListElement"><span>{{.Title}}</span></a> {{if .ForumName}}<a class="rowsmall parent_forum" href="{{.ForumLink}}">{{.ForumName}}</a>{{end}}
<br /><a class="rowsmall starter" href="{{.Creator.Link}}">{{.Creator.Name}}</a> <br /><a class="rowsmall starter" href="{{.Creator.Link}}">{{.Creator.Name}}</a>
{{/** TODO: Avoid the double '|' when both .IsClosed and .Sticky are set to true. We could probably do this with CSS **/}} {{/** TODO: Avoid the double '|' when both .IsClosed and .Sticky are set to true. We could probably do this with CSS **/}}
{{if .IsClosed}}<span class="rowsmall topic_status_e topic_status_closed" title="Status: Closed"> | &#x1F512;&#xFE0E</span>{{end}} {{if .IsClosed}}<span class="rowsmall topic_status_e topic_status_closed" title="{{lang "status_closed_tooltip"}}"> | &#x1F512;&#xFE0E</span>{{end}}
{{if .Sticky}}<span class="rowsmall topic_status_e topic_status_sticky" title="Status: Pinned"> | &#x1F4CD;&#xFE0E</span>{{end}} {{if .Sticky}}<span class="rowsmall topic_status_e topic_status_sticky" title="{{lang "status_pinned_tooltip"}}"> | &#x1F4CD;&#xFE0E</span>{{end}}
</span> </span>
<span class="topic_inner_right rowsmall" style="float: right;"> <span class="topic_inner_right rowsmall" style="float: right;">
<span class="replyCount">{{.PostCount}}</span><br /> <span class="replyCount">{{.PostCount}}</span><br />
@ -125,20 +125,11 @@
<span class="rowsmall lastReplyAt">{{.RelativeLastReplyAt}}</span> <span class="rowsmall lastReplyAt">{{.RelativeLastReplyAt}}</span>
</span> </span>
</div> </div>
</div>{{else}}<div class="rowitem passive rowmsg">There aren't any topics yet.{{if .CurrentUser.Perms.CreateTopic}} <a href="/topics/create/">Start one?</a>{{end}}</div>{{end}} </div>{{else}}<div class="rowitem passive rowmsg">{{lang "topics_no_topics"}}{{if .CurrentUser.Perms.CreateTopic}} <a href="/topics/create/">{{lang "topics_start_one"}}</a>{{end}}</div>{{end}}
</div> </div>
{{if gt .LastPage 1}} {{if gt .LastPage 1}}
<div class="pageset"> {{template "paginator.html" . }}
{{if gt .Page 1}}<div class="pageitem"><a href="?page={{subtract .Page 1}}" rel="prev" aria-label="Go to the previous page">Prev</a></div>
<link rel="prev" href="?page={{subtract .Page 1}}" />{{end}}
{{range .PageList}}
<div class="pageitem"><a href="?page={{.}}">{{.}}</a></div>
{{end}}
{{if ne .LastPage .Page}}
<link rel="next" href="?page={{add .Page 1}}" />
<div class="pageitem"><a href="?page={{add .Page 1}}" rel="next" aria-label="Go to the next page">Next</a></div>{{end}}
</div>
{{end}} {{end}}
</main> </main>

View File

@ -2,9 +2,9 @@
--header-border-color: hsl(0,0%,80%); --header-border-color: hsl(0,0%,80%);
--element-border-color: hsl(0,0%,85%); --element-border-color: hsl(0,0%,85%);
--element-background-color: white; --element-background-color: white;
--replies-lang-string: " replies"; --replies-lang-string: "{{index .Phrases "topics_replies_suffix"}}";
--topics-lang-string: " topics"; --topics-lang-string: "{{index .Phrases "forums_topics_suffix"}}";
--likes-lang-string: " likes"; --likes-lang-string: "{{index .Phrases "topics_gap_likes_suffix"}}";
--primary-link-color: hsl(0,0%,40%); --primary-link-color: hsl(0,0%,40%);
--primary-text-color: hsl(0,0%,20%); --primary-text-color: hsl(0,0%,20%);
--lightened-primary-text-color: hsl(0,0%,30%); --lightened-primary-text-color: hsl(0,0%,30%);
@ -105,7 +105,7 @@ li {
margin-right: 6px; margin-right: 6px;
} }
#menu_forums a:after { #menu_forums a:after {
content: "Forums"; content: "{{index .Phrases "menu_forums"}}";
} }
.menu_topics a:before { .menu_topics a:before {
margin-right: 4px; margin-right: 4px;
@ -114,7 +114,7 @@ li {
top: -2px; top: -2px;
} }
.menu_topics a:after { .menu_topics a:after {
content: "Topics"; content: "{{index .Phrases "menu_topics"}}";
} }
.menu_alerts { .menu_alerts {
color: var(--primary-link-color); color: var(--primary-link-color);
@ -138,7 +138,7 @@ li {
left: -1px; left: -1px;
} }
.alert_aftercounter:before { .alert_aftercounter:before {
content: "Alerts"; content: "{{index .Phrases "menu_alerts"}}";
margin-left: 4px; margin-left: 4px;
} }
@ -147,7 +147,7 @@ li {
margin-right: 6px; margin-right: 6px;
} }
.menu_account a:after { .menu_account a:after {
content: "Account"; content: "{{index .Phrases "menu_account"}}";
} }
.menu_profile a:before { .menu_profile a:before {
content: "\f2c0"; content: "\f2c0";
@ -157,27 +157,27 @@ li {
font-size: 14px; font-size: 14px;
} }
.menu_profile a:after { .menu_profile a:after {
content: "Profile"; content: "{{index .Phrases "menu_profile"}}";
} }
.menu_panel a:before { .menu_panel a:before {
margin-right: 6px; margin-right: 6px;
content: "\f108"; content: "\f108";
} }
.menu_panel a:after { .menu_panel a:after {
content: "Panel"; content: "{{index .Phrases "menu_panel"}}";
} }
.menu_logout a:before { .menu_logout a:before {
content: "\f08b"; content: "\f08b";
margin-right: 3px; margin-right: 3px;
} }
.menu_logout a:after { .menu_logout a:after {
content: "Logout"; content: "{{index .Phrases "menu_logout"}}";
} }
.menu_login a:after { .menu_login a:after {
content: "Login"; content: "{{index .Phrases "menu_login"}}";
} }
.menu_register a:after { .menu_register a:after {
content: "Register"; content: "{{index .Phrases "menu_register"}}";
} }
ul { ul {
@ -411,7 +411,7 @@ h1, h3 {
margin-right: 10px; margin-right: 10px;
} }
.topic_list_title_block .pre_opt:before { .topic_list_title_block .pre_opt:before {
content: "Click the topics to select them"; content: "{{index .Phrases "topics_click_topics_to_select"}}";
font-size: 14px; font-size: 14px;
} }
.topic_list_title, .forum_title { .topic_list_title, .forum_title {
@ -1003,7 +1003,7 @@ textarea {
margin-left: auto; margin-left: auto;
} }
.like_count:after { .like_count:after {
content: " likes"; content: "{{index .Phrases "topic_like_count"}}";
margin-right: 6px; margin-right: 6px;
} }
@ -1027,31 +1027,31 @@ textarea {
} }
.add_like:before { .add_like:before {
content: "+1"; content: "{{index .Phrases "topic_plus_one"}}";
} }
.button_container .open_edit:after, .edit_item:after{ .button_container .open_edit:after, .edit_item:after{
content: "Edit"; content: "{{index .Phrases "topic_edit_button_text"}}";
} }
.delete_item:after { .delete_item:after {
content: "Delete"; content: "{{index .Phrases "topic_delete_button_text"}}";
} }
.ip_item_button:after { .ip_item_button:after {
content: "IP"; content: "{{index .Phrases "topic_ip_button_text"}}";
} }
.lock_item:after { .lock_item:after {
content: "Lock"; content: "{{index .Phrases "topic_lock_button_text"}}";
} }
.unlock_item:after { .unlock_item:after {
content: "Unlock"; content: "{{index .Phrases "topic_unlock_button_text"}}";
} }
.pin_item:after { .pin_item:after {
content: "Pin"; content: "{{index .Phrases "topic_pin_button_text"}}";
} }
.unpin_item:after { .unpin_item:after {
content: "Unpin"; content: "{{index .Phrases "topic_unpin_button_text"}}";
} }
.report_item:after { .report_item:after {
content: "Report"; content: "{{index .Phrases "topic_report_button_text"}}";
} }
#ip_search_container .rowlist .rowitem { #ip_search_container .rowlist .rowitem {
@ -1705,7 +1705,7 @@ textarea {
content: ""; content: "";
} }
.like_count:before { .like_count:before {
content: "+"; content: "{{index .Phrases "topic_plus"}}";
font-weight: normal; font-weight: normal;
} }
.created_at { .created_at {

View File

@ -156,28 +156,28 @@
margin-top: 1px; margin-top: 1px;
} }
.perm_preset_no_access:before { .perm_preset_no_access:before {
content: "No Access"; content: "{{index .Phrases "panel_perms_no_access" }}";
color: hsl(0,100%,20%); color: hsl(0,100%,20%);
} }
.perm_preset_read_only:before, .perm_preset_can_post:before { .perm_preset_read_only:before, .perm_preset_can_post:before {
color: hsl(120,100%,20%); color: hsl(120,100%,20%);
} }
.perm_preset_read_only:before { .perm_preset_read_only:before {
content: "Read Only"; content: "{{index .Phrases "panel_perms_read_only" }}";
} }
.perm_preset_can_post:before { .perm_preset_can_post:before {
content: "Can Post"; content: "{{index .Phrases "panel_perms_can_post" }}";
} }
.perm_preset_can_moderate:before { .perm_preset_can_moderate:before {
content: "Can Moderate"; content: "{{index .Phrases "panel_perms_can_moderate" }}";
color: hsl(240,100%,20%); color: hsl(240,100%,20%);
} }
.perm_preset_custom:before { .perm_preset_custom:before {
content: "Custom"; content: "{{index .Phrases "panel_perms_custom" }}";
color: hsl(0,0%,20%); color: hsl(0,0%,20%);
} }
.perm_preset_default:before { .perm_preset_default:before {
content: "Default"; content: "{{index .Phrases "panel_perms_default" }}";
} }
.colstack_graph_holder { .colstack_graph_holder {

View File

@ -73,28 +73,28 @@ li {
} }
#menu_forums a:after { #menu_forums a:after {
content: "Forums"; content: "{{index .Phrases "menu_forums"}}";
} }
.menu_topics a:after { .menu_topics a:after {
content: "Topics"; content: "{{index .Phrases "menu_topics"}}";
} }
.menu_account a:after { .menu_account a:after {
content: "Account"; content: "{{index .Phrases "menu_account"}}";
} }
.menu_profile a:after { .menu_profile a:after {
content: "Profile"; content: "{{index .Phrases "menu_profile"}}";
} }
.menu_panel a:after { .menu_panel a:after {
content: "Panel"; content: "{{index .Phrases "menu_panel"}}";
} }
.menu_logout a:after { .menu_logout a:after {
content: "Logout"; content: "{{index .Phrases "menu_logout"}}";
} }
.menu_login a:after { .menu_login a:after {
content: "Login"; content: "{{index .Phrases "menu_login"}}";
} }
.menu_register a:after { .menu_register a:after {
content: "Register"; content: "{{index .Phrases "menu_register"}}";
} }
.alert_bell { .alert_bell {
@ -122,7 +122,7 @@ li {
font-size: 14px; font-size: 14px;
} }
.alert_aftercounter:before { .alert_aftercounter:before {
content: "Alerts"; content: "{{index .Phrases "menu_alerts"}}";
} }
.menu_alerts .alertList, .hide_on_big, .show_on_mobile { .menu_alerts .alertList, .hide_on_big, .show_on_mobile {
@ -306,38 +306,38 @@ a {
} }
.like_label:before { .like_label:before {
content: "+1"; content: "{{index .Phrases "topic_plus_one"}}";
} }
.edit_label:before { .edit_label:before {
content: "Edit"; content: "{{index .Phrases "topic_edit_button_text"}}";
} }
.trash_label:before { .trash_label:before {
content: "Delete"; content: "{{index .Phrases "topic_delete_button_text"}}";
} }
.pin_label:before { .pin_label:before {
content: "Pin"; content: "{{index .Phrases "topic_pin_button_text"}}";
} }
.lock_label:before { .lock_label:before {
content: "Lock"; content: "{{index .Phrases "topic_lock_button_text"}}";
} }
.unlock_label:before { .unlock_label:before {
content: "Unlock"; content: "{{index .Phrases "topic_unlock_button_text"}}";
} }
.unpin_label:before { .unpin_label:before {
content: "Unpin"; content: "{{index .Phrases "topic_unpin_button_text"}}";
} }
.ip_label:before { .ip_label:before {
content: "IP"; content: "{{index .Phrases "topic_ip_button_text"}}";
} }
.flag_label:before { .flag_label:before {
content: "Flag"; content: "{{index .Phrases "topic_flag_button_text"}}";
} }
.level_label:before { .level_label:before {
content: "Level"; content: "{{index .Phrases "topic_level"}}";
} }
.like_count_label:before { .like_count_label:before {
content: "likes"; content: "{{index .Phrases "topics_likes_suffix"}}";
} }
.like_count_label { .like_count_label {
font-size: 12px; font-size: 12px;
@ -353,7 +353,7 @@ a {
margin-right: 2px; margin-right: 2px;
} }
.like_count:before { .like_count:before {
content: "|"; content: "{{index .Phrases "pipe"}}";
margin-right: 5px; margin-right: 5px;
} }
@ -686,10 +686,10 @@ input[type=checkbox]:checked + label.poll_option_label .sel {
} }
.create_topic_opt a:before { .create_topic_opt a:before {
content: "New Topic"; content: "{{index .Phrases "topics_new_topic"}}";
} }
.locked_opt a:before { .locked_opt a:before {
content: "Locked"; content: "{{index .Phrases "forum_locked"}}";
} }
.topic_list .topic_row { .topic_list .topic_row {
@ -739,10 +739,10 @@ input[type=checkbox]:checked + label.poll_option_label .sel {
white-space: nowrap; white-space: nowrap;
} }
.topic_list .lastReplyAt:before { .topic_list .lastReplyAt:before {
content: "Last: "; content: "{{index .Phrases "topics_last"}}: ";
} }
.topic_list .starter:before { .topic_list .starter:before {
content: "Starter: "; content: "{{index .Phrases "topics_starter"}}: ";
} }
.topic_name_input { .topic_name_input {
@ -800,7 +800,7 @@ input[type=checkbox]:checked + label.poll_option_label .sel {
font-weight: normal; font-weight: normal;
} }
#profile_left_pane .report_item:after { #profile_left_pane .report_item:after {
content: "Report"; content: "{{index .Phrases "topic_report_button_text"}}";
} }
#profile_left_lane .profileName { #profile_left_lane .profileName {
font-size: 18px; font-size: 18px;

View File

@ -30,10 +30,10 @@
} }
.edit_button:before { .edit_button:before {
content: "Edit"; content: "{{index .Phrases "panel_edit_button_text"}}";
} }
.delete_button:after { .delete_button:after {
content: "Delete"; content: "{{index .Phrases "panel_delete_button_text"}}";
} }
#panel_forums .rowitem { #panel_forums .rowitem {

View File

@ -62,28 +62,28 @@ li a {
} }
#menu_forums a:after { #menu_forums a:after {
content: "Forums"; content: "{{index .Phrases "menu_forums"}}";
} }
.menu_topics a:after { .menu_topics a:after {
content: "Topics"; content: "{{index .Phrases "menu_topics"}}";
} }
.menu_account a:after { .menu_account a:after {
content: "Account"; content: "{{index .Phrases "menu_account"}}";
} }
.menu_profile a:after { .menu_profile a:after {
content: "Profile"; content: "{{index .Phrases "menu_profile"}}";
} }
.menu_panel a:after { .menu_panel a:after {
content: "Panel"; content: "{{index .Phrases "menu_panel"}}";
} }
.menu_logout a:after { .menu_logout a:after {
content: "Logout"; content: "{{index .Phrases "menu_logout"}}";
} }
.menu_login a:after { .menu_login a:after {
content: "Login"; content: "{{index .Phrases "menu_login"}}";
} }
.menu_register a:after { .menu_register a:after {
content: "Register"; content: "{{index .Phrases "menu_register"}}";
} }
.alert_bell:before { .alert_bell:before {
@ -467,10 +467,10 @@ li a {
white-space: nowrap; white-space: nowrap;
} }
.topic_list .lastReplyAt:before { .topic_list .lastReplyAt:before {
content: "Last: "; content: "{{index .Phrases "topics_last"}}: ";
} }
.topic_list .starter:before { .topic_list .starter:before {
content: "Starter: "; content: "{{index .Phrases "topics_starter"}}: ";
} }
@supports not (display: grid) { @supports not (display: grid) {
@ -720,7 +720,7 @@ button.username {
content: "😀"; content: "😀";
} }
.like_count:after { .like_count:after {
content: " up"; content: "{{index .Phrases "topic_gap_up"}}";
} }
.edit_label:before { .edit_label:before {
content: "🖊️"; content: "🖊️";
@ -768,7 +768,7 @@ button.username {
font-weight: normal; font-weight: normal;
} }
#profile_left_pane .report_item:after { #profile_left_pane .report_item:after {
content: "Report"; content: "{{index .Phrases "topic_report_button_text"}}";
} }
#profile_right_lane { #profile_right_lane {
width: calc(100% - 230px); width: calc(100% - 230px);
@ -962,28 +962,28 @@ input[type=checkbox]:checked + label.poll_option_label .sel {
} }
.add_like:before { .add_like:before {
content: "+1"; content: "{{index .Phrases "topic_plus_one"}}";
} }
.button_container .open_edit:after, .edit_item:after { .button_container .open_edit:after, .edit_item:after {
content: "Edit"; content: "{{index .Phrases "topic_edit_button_text"}}";
} }
.delete_item:after { .delete_item:after {
content: "Delete"; content: "{{index .Phrases "topic_delete_button_text"}}";
} }
.lock_item:after { .lock_item:after {
content: "Lock"; content: "{{index .Phrases "topic_lock_button_text"}}";
} }
.unlock_item:after { .unlock_item:after {
content: "Unlock"; content: "{{index .Phrases "topic_unlock_button_text"}}";
} }
.pin_item:after { .pin_item:after {
content: "Pin"; content: "{{index .Phrases "topic_pin_button_text"}}";
} }
.unpin_item:after { .unpin_item:after {
content: "Unpin"; content: "{{index .Phrases "topic_unpin_button_text"}}";
} }
.report_item:after { .report_item:after {
content: "Report"; content: "{{index .Phrases "topic_report_button_text"}}";
} }
#poweredByHolder { #poweredByHolder {

View File

@ -7,10 +7,10 @@
} }
.edit_button:before { .edit_button:before {
content: "Edit"; content: "{{index .Phrases "panel_edit_button_text"}}";
} }
.delete_button:after { .delete_button:after {
content: "Delete"; content: "{{index .Phrases "panel_delete_button_text"}}";
} }
.panel_upshift:visited { .panel_upshift:visited {
@ -69,31 +69,31 @@
color: #202020 !important; color: #202020 !important;
font-size: 11px; font-size: 11px;
} }
.panel_rank_tag_admin:before { content: "Admins"; } .panel_rank_tag_admin:before { content: "{{index .Phrases "panel_rank_admins"}}"; }
.panel_rank_tag_mod:before { content: "Mods"; } .panel_rank_tag_mod:before { content: "{{index .Phrases "panel_rank_mods"}}"; }
.panel_rank_tag_banned:before { content: "Banned"; } .panel_rank_tag_banned:before { content: "{{index .Phrases "panel_rank_banned"}}"; }
.panel_rank_tag_guest:before { content: "Guests"; } .panel_rank_tag_guest:before { content: "{{index .Phrases "panel_rank_guests"}}"; }
.panel_rank_tag_member:before { content: "Members"; } .panel_rank_tag_member:before { content: "{{index .Phrases "panel_rank_members"}}"; }
.forum_preset_announce:after { content: "Announcements"; } .forum_preset_announce:after { content: "{{index .Phrases "panel_preset_announcements"}}"; }
.forum_preset_members:after { content: "Member Only"; } .forum_preset_members:after { content: "{{index .Phrases "panel_preset_member_only"}}"; }
.forum_preset_staff:after { content: "Staff Only"; } .forum_preset_staff:after { content: "{{index .Phrases "panel_preset_staff_only"}}"; }
.forum_preset_admins:after { content: "Admin Only"; } .forum_preset_admins:after { content: "{{index .Phrases "panel_preset_admin_only"}}"; }
.forum_preset_archive:after { content: "Archive"; } .forum_preset_archive:after { content: "{{index .Phrases "panel_preset_archive"}}"; }
.forum_preset_all:after { content: "Public"; } .forum_preset_all:after { content: "{{index .Phrases "panel_preset_public"}}"; }
.forum_preset_custom, .forum_preset_ { display: none !important; } .forum_preset_custom, .forum_preset_ { display: none !important; }
.forum_active_Hide:before { content: "Hidden"; } .forum_active_Hide:before { content: "{{index .Phrases "panel_active_hidden"}}"; }
.forum_active_Hide + .forum_preset:before { content: " | "; } .forum_active_Hide + .forum_preset:before { content: " | "; }
.forum_active_Show { display: none !important; } .forum_active_Show { display: none !important; }
.forum_active_name { color: #707070; } .forum_active_name { color: #707070; }
.builtin_forum_divider { border-bottom-style: solid; } .builtin_forum_divider { border-bottom-style: solid; }
.perm_preset_no_access:before { content: "No Access"; color: maroon; } .perm_preset_no_access:before { content: "{{index .Phrases "panel_perms_no_access" }}"; color: maroon; }
.perm_preset_read_only:before { content: "Read Only"; color: green; } .perm_preset_read_only:before { content: "{{index .Phrases "panel_perms_read_only" }}"; color: green; }
.perm_preset_can_post:before { content: "Can Post"; color: green; } .perm_preset_can_post:before { content: "{{index .Phrases "panel_perms_can_post" }}"; color: green; }
.perm_preset_can_moderate:before { content: "Can Moderate"; color: darkblue; } .perm_preset_can_moderate:before { content: "{{index .Phrases "panel_perms_can_moderate" }}"; color: darkblue; }
.perm_preset_custom:before { content: "Custom"; color: black; } .perm_preset_custom:before { content: "{{index .Phrases "panel_perms_custom" }}"; color: black; }
.perm_preset_default:before { content: "Default"; } .perm_preset_default:before { content: "{{index .Phrases "panel_perms_default" }}"; }
.theme_row > .panel_floater > .panel_right_button { margin-left: 5px; } .theme_row > .panel_floater > .panel_right_button { margin-left: 5px; }

View File

@ -54,28 +54,28 @@ li a {
} }
#menu_forums a:after { #menu_forums a:after {
content: "Forums"; content: "{{index .Phrases "menu_forums"}}";
} }
.menu_topics a:after { .menu_topics a:after {
content: "Topics"; content: "{{index .Phrases "menu_topics"}}";
} }
.menu_account a:after { .menu_account a:after {
content: "Account"; content: "{{index .Phrases "menu_account"}}";
} }
.menu_profile a:after { .menu_profile a:after {
content: "Profile"; content: "{{index .Phrases "menu_profile"}}";
} }
.menu_panel a:after { .menu_panel a:after {
content: "Panel"; content: "{{index .Phrases "menu_panel"}}";
} }
.menu_logout a:after { .menu_logout a:after {
content: "Logout"; content: "{{index .Phrases "menu_logout"}}";
} }
.menu_login a:after { .menu_login a:after {
content: "Login"; content: "{{index .Phrases "menu_login"}}";
} }
.menu_register a:after { .menu_register a:after {
content: "Register"; content: "{{index .Phrases "menu_register"}}";
} }
.alert_bell:before { .alert_bell:before {
@ -474,10 +474,10 @@ input, select {
white-space: nowrap; white-space: nowrap;
} }
.topic_list .lastReplyAt:before { .topic_list .lastReplyAt:before {
content: "Last: "; content: "{{index .Phrases "topics_last"}}: ";
} }
.topic_list .starter:before { .topic_list .starter:before {
content: "Starter: "; content: "{{index .Phrases "topics_starter"}}: ";
} }
@supports not (display: grid) { @supports not (display: grid) {
@ -899,7 +899,7 @@ input[type=checkbox]:checked + label.poll_option_label .sel {
font-size: 18px; font-size: 18px;
} }
#profile_left_lane .report_item:after { #profile_left_lane .report_item:after {
content: "Report"; content: "{{index .Phrases "topic_report_button_text"}}";
} }
#profile_right_lane { #profile_right_lane {
width: calc(100% - 245px); width: calc(100% - 245px);

View File

@ -3,10 +3,10 @@
} }
.edit_button:before { .edit_button:before {
content: "Edit"; content: "{{index .Phrases "panel_edit_button_text"}}";
} }
.delete_button:after { .delete_button:after {
content: "Delete"; content: "{{index .Phrases "panel_delete_button_text"}}";
} }
.tag-mini { .tag-mini {
@ -90,28 +90,28 @@
} }
.perm_preset_no_access:before { .perm_preset_no_access:before {
content: "No Access"; content: "{{index .Phrases "panel_perms_no_access" }}";
color: maroon; color: maroon;
} }
.perm_preset_read_only:before, .perm_preset_can_post:before { .perm_preset_read_only:before, .perm_preset_can_post:before {
color: green; color: green;
} }
.perm_preset_read_only:before { .perm_preset_read_only:before {
content: "Read Only"; content: "{{index .Phrases "panel_perms_read_only" }}";
} }
.perm_preset_can_post:before { .perm_preset_can_post:before {
content: "Can Post"; content: "{{index .Phrases "panel_perms_can_post" }}";
} }
.perm_preset_can_moderate:before { .perm_preset_can_moderate:before {
content: "Can Moderate"; content: "{{index .Phrases "panel_perms_can_moderate" }}";
color: darkblue; color: darkblue;
} }
.perm_preset_custom:before { .perm_preset_custom:before {
content: "Custom"; content: "{{index .Phrases "panel_perms_custom" }}";
color: black; color: black;
} }
.perm_preset_default:before { .perm_preset_default:before {
content: "Default"; content: "{{index .Phrases "panel_perms_default" }}";
} }
#panel_dashboard_right .colstack_head { #panel_dashboard_right .colstack_head {