Merge branch 'develop'

admin [init ok]
lea++ blog platform [ok]
This commit is contained in:
life
2014-09-24 22:24:52 +08:00
parent 99956cfd72
commit 87269cc939
409 changed files with 28646 additions and 18 deletions

View File

@ -4,7 +4,7 @@ import (
"github.com/revel/revel"
// "encoding/json"
"gopkg.in/mgo.v2/bson"
// . "leanote/app/lea"
// . "github.com/leanote/leanote/app/lea"
"github.com/leanote/leanote/app/info"
// "github.com/leanote/leanote/app/types"
// "io/ioutil"
@ -45,15 +45,14 @@ func (c Blog) SetNotebook2Blog(notebookId string, isBlog bool) revel.Result {
//-----------------------------
// 前台
// 默认是admin用户的博客
// 列表
// 这里还需要得到其它博客配置信息...
// 配置信息可以放在users表中, 或添加一个user_options表(用户配置表)
// 进入某个用户的博客
var blogPageSize = 5
var searchBlogPageSize = 30
func (c Blog) Index(userId string, notebookId string) revel.Result {
// 用户id为空, 转至博客平台
if userId == "" {
userId = leanoteUserId
userId = leanoteUserId;
}
// userId可能是 username, email
@ -90,7 +89,7 @@ func (c Blog) Index(userId string, notebookId string) revel.Result {
c.RenderArgs["page"] = page
c.RenderArgs["pageSize"] = blogPageSize
c.RenderArgs["count"] = count
// 当前notebook
c.RenderArgs["notebookId"] = notebookId
c.RenderArgs["notebook"] = notebook