mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-09-18 17:48:00 +08:00
feat:优化项目空间样式
This commit is contained in:
@@ -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()
|
||||
|
||||
|
@@ -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")
|
||||
|
Reference in New Issue
Block a user