12345678910111213141516171819202122232425262728293031 |
- package controllers
- import (
- renderModels "devel.mephi.ru/dyokunev/cps-models/for_render"
- asuModels "devel.mephi.ru/dyokunev/go-asu-models"
- "github.com/revel/revel"
- )
- type Formulars struct {
- Controller
- }
- func (c Formulars) Index(formular asuModels.Formular, ppsOnly bool) revel.Result {
- if r := c.Init(); r != nil {
- return r
- }
- scope := c.FormularSQL
- if ppsOnly {
- scope = scope.PPSOnly()
- }
- formulars, err := scope.Select(formular)
- if r := c.ConsiderErr(err); r != nil {
- return r
- }
- return c.Render(renderModels.NewFormulars(formulars))
- }
|