package main import "io" import "strconv" func init() { template_topics_handle = 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
`)) } } else { w.Write([]byte(`
There aren't any topics yet.
`)) } w.Write([]byte(`
`)) }