Exemplo n.º 1
0
func (c *ProjectController) ViewProjectDetail() {
	id := c.Ctx.Input.Param(":id")

	c.Data["CreateJobStatus"] = "active"
	c.TplNames = "project/detail.tpl"

	project := project.NewProject()
	project, _ = project.GetOne(id)

	c.Data["Project"] = project.GetModelProject()
}
Exemplo n.º 2
0
func (c *ProjectController) ViewEditProject() {
	id := c.Ctx.Input.Param(":id")

	c.TplNames = "project/edit.tpl"

	project := project.NewProject()
	project, _ = project.GetOne(id)

	c.Data["Project"] = project.GetModelProject()

	users := user.NewUserList()
	c.Data["Priority"] = c.GetPriority()
	c.Data["return"] = 1
	err, progress := models.GetProgressList()
	if err == nil {
		c.Data["Progress"] = progress
	}

	c.Data["BussinessUser"] = users.GetRoleList(user.BussinessMen) //[]map[string]string{{"Id": "1", "Name": "许航"}}
	c.Data["ArtUser"] = users.GetRoleList(user.ArtGuy)             // []map[string]string{{"Id": "1", "Name": "许航"}}
	c.Data["TechUser"] = users.GetRoleList(user.TechGuy)           //[]map[string]string{{"Id": "1", "Name": "许航"}}
	c.Data["Id"] = id
}