leanote beta2 release

This commit is contained in:
life
2014-11-12 20:08:07 +08:00
parent 4669fbcbdd
commit 6f12e179eb
10 changed files with 36 additions and 224 deletions

View File

@ -594,8 +594,12 @@ func (c Blog) Post(userIdOrEmail, noteId string) (re revel.Result) {
}
prePost, nextPost := blogService.PreNextBlog(userId, userBlog.SortField, userBlog.IsAsc, baseTime)
c.RenderArgs["prePost"] = prePost
c.RenderArgs["nextPost"] = nextPost
if prePost.NoteId != "" {
c.RenderArgs["prePost"] = prePost
}
if nextPost.NoteId != "" {
c.RenderArgs["nextPost"] = nextPost
}
return c.render("post.html", userBlog.ThemePath)
}

View File

@ -57,16 +57,15 @@ func (c Note) Index() revel.Result {
c.RenderArgs["isAdmin"] = configService.GetAdminUsername() == userInfo.Username
c.RenderArgs["userInfo"] = userInfo
c.RenderArgs["userInfoJson"] = c.Json(userInfo)
c.RenderArgs["notebooks"] = c.Json(notebooks)
c.RenderArgs["shareNotebooks"] = c.Json(shareNotebooks)
c.RenderArgs["sharedUserInfos"] = c.Json(sharedUserInfos)
c.RenderArgs["notebooks"] = notebooks
c.RenderArgs["shareNotebooks"] = shareNotebooks
c.RenderArgs["sharedUserInfos"] = sharedUserInfos
c.RenderArgs["notes"] = c.Json(notes)
c.RenderArgs["noteContentJson"] = c.Json(noteContent)
c.RenderArgs["notes"] = notes
c.RenderArgs["noteContentJson"] = noteContent
c.RenderArgs["noteContent"] = noteContent.Content
c.RenderArgs["tagsJson"] = c.Json(tagService.GetTags(c.GetUserId()))
c.RenderArgs["tags"] = tagService.GetTags(c.GetUserId())
c.RenderArgs["globalConfigs"] = configService.GetGlobalConfigForUser()