起始页

This commit is contained in:
Liang Ding 2014-10-21 17:41:42 +08:00
parent 679c20fe94
commit d2839f14fc
4 changed files with 15 additions and 17 deletions

View File

@ -17,10 +17,7 @@
"Password": "admin", "Password": "admin",
"Workspace": "{pwd}/data/user_workspaces/admin", "Workspace": "{pwd}/data/user_workspaces/admin",
"LatestSessionContent": { "LatestSessionContent": {
"FileTree": [ "FileTree": [],
"E:\\Work\\go\\src\\github.com\\b3log\\wide\\data\\user_workspaces\\admin\\src\\mytest",
"E:\\Work\\go\\src\\github.com\\b3log\\wide\\data\\user_workspaces\\admin\\src\\mytest\\hello"
],
"Files": [], "Files": [],
"CurrentFile": "" "CurrentFile": ""
} }

View File

@ -5,6 +5,7 @@
"file": "文件", "file": "文件",
"login": "登录", "login": "登录",
"username": "用户名", "username": "用户名",
"current_user": "当前用户",
"password": "密码", "password": "密码",
"login_failed": "登录失败", "login_failed": "登录失败",
"run": "运行", "run": "运行",
@ -56,5 +57,6 @@
"confirm_save": "请确认所有文件已保存", "confirm_save": "请确认所有文件已保存",
"workspace": "工作空间", "workspace": "工作空间",
"project_address": "项目地址", "project_address": "项目地址",
"community": "社区" "community": "社区",
"colon": ""
} }

View File

@ -186,9 +186,10 @@ func startHandler(w http.ResponseWriter, r *http.Request) {
httpSession.Save(r, w) httpSession.Save(r, w)
username := httpSession.Values["username"].(string) username := httpSession.Values["username"].(string)
userWorkspace := conf.Wide.GetUserWorkspace(username)
model := map[string]interface{}{"conf": conf.Wide, "i18n": i18n.GetAll(r), "locale": i18n.GetLocale(r), model := map[string]interface{}{"conf": conf.Wide, "i18n": i18n.GetAll(r), "locale": i18n.GetLocale(r),
"username": username, "ver": Ver} "username": username, "workspace": userWorkspace, "ver": Ver}
t, err := template.ParseFiles("view/start.html") t, err := template.ParseFiles("view/start.html")

View File

@ -2,30 +2,28 @@
<ul class="details"> <ul class="details">
<li class="title">Wide</li> <li class="title">Wide</li>
<li> <li>
<label>{{.i18n.username}}</label> <label>{{.i18n.current_user}}</label>{{.i18n.colon}}
{{.username}} {{.username}}
</li> </li>
<li class="border"> <li class="border">
<label>{{.i18n.workspace}}</label> <label>{{.i18n.workspace}}</label>{{.i18n.colon}}
{{.username}} {{.workspace}}
</li> </li>
<li> <li>
<label>{{.i18n.user_guide}}</label> <br/> <label><a href="http://88250.gitbooks.io/wide-user-guide" target="_blank">{{.i18n.user_guide}}</a></label> <br/>
<a href="http://88250.gitbooks.io/wide-user-guide" target="_blank">88250.gitbooks.io/wide-user-guide</a>
</li> </li>
<li class="border"> <li class="border">
<label>{{.i18n.dev_guide}}</label><br/> <label><a href="http://88250.gitbooks.io/wide-dev-guide" target="_blank">{{.i18n.dev_guide}}</a></label><br/>
<a href="http://88250.gitbooks.io/wide-dev-guide" target="_blank">88250.gitbooks.io/wide-dev-guide</a>
</li> </li>
<li> <li>
<label>{{.i18n.ver}}</label> {{.ver}}<br/> <label>{{.i18n.ver}}</label>{{.i18n.colon}}{{.ver}}<br/>
<label>{{.i18n.dev_team}}</label> <label>{{.i18n.dev_team}}</label>{{.i18n.colon}}
<a href="https://github.com/b3log/b3log-solo/wiki/About_us" target="_blank">B3log</a><br/> <a href="https://github.com/b3log/b3log-solo/wiki/About_us" target="_blank">B3log</a><br/>
<label>{{.i18n.project_address}}</label> <label>{{.i18n.project_address}}</label>{{.i18n.colon}}
<a href="https://github.com/b3log/wide" target="_blank">github.com/b3log/wide</a> <a href="https://github.com/b3log/wide" target="_blank">github.com/b3log/wide</a>
</li> </li>
<li> <li>
<label>{{.i18n.donate}}</label> <label>{{.i18n.donate}}</label>{{.i18n.colon}}
<a href="http://b3log.org/donate.html" target="_blank">b3log.org/donate.html</a> <a href="http://b3log.org/donate.html" target="_blank">b3log.org/donate.html</a>
</li> </li>
</ul> </ul>