package main import "io" import "strconv" func init() { template_forum_handle = template_forum } func template_forum(tmpl_forum_vars Page, w io.Writer) { w.Write([]byte(` ` + tmpl_forum_vars.Title + `
`)) if len(tmpl_forum_vars.NoticeList) != 0 { for _, item := range tmpl_forum_vars.NoticeList { w.Write([]byte(`
` + item + `
`)) } } w.Write([]byte(`
`)) if len(tmpl_forum_vars.ItemList) != 0 { for _, item := range tmpl_forum_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 in this forum yet.
`)) } w.Write([]byte(`
`)) }