书籍列表.
()
| 372 | |
| 373 | // 书籍列表. |
| 374 | func (this *ManagerController) Books() { |
| 375 | pageIndex, _ := this.GetInt("page", 1) |
| 376 | private, _ := this.GetInt("private") |
| 377 | wd := this.GetString("wd") |
| 378 | |
| 379 | size := conf.PageSize |
| 380 | |
| 381 | books, totalCount, _ := models.NewBookResult().FindToPager(pageIndex, size, private, wd) |
| 382 | |
| 383 | if totalCount > 0 { |
| 384 | this.Data["PageHtml"] = utils.NewPaginations(conf.RollPage, totalCount, size, pageIndex, beego.URLFor("ManagerController.Books"), fmt.Sprintf("&private=%v&wd=%v", private, wd)) |
| 385 | } else { |
| 386 | this.Data["PageHtml"] = "" |
| 387 | } |
| 388 | |
| 389 | this.Data["Lists"] = books |
| 390 | this.Data["Wd"] = wd |
| 391 | this.Data["IsBooks"] = true |
| 392 | this.GetSeoByPage("manage_project_list", map[string]string{ |
| 393 | "title": "书籍管理 - " + this.Sitename, |
| 394 | "keywords": "书籍管理", |
| 395 | "description": this.Sitename + "专注于文档在线写作、协作、分享、阅读与托管,让每个人更方便地发布、分享和获得知识。", |
| 396 | }) |
| 397 | this.Data["Private"] = private |
| 398 | this.TplName = "manager/books.html" |
| 399 | this.Data["Versions"], _ = models.NewVersion().Lists(1, 10000, "") |
| 400 | } |
| 401 | |
| 402 | // 编辑书籍. |
| 403 | func (this *ManagerController) EditBook() { |
nothing calls this directly
no test coverage detected