feat:优化项目空间样式

This commit is contained in:
lifei6671
2018-11-21 11:03:16 +08:00
parent 9b0c649738
commit f1957dd9c0
14 changed files with 116 additions and 94 deletions

View File

@@ -159,7 +159,7 @@ func (c *BookController) SaveBook() {
}
}
if !models.NewItemsets().Exist(itemId) {
c.JsonResult(6006,"项目不存在")
c.JsonResult(6006,"项目空间不存在")
}
if editor != "markdown" && editor != "html" {
editor = "markdown"
@@ -458,7 +458,7 @@ func (c *BookController) Create() {
privatelyOwned = 1
}
if !models.NewItemsets().Exist(itemId) {
c.JsonResult(6005, "项目不存在")
c.JsonResult(6005, "项目空间不存在")
}
if commentStatus != "open" && commentStatus != "closed" && commentStatus != "group_only" && commentStatus != "registered_only" {
commentStatus = "closed"
@@ -588,7 +588,7 @@ func (c *BookController) Import() {
c.JsonResult(6003, "项目标识只能包含小写字母、数字,以及“-”和“_”符号,并且只能小写字母开头")
}
if !models.NewItemsets().Exist(itemId) {
c.JsonResult(6007, "项目不存在")
c.JsonResult(6007, "项目空间不存在")
}
if strings.Count(identify, "") > 50 {
c.JsonResult(6004, "文档标识不能超过50字")
@@ -950,7 +950,7 @@ func (c *BookController) TeamSearch() {
}
//项目搜索.
//项目空间搜索.
func (c *BookController) ItemsetsSearch() {
c.Prepare()

View File

@@ -355,7 +355,7 @@ func (c *ManagerController) EditBook() {
}
}
if !models.NewItemsets().Exist(itemId) {
c.JsonResult(6006,"项目不存在")
c.JsonResult(6006,"项目空间不存在")
}
book.Publisher = publisher
book.HistoryCount = historyCount
@@ -1097,7 +1097,7 @@ func (c *ManagerController) TeamBookDelete() {
c.JsonResult(0, "OK")
}
//项目列表.
//项目空间列表.
func (c *ManagerController) Itemsets() {
c.Prepare()
c.TplName = "manager/itemsets.tpl"
@@ -1126,7 +1126,7 @@ func (c *ManagerController) Itemsets() {
}
//编辑或添加项目.
//编辑或添加项目空间.
func (c *ManagerController) ItemsetsEdit() {
c.Prepare()
itemId, _ := c.GetInt("itemId")
@@ -1140,9 +1140,9 @@ func (c *ManagerController) ItemsetsEdit() {
if itemId > 0 {
if item, err = models.NewItemsets().First(itemId); err != nil {
if err == orm.ErrNoRows {
c.JsonResult(5002, "项目不存在")
c.JsonResult(5002, "项目空间不存在")
} else {
c.JsonResult(5003, "查询项目出错")
c.JsonResult(5003, "查询项目空间出错")
}
}
} else {
@@ -1161,7 +1161,7 @@ func (c *ManagerController) ItemsetsEdit() {
c.JsonResult(0, "OK")
}
//删除项目.
//删除项目空间.
func (c *ManagerController) ItemsetsDelete() {
c.Prepare()
itemId, _ := c.GetInt("itemId")