package tpl import ( "sh.org.ru/pkg/model" "strconv" ) templ Admin(quotes []model.Quote, count int) { @Layout(HeaderParams{}) { for _, q := range quotes { @QuoteAdmin(&q) } Всего { strconv.Itoa(count) } цитат. } } templ QuoteAdmin(quote *model.Quote) {
#{ strconv.Itoa(int(quote.ID)) }
@templ.Raw(quote.Text())
} type AdminForm struct { ID int `form:"id"` Action string `form:"action"` }