Esempio n. 1
0
func (this *ProductController) UiList() {
	item := s.Product
	oItemDef, _ := itemDef.EntityDefMap[item]
	this.Data["listUrl"] = "/item/product/list"
	this.Data["addUrl"] = "ui/product/add"
	this.Data["updateUrl"] = "ui/product/update"
	this.Data["thlist"] = ui.BuildListThs(oItemDef)
	this.TplNames = "product/list.tpl"
}
Esempio n. 2
0
func (this *UserController) UiList() {
	item := "user"
	oItemDef, _ := itemDef.EntityDefMap[item]
	this.Data["listUrl"] = fmt.Sprintf("/item/list/%s", item)
	this.Data["addUrl"] = fmt.Sprintf("/ui/add/%s", item)
	this.Data["updateUrl"] = fmt.Sprintf("/ui/update/%s", item)
	this.Data["thlist"] = ui.BuildListThs(oItemDef)
	this.TplNames = "user/list.tpl"
}
Esempio n. 3
0
func (this *UiController) List() {
	item, ok := this.Ctx.Input.Params[":hi"]
	if !ok {
		beego.Error(stat.ParamItemError)
		this.Ctx.WriteString(stat.ParamItemError)
		return
	}
	oItemDef, ok := itemDef.EntityDefMap[item]
	if !ok {
		beego.Error(fmt.Sprintf("Item %s not define", item))
		this.Ctx.WriteString(stat.ItemNotDefine)
		return
	}
	this.Data["item"] = item
	this.Data["listUrl"] = fmt.Sprintf("/item/list/%s", item)
	this.Data["addUrl"] = fmt.Sprintf("/ui/add/%s", item)
	this.Data["updateUrl"] = fmt.Sprintf("/ui/update/%s", item)
	this.Data["thlist"] = ui.BuildListThs(oItemDef)
	this.TplNames = "item/list.tpl"
}