Exemple #1
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
}
Exemple #2
0
func (c *ProjectController) ViewCreateProject() {
	c.TplNames = "project/create.tpl"

	if c.Data["RoleError"] != nil && c.Data["RoleError"].(bool) {
		return
	}

	c.Data["CreateJobStatus"] = "active"

	users := user.NewUserList()
	c.Data["Priority"] = c.GetPriority()

	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["Now"] = time.Now().Local()
	c.GetProjectNames()
}
Exemple #3
0
func GetProgressList() (err error, progressList []*models.Progress) {

	err, progressList = models.GetProgressList()
	return
}