package main import "io" import "strconv" import "html/template" /*func init() { ctemplates["topic"] = template_topic }*/ func template_topic2(tmpl_topic_vars Page, w io.Writer) { var extra_data TopicUser = tmpl_topic_vars.Something.(TopicUser) w.Write([]byte(` `)) w.Write([]byte(tmpl_topic_vars.Title)) w.Write([]byte(`
`)) w.Write([]byte(``)) w.Write([]byte(` `)) if len(tmpl_topic_vars.NoticeList) != 0 { for _, item := range tmpl_topic_vars.NoticeList { w.Write([]byte(`
`)) w.Write([]byte(item)) w.Write([]byte(`
`)) } } w.Write([]byte(`
`)) w.Write([]byte(extra_data.Title)) w.Write([]byte(` `)) w.Write([]byte(extra_data.Status)) w.Write([]byte(` Status `)) if tmpl_topic_vars.CurrentUser.Is_Mod { w.Write([]byte(` Edit Delete `)) if extra_data.Sticky { w.Write([]byte(`Unpin`)) } else { w.Write([]byte(`Pin`)) } w.Write([]byte(` `)) } w.Write([]byte(` Report
`)) w.Write([]byte(string(extra_data.Content.(template.HTML)))) w.Write([]byte(`

`)) w.Write([]byte(extra_data.CreatedByName)) w.Write([]byte(` `)) if extra_data.Tag != "" { w.Write([]byte(``)) w.Write([]byte(extra_data.Tag)) w.Write([]byte(``)) } else { if extra_data.URLName != "" { w.Write([]byte(``)) w.Write([]byte(extra_data.URLName)) w.Write([]byte(` `)) w.Write([]byte(extra_data.URLPrefix)) w.Write([]byte(``)) } } w.Write([]byte(`

`)) if len(tmpl_topic_vars.ItemList) != 0 { for _, item := range tmpl_topic_vars.ItemList { w.Write([]byte(`
`)) w.Write([]byte(string(item.(Reply).ContentHtml))) w.Write([]byte(`

`)) w.Write([]byte(item.(Reply).CreatedByName)) w.Write([]byte(` `)) if tmpl_topic_vars.CurrentUser.Is_Mod { w.Write([]byte(` `)) } w.Write([]byte(` `)) if item.(Reply).Tag != "" { w.Write([]byte(``)) w.Write([]byte(item.(Reply).Tag)) w.Write([]byte(``)) } else { if item.(Reply).URLName != "" { w.Write([]byte(``)) w.Write([]byte(item.(Reply).URLName)) w.Write([]byte(` `)) w.Write([]byte(item.(Reply).URLPrefix)) w.Write([]byte(``)) } } w.Write([]byte(`
`)) } } w.Write([]byte(`
`)) if !tmpl_topic_vars.CurrentUser.Is_Banned { w.Write([]byte(`
`)) } w.Write([]byte(` `)) w.Write([]byte(`
`)) }