package main import "strconv" func init() { ctemplates["topic"] = template_topic } func template_topic(tmpl_topic_vars Page) (tmpl string) { var extra_data TopicUser = tmpl_topic_vars.Something.(TopicUser) tmpl += ` ` tmpl += tmpl_topic_vars.Title tmpl += `
` tmpl += `` tmpl += ` ` if len(tmpl_topic_vars.NoticeList) != 0 { for _, item := range tmpl_topic_vars.NoticeList { tmpl += `
` tmpl += item tmpl += `
` } } tmpl += `
` tmpl += extra_data.Title tmpl += ` ` tmpl += extra_data.Status tmpl += ` Status ` if tmpl_topic_vars.CurrentUser.Is_Mod { tmpl += ` Edit Delete ` if extra_data.Sticky { tmpl += `Unpin` } else { tmpl += `Pin` } tmpl += ` ` } tmpl += ` Report
` tmpl += string(tmpl_topic_varsstring(.Something.(TopicUser).Content)) tmpl += `

` tmpl += extra_data.CreatedByName tmpl += ` ` if extra_data.Tag != "" { tmpl += `` tmpl += extra_data.Tag tmpl += `` } else { if extra_data.URLName != "" { tmpl += `` tmpl += extra_data.URLName tmpl += ` ` tmpl += extra_data.URLPrefix tmpl += `` } } tmpl += `

` if len(tmpl_topic_vars.ItemList) != 0 { for _, item := range tmpl_topic_vars.ItemList { tmpl += `
` tmpl += string(item.(Reply).ContentHtml) tmpl += `

` tmpl += item.(Reply).CreatedByName tmpl += ` ` if tmpl_topic_vars.CurrentUser.Is_Mod { tmpl += ` ` } tmpl += ` ` if item.(Reply).Tag != "" { tmpl += `` tmpl += item.(Reply).Tag tmpl += `` } else { if item.(Reply).URLName != "" { tmpl += `` tmpl += item.(Reply).URLName tmpl += ` ` tmpl += item.(Reply).URLPrefix tmpl += `` } } tmpl += `
` } } tmpl += `
` if !tmpl_topic_vars.CurrentUser.Is_Banned { tmpl += `
` } tmpl += ` ` tmpl += `
` return tmpl }