// Code generated by qtc from "stuff.qtpl". DO NOT EDIT. // See https://github.com/valyala/quicktemplate for details. //line views/stuff.qtpl:1 package views //line views/stuff.qtpl:1 import "fmt" //line views/stuff.qtpl:2 import "path/filepath" //line views/stuff.qtpl:3 import "sort" //line views/stuff.qtpl:5 import "github.com/bouncepaw/mycorrhiza/cfg" //line views/stuff.qtpl:6 import "github.com/bouncepaw/mycorrhiza/hyphae" //line views/stuff.qtpl:7 import "github.com/bouncepaw/mycorrhiza/user" //line views/stuff.qtpl:8 import "github.com/bouncepaw/mycorrhiza/util" //line views/stuff.qtpl:9 import "github.com/bouncepaw/mycorrhiza/l18n" //line views/stuff.qtpl:11 import ( qtio422016 "io" qt422016 "github.com/valyala/quicktemplate" ) //line views/stuff.qtpl:11 var ( _ = qtio422016.Copy _ = qt422016.AcquireByteBuffer ) //line views/stuff.qtpl:11 func StreamBaseHTML(qw422016 *qt422016.Writer, title, body string, lc *l18n.Localizer, u *user.User, headElements ...string) { //line views/stuff.qtpl:11 qw422016.N().S(` `) //line views/stuff.qtpl:17 qw422016.E().S(title) //line views/stuff.qtpl:17 qw422016.N().S(` `) //line views/stuff.qtpl:21 for _, el := range headElements { //line views/stuff.qtpl:21 qw422016.N().S(el) //line views/stuff.qtpl:21 } //line views/stuff.qtpl:21 qw422016.N().S(`
`) //line views/stuff.qtpl:69 qw422016.N().S(body) //line views/stuff.qtpl:69 qw422016.N().S(` `) //line views/stuff.qtpl:81 StreamCommonScripts(qw422016) //line views/stuff.qtpl:81 qw422016.N().S(` `) //line views/stuff.qtpl:85 } //line views/stuff.qtpl:85 func WriteBaseHTML(qq422016 qtio422016.Writer, title, body string, lc *l18n.Localizer, u *user.User, headElements ...string) { //line views/stuff.qtpl:85 qw422016 := qt422016.AcquireWriter(qq422016) //line views/stuff.qtpl:85 StreamBaseHTML(qw422016, title, body, lc, u, headElements...) //line views/stuff.qtpl:85 qt422016.ReleaseWriter(qw422016) //line views/stuff.qtpl:85 } //line views/stuff.qtpl:85 func BaseHTML(title, body string, lc *l18n.Localizer, u *user.User, headElements ...string) string { //line views/stuff.qtpl:85 qb422016 := qt422016.AcquireByteBuffer() //line views/stuff.qtpl:85 WriteBaseHTML(qb422016, title, body, lc, u, headElements...) //line views/stuff.qtpl:85 qs422016 := string(qb422016.B) //line views/stuff.qtpl:85 qt422016.ReleaseByteBuffer(qb422016) //line views/stuff.qtpl:85 return qs422016 //line views/stuff.qtpl:85 } //line views/stuff.qtpl:87 func StreamTitleSearchHTML(qw422016 *qt422016.Writer, query string, generator func(string) <-chan string, lc *l18n.Localizer) { //line views/stuff.qtpl:87 qw422016.N().S(`

`) //line views/stuff.qtpl:90 qw422016.E().S(lc.Get("ui.search_results_query", &l18n.Replacements{"query": query})) //line views/stuff.qtpl:90 qw422016.N().S(`

`) //line views/stuff.qtpl:91 qw422016.E().S(lc.Get("ui.search_results_desc")) //line views/stuff.qtpl:91 qw422016.N().S(`

`) //line views/stuff.qtpl:100 } //line views/stuff.qtpl:100 func WriteTitleSearchHTML(qq422016 qtio422016.Writer, query string, generator func(string) <-chan string, lc *l18n.Localizer) { //line views/stuff.qtpl:100 qw422016 := qt422016.AcquireWriter(qq422016) //line views/stuff.qtpl:100 StreamTitleSearchHTML(qw422016, query, generator, lc) //line views/stuff.qtpl:100 qt422016.ReleaseWriter(qw422016) //line views/stuff.qtpl:100 } //line views/stuff.qtpl:100 func TitleSearchHTML(query string, generator func(string) <-chan string, lc *l18n.Localizer) string { //line views/stuff.qtpl:100 qb422016 := qt422016.AcquireByteBuffer() //line views/stuff.qtpl:100 WriteTitleSearchHTML(qb422016, query, generator, lc) //line views/stuff.qtpl:100 qs422016 := string(qb422016.B) //line views/stuff.qtpl:100 qt422016.ReleaseByteBuffer(qb422016) //line views/stuff.qtpl:100 return qs422016 //line views/stuff.qtpl:100 } // It outputs a poorly formatted JSON, but it works and is valid. //line views/stuff.qtpl:103 func StreamTitleSearchJSON(qw422016 *qt422016.Writer, query string, generator func(string) <-chan string) { //line views/stuff.qtpl:103 qw422016.N().S(` `) //line views/stuff.qtpl:105 // Lol counter := 0 //line views/stuff.qtpl:107 qw422016.N().S(` { "source_query": "`) //line views/stuff.qtpl:109 qw422016.E().S(query) //line views/stuff.qtpl:109 qw422016.N().S(`", "results": [ `) //line views/stuff.qtpl:111 for hyphaName := range generator(query) { //line views/stuff.qtpl:111 qw422016.N().S(` `) //line views/stuff.qtpl:112 if counter > 0 { //line views/stuff.qtpl:112 qw422016.N().S(`, `) //line views/stuff.qtpl:112 } //line views/stuff.qtpl:112 qw422016.N().S(`{ "canonical_name": "`) //line views/stuff.qtpl:113 qw422016.E().S(hyphaName) //line views/stuff.qtpl:113 qw422016.N().S(`", "beautiful_name": "`) //line views/stuff.qtpl:114 qw422016.E().S(util.BeautifulName(hyphaName)) //line views/stuff.qtpl:114 qw422016.N().S(`", "url": "`) //line views/stuff.qtpl:115 qw422016.E().S(cfg.URL + "/hypha/" + hyphaName) //line views/stuff.qtpl:115 qw422016.N().S(`" }`) //line views/stuff.qtpl:116 counter++ //line views/stuff.qtpl:116 qw422016.N().S(` `) //line views/stuff.qtpl:117 } //line views/stuff.qtpl:117 qw422016.N().S(` ] } `) //line views/stuff.qtpl:120 } //line views/stuff.qtpl:120 func WriteTitleSearchJSON(qq422016 qtio422016.Writer, query string, generator func(string) <-chan string) { //line views/stuff.qtpl:120 qw422016 := qt422016.AcquireWriter(qq422016) //line views/stuff.qtpl:120 StreamTitleSearchJSON(qw422016, query, generator) //line views/stuff.qtpl:120 qt422016.ReleaseWriter(qw422016) //line views/stuff.qtpl:120 } //line views/stuff.qtpl:120 func TitleSearchJSON(query string, generator func(string) <-chan string) string { //line views/stuff.qtpl:120 qb422016 := qt422016.AcquireByteBuffer() //line views/stuff.qtpl:120 WriteTitleSearchJSON(qb422016, query, generator) //line views/stuff.qtpl:120 qs422016 := string(qb422016.B) //line views/stuff.qtpl:120 qt422016.ReleaseByteBuffer(qb422016) //line views/stuff.qtpl:120 return qs422016 //line views/stuff.qtpl:120 } //line views/stuff.qtpl:122 func StreamBacklinksHTML(qw422016 *qt422016.Writer, hyphaName string, generator func(string) <-chan string, lc *l18n.Localizer) { //line views/stuff.qtpl:122 qw422016.N().S(`

`) //line views/stuff.qtpl:125 qw422016.N().S(lc.Get( "ui.backlinks_heading", &l18n.Replacements{ "hypha_link": fmt.Sprintf( `%s`, hyphaName, util.BeautifulName(hyphaName), ), }, )) //line views/stuff.qtpl:134 qw422016.N().S(`

`) //line views/stuff.qtpl:135 qw422016.E().S(lc.Get("ui.backlinks_desc")) //line views/stuff.qtpl:135 qw422016.N().S(`

`) //line views/stuff.qtpl:145 } //line views/stuff.qtpl:145 func WriteBacklinksHTML(qq422016 qtio422016.Writer, hyphaName string, generator func(string) <-chan string, lc *l18n.Localizer) { //line views/stuff.qtpl:145 qw422016 := qt422016.AcquireWriter(qq422016) //line views/stuff.qtpl:145 StreamBacklinksHTML(qw422016, hyphaName, generator, lc) //line views/stuff.qtpl:145 qt422016.ReleaseWriter(qw422016) //line views/stuff.qtpl:145 } //line views/stuff.qtpl:145 func BacklinksHTML(hyphaName string, generator func(string) <-chan string, lc *l18n.Localizer) string { //line views/stuff.qtpl:145 qb422016 := qt422016.AcquireByteBuffer() //line views/stuff.qtpl:145 WriteBacklinksHTML(qb422016, hyphaName, generator, lc) //line views/stuff.qtpl:145 qs422016 := string(qb422016.B) //line views/stuff.qtpl:145 qt422016.ReleaseByteBuffer(qb422016) //line views/stuff.qtpl:145 return qs422016 //line views/stuff.qtpl:145 } //line views/stuff.qtpl:147 func StreamHelpHTML(qw422016 *qt422016.Writer, content, lang string, lc *l18n.Localizer) { //line views/stuff.qtpl:147 qw422016.N().S(`
`) //line views/stuff.qtpl:151 qw422016.N().S(content) //line views/stuff.qtpl:151 qw422016.N().S(`
`) //line views/stuff.qtpl:154 qw422016.N().S(helpTopicsHTML(lang, lc)) //line views/stuff.qtpl:154 qw422016.N().S(`
`) //line views/stuff.qtpl:156 } //line views/stuff.qtpl:156 func WriteHelpHTML(qq422016 qtio422016.Writer, content, lang string, lc *l18n.Localizer) { //line views/stuff.qtpl:156 qw422016 := qt422016.AcquireWriter(qq422016) //line views/stuff.qtpl:156 StreamHelpHTML(qw422016, content, lang, lc) //line views/stuff.qtpl:156 qt422016.ReleaseWriter(qw422016) //line views/stuff.qtpl:156 } //line views/stuff.qtpl:156 func HelpHTML(content, lang string, lc *l18n.Localizer) string { //line views/stuff.qtpl:156 qb422016 := qt422016.AcquireByteBuffer() //line views/stuff.qtpl:156 WriteHelpHTML(qb422016, content, lang, lc) //line views/stuff.qtpl:156 qs422016 := string(qb422016.B) //line views/stuff.qtpl:156 qt422016.ReleaseByteBuffer(qb422016) //line views/stuff.qtpl:156 return qs422016 //line views/stuff.qtpl:156 } //line views/stuff.qtpl:158 func StreamHelpEmptyErrorHTML(qw422016 *qt422016.Writer, lc *l18n.Localizer) { //line views/stuff.qtpl:158 qw422016.N().S(`

`) //line views/stuff.qtpl:159 qw422016.E().S(lc.Get("help.empty_error_title")) //line views/stuff.qtpl:159 qw422016.N().S(`

`) //line views/stuff.qtpl:160 qw422016.E().S(lc.Get("help.empty_error_line_1")) //line views/stuff.qtpl:160 qw422016.N().S(`

`) //line views/stuff.qtpl:161 qw422016.E().S(lc.Get("help.empty_error_line_2a")) //line views/stuff.qtpl:161 qw422016.N().S(` `) //line views/stuff.qtpl:161 qw422016.E().S(lc.Get("help.empty_error_link")) //line views/stuff.qtpl:161 qw422016.N().S(` `) //line views/stuff.qtpl:161 qw422016.E().S(lc.Get("help.empty_error_line_2b")) //line views/stuff.qtpl:161 qw422016.N().S(`

`) //line views/stuff.qtpl:162 } //line views/stuff.qtpl:162 func WriteHelpEmptyErrorHTML(qq422016 qtio422016.Writer, lc *l18n.Localizer) { //line views/stuff.qtpl:162 qw422016 := qt422016.AcquireWriter(qq422016) //line views/stuff.qtpl:162 StreamHelpEmptyErrorHTML(qw422016, lc) //line views/stuff.qtpl:162 qt422016.ReleaseWriter(qw422016) //line views/stuff.qtpl:162 } //line views/stuff.qtpl:162 func HelpEmptyErrorHTML(lc *l18n.Localizer) string { //line views/stuff.qtpl:162 qb422016 := qt422016.AcquireByteBuffer() //line views/stuff.qtpl:162 WriteHelpEmptyErrorHTML(qb422016, lc) //line views/stuff.qtpl:162 qs422016 := string(qb422016.B) //line views/stuff.qtpl:162 qt422016.ReleaseByteBuffer(qb422016) //line views/stuff.qtpl:162 return qs422016 //line views/stuff.qtpl:162 } //line views/stuff.qtpl:164 func streamhelpTopicBadgeHTML(qw422016 *qt422016.Writer, lang, topic string) { //line views/stuff.qtpl:164 qw422016.N().S(` ? `) //line views/stuff.qtpl:166 } //line views/stuff.qtpl:166 func writehelpTopicBadgeHTML(qq422016 qtio422016.Writer, lang, topic string) { //line views/stuff.qtpl:166 qw422016 := qt422016.AcquireWriter(qq422016) //line views/stuff.qtpl:166 streamhelpTopicBadgeHTML(qw422016, lang, topic) //line views/stuff.qtpl:166 qt422016.ReleaseWriter(qw422016) //line views/stuff.qtpl:166 } //line views/stuff.qtpl:166 func helpTopicBadgeHTML(lang, topic string) string { //line views/stuff.qtpl:166 qb422016 := qt422016.AcquireByteBuffer() //line views/stuff.qtpl:166 writehelpTopicBadgeHTML(qb422016, lang, topic) //line views/stuff.qtpl:166 qs422016 := string(qb422016.B) //line views/stuff.qtpl:166 qt422016.ReleaseByteBuffer(qb422016) //line views/stuff.qtpl:166 return qs422016 //line views/stuff.qtpl:166 } //line views/stuff.qtpl:168 func StreamUserListHTML(qw422016 *qt422016.Writer, lc *l18n.Localizer) { //line views/stuff.qtpl:168 qw422016.N().S(`

`) //line views/stuff.qtpl:171 qw422016.E().S(lc.Get("ui.users_heading")) //line views/stuff.qtpl:171 qw422016.N().S(`

`) //line views/stuff.qtpl:173 var ( admins = make([]string, 0) moderators = make([]string, 0) editors = make([]string, 0) ) for u := range user.YieldUsers() { switch u.Group { case "admin": admins = append(admins, u.Name) case "moderator": moderators = append(moderators, u.Name) case "editor", "trusted": editors = append(editors, u.Name) } } sort.Strings(admins) sort.Strings(moderators) sort.Strings(editors) //line views/stuff.qtpl:191 qw422016.N().S(`

`) //line views/stuff.qtpl:193 qw422016.E().S(lc.Get("ui.users_admins")) //line views/stuff.qtpl:193 qw422016.N().S(`

    `) //line views/stuff.qtpl:194 for _, name := range admins { //line views/stuff.qtpl:194 qw422016.N().S(`
  1. `) //line views/stuff.qtpl:195 qw422016.E().S(name) //line views/stuff.qtpl:195 qw422016.N().S(`
  2. `) //line views/stuff.qtpl:196 } //line views/stuff.qtpl:196 qw422016.N().S(`

`) //line views/stuff.qtpl:199 qw422016.E().S(lc.Get("ui.users_moderators")) //line views/stuff.qtpl:199 qw422016.N().S(`

    `) //line views/stuff.qtpl:200 for _, name := range moderators { //line views/stuff.qtpl:200 qw422016.N().S(`
  1. `) //line views/stuff.qtpl:201 qw422016.E().S(name) //line views/stuff.qtpl:201 qw422016.N().S(`
  2. `) //line views/stuff.qtpl:202 } //line views/stuff.qtpl:202 qw422016.N().S(`

`) //line views/stuff.qtpl:205 qw422016.E().S(lc.Get("ui.users_editors")) //line views/stuff.qtpl:205 qw422016.N().S(`

    `) //line views/stuff.qtpl:206 for _, name := range editors { //line views/stuff.qtpl:206 qw422016.N().S(`
  1. `) //line views/stuff.qtpl:207 qw422016.E().S(name) //line views/stuff.qtpl:207 qw422016.N().S(`
  2. `) //line views/stuff.qtpl:208 } //line views/stuff.qtpl:208 qw422016.N().S(`
`) //line views/stuff.qtpl:212 } //line views/stuff.qtpl:212 func WriteUserListHTML(qq422016 qtio422016.Writer, lc *l18n.Localizer) { //line views/stuff.qtpl:212 qw422016 := qt422016.AcquireWriter(qq422016) //line views/stuff.qtpl:212 StreamUserListHTML(qw422016, lc) //line views/stuff.qtpl:212 qt422016.ReleaseWriter(qw422016) //line views/stuff.qtpl:212 } //line views/stuff.qtpl:212 func UserListHTML(lc *l18n.Localizer) string { //line views/stuff.qtpl:212 qb422016 := qt422016.AcquireByteBuffer() //line views/stuff.qtpl:212 WriteUserListHTML(qb422016, lc) //line views/stuff.qtpl:212 qs422016 := string(qb422016.B) //line views/stuff.qtpl:212 qt422016.ReleaseByteBuffer(qb422016) //line views/stuff.qtpl:212 return qs422016 //line views/stuff.qtpl:212 } //line views/stuff.qtpl:214 func StreamHyphaListHTML(qw422016 *qt422016.Writer, lc *l18n.Localizer) { //line views/stuff.qtpl:214 qw422016.N().S(`

`) //line views/stuff.qtpl:217 qw422016.E().S(lc.Get("ui.list_heading")) //line views/stuff.qtpl:217 qw422016.N().S(`

`) //line views/stuff.qtpl:218 qw422016.E().S(lc.GetPlural("ui.list_desc", hyphae.Count())) //line views/stuff.qtpl:218 qw422016.N().S(`

`) //line views/stuff.qtpl:245 } //line views/stuff.qtpl:245 func WriteHyphaListHTML(qq422016 qtio422016.Writer, lc *l18n.Localizer) { //line views/stuff.qtpl:245 qw422016 := qt422016.AcquireWriter(qq422016) //line views/stuff.qtpl:245 StreamHyphaListHTML(qw422016, lc) //line views/stuff.qtpl:245 qt422016.ReleaseWriter(qw422016) //line views/stuff.qtpl:245 } //line views/stuff.qtpl:245 func HyphaListHTML(lc *l18n.Localizer) string { //line views/stuff.qtpl:245 qb422016 := qt422016.AcquireByteBuffer() //line views/stuff.qtpl:245 WriteHyphaListHTML(qb422016, lc) //line views/stuff.qtpl:245 qs422016 := string(qb422016.B) //line views/stuff.qtpl:245 qt422016.ReleaseByteBuffer(qb422016) //line views/stuff.qtpl:245 return qs422016 //line views/stuff.qtpl:245 } //line views/stuff.qtpl:247 func StreamAboutHTML(qw422016 *qt422016.Writer, lc *l18n.Localizer) { //line views/stuff.qtpl:247 qw422016.N().S(`

`) //line views/stuff.qtpl:251 qw422016.E().S(lc.Get("ui.about_title", &l18n.Replacements{"name": cfg.WikiName})) //line views/stuff.qtpl:251 qw422016.N().S(`

  • `) //line views/stuff.qtpl:253 qw422016.N().S(lc.Get("ui.about_version", &l18n.Replacements{"pre": "", "post": ""})) //line views/stuff.qtpl:253 qw422016.N().S(` 1.8.2
  • `) //line views/stuff.qtpl:254 if cfg.UseAuth { //line views/stuff.qtpl:254 qw422016.N().S(`
  • `) //line views/stuff.qtpl:255 qw422016.E().S(lc.Get("ui.about_usercount")) //line views/stuff.qtpl:255 qw422016.N().S(` `) //line views/stuff.qtpl:255 qw422016.N().DUL(user.Count()) //line views/stuff.qtpl:255 qw422016.N().S(`
  • `) //line views/stuff.qtpl:256 qw422016.E().S(lc.Get("ui.about_homepage")) //line views/stuff.qtpl:256 qw422016.N().S(` `) //line views/stuff.qtpl:256 qw422016.E().S(cfg.HomeHypha) //line views/stuff.qtpl:256 qw422016.N().S(`
  • `) //line views/stuff.qtpl:257 qw422016.E().S(lc.Get("ui.about_admins")) //line views/stuff.qtpl:257 qw422016.N().S(``) //line views/stuff.qtpl:257 for i, username := range user.ListUsersWithGroup("admin") { //line views/stuff.qtpl:258 if i > 0 { //line views/stuff.qtpl:258 qw422016.N().S(` `) //line views/stuff.qtpl:259 } //line views/stuff.qtpl:259 qw422016.N().S(` `) //line views/stuff.qtpl:260 qw422016.E().S(username) //line views/stuff.qtpl:260 qw422016.N().S(``) //line views/stuff.qtpl:260 } //line views/stuff.qtpl:260 qw422016.N().S(`
  • `) //line views/stuff.qtpl:261 } else { //line views/stuff.qtpl:261 qw422016.N().S(`
  • `) //line views/stuff.qtpl:262 qw422016.E().S(lc.Get("ui.about_noauth")) //line views/stuff.qtpl:262 qw422016.N().S(`
  • `) //line views/stuff.qtpl:263 } //line views/stuff.qtpl:263 qw422016.N().S(`

`) //line views/stuff.qtpl:265 qw422016.N().S(lc.Get("ui.about_hyphae", &l18n.Replacements{"link": "/list"})) //line views/stuff.qtpl:265 qw422016.N().S(`

`) //line views/stuff.qtpl:269 } //line views/stuff.qtpl:269 func WriteAboutHTML(qq422016 qtio422016.Writer, lc *l18n.Localizer) { //line views/stuff.qtpl:269 qw422016 := qt422016.AcquireWriter(qq422016) //line views/stuff.qtpl:269 StreamAboutHTML(qw422016, lc) //line views/stuff.qtpl:269 qt422016.ReleaseWriter(qw422016) //line views/stuff.qtpl:269 } //line views/stuff.qtpl:269 func AboutHTML(lc *l18n.Localizer) string { //line views/stuff.qtpl:269 qb422016 := qt422016.AcquireByteBuffer() //line views/stuff.qtpl:269 WriteAboutHTML(qb422016, lc) //line views/stuff.qtpl:269 qs422016 := string(qb422016.B) //line views/stuff.qtpl:269 qt422016.ReleaseByteBuffer(qb422016) //line views/stuff.qtpl:269 return qs422016 //line views/stuff.qtpl:269 } //line views/stuff.qtpl:271 func StreamCommonScripts(qw422016 *qt422016.Writer) { //line views/stuff.qtpl:271 qw422016.N().S(` `) //line views/stuff.qtpl:272 for _, scriptPath := range cfg.CommonScripts { //line views/stuff.qtpl:272 qw422016.N().S(` `) //line views/stuff.qtpl:274 } //line views/stuff.qtpl:274 qw422016.N().S(` `) //line views/stuff.qtpl:275 } //line views/stuff.qtpl:275 func WriteCommonScripts(qq422016 qtio422016.Writer) { //line views/stuff.qtpl:275 qw422016 := qt422016.AcquireWriter(qq422016) //line views/stuff.qtpl:275 StreamCommonScripts(qw422016) //line views/stuff.qtpl:275 qt422016.ReleaseWriter(qw422016) //line views/stuff.qtpl:275 } //line views/stuff.qtpl:275 func CommonScripts() string { //line views/stuff.qtpl:275 qb422016 := qt422016.AcquireByteBuffer() //line views/stuff.qtpl:275 WriteCommonScripts(qb422016) //line views/stuff.qtpl:275 qs422016 := string(qb422016.B) //line views/stuff.qtpl:275 qt422016.ReleaseByteBuffer(qb422016) //line views/stuff.qtpl:275 return qs422016 //line views/stuff.qtpl:275 }