package main import "io" import "strconv" func init() { ctemplates["topics"] = template_topics } func template_topics(tmpl_topics_vars Page, w io.Writer) { w.Write([]byte(` ` + tmpl_topics_vars.Title + `
`)) if len(tmpl_topics_vars.NoticeList) != 0 { for _, item := range tmpl_topics_vars.NoticeList { w.Write([]byte(`
` + item + `
`)) } } w.Write([]byte(`
`)) if len(tmpl_topics_vars.ItemList) != 0 { for _, item := range tmpl_topics_vars.ItemList { w.Write([]byte(`
` + item.(TopicUser).Title + ` `)) if item.(TopicUser).Is_Closed { w.Write([]byte(`closed `)) } else { w.Write([]byte(`open`)) } w.Write([]byte(` Status
`)) } } w.Write([]byte(`
`)) if tmpl_topics_vars.Something.(string) != "" { w.Write([]byte(`
` + tmpl_topics_vars.Something.(string) + `
`)) } w.Write([]byte(`
`)) }