package main import "strconv" import "html/template" import "io" func init() { template_topic_alt_handle = template_topic_alt } func template_topic_alt(tmpl_topic_alt_vars TopicPage, w io.Writer) { w.Write([]byte(` ` + tmpl_topic_alt_vars.Title + `
`)) if len(tmpl_topic_alt_vars.NoticeList) != 0 { for _, item := range tmpl_topic_alt_vars.NoticeList { w.Write([]byte(`
` + item + `
`)) } } w.Write([]byte(`
` + tmpl_topic_alt_vars.Topic.Title + ` ` + tmpl_topic_alt_vars.Topic.Status + ` Status `)) if tmpl_topic_alt_vars.CurrentUser.Is_Mod { w.Write([]byte(` Edit Delete `)) if tmpl_topic_alt_vars.Topic.Sticky { w.Write([]byte(`Unpin`)) } else { w.Write([]byte(`Pin`)) } w.Write([]byte(` `)) } w.Write([]byte(` Report
 
` + tmpl_topic_alt_vars.Topic.CreatedByName + `
` + string(tmpl_topic_alt_vars.Topic.Content.(template.HTML)) + `
`)) if len(tmpl_topic_alt_vars.ItemList) != 0 { for _, item := range tmpl_topic_alt_vars.ItemList { w.Write([]byte(`
 
` + item.CreatedByName + `
` + string(item.ContentHtml) + `
`)) if tmpl_topic_alt_vars.CurrentUser.Perms.EditReply { w.Write([]byte(`Edit`)) } w.Write([]byte(` `)) if tmpl_topic_alt_vars.CurrentUser.Perms.DeleteReply { w.Write([]byte(`Delete`)) } w.Write([]byte(` Report
`)) } } w.Write([]byte(`
`)) if tmpl_topic_alt_vars.CurrentUser.Perms.CreateReply { w.Write([]byte(`
`)) } w.Write([]byte(`
`)) }