起始页

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",
"Workspace": "{pwd}/data/user_workspaces/admin",
"LatestSessionContent": {
"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"
],
"FileTree": [],
"Files": [],
"CurrentFile": ""
}

View File

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

View File

@ -186,9 +186,10 @@ func startHandler(w http.ResponseWriter, r *http.Request) {
httpSession.Save(r, w)
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),
"username": username, "ver": Ver}
"username": username, "workspace": userWorkspace, "ver": Ver}
t, err := template.ParseFiles("view/start.html")

View File

@ -2,30 +2,28 @@
<ul class="details">
<li class="title">Wide</li>
<li>
<label>{{.i18n.username}}</label>
<label>{{.i18n.current_user}}</label>{{.i18n.colon}}
{{.username}}
</li>
<li class="border">
<label>{{.i18n.workspace}}</label>
{{.username}}
<label>{{.i18n.workspace}}</label>{{.i18n.colon}}
{{.workspace}}
</li>
<li>
<label>{{.i18n.user_guide}}</label> <br/>
<a href="http://88250.gitbooks.io/wide-user-guide" target="_blank">88250.gitbooks.io/wide-user-guide</a>
<label><a href="http://88250.gitbooks.io/wide-user-guide" target="_blank">{{.i18n.user_guide}}</a></label> <br/>
</li>
<li class="border">
<label>{{.i18n.dev_guide}}</label><br/>
<a href="http://88250.gitbooks.io/wide-dev-guide" target="_blank">88250.gitbooks.io/wide-dev-guide</a>
<label><a href="http://88250.gitbooks.io/wide-dev-guide" target="_blank">{{.i18n.dev_guide}}</a></label><br/>
</li>
<li>
<label>{{.i18n.ver}}</label> {{.ver}}<br/>
<label>{{.i18n.dev_team}}</label>
<label>{{.i18n.ver}}</label>{{.i18n.colon}}{{.ver}}<br/>
<label>{{.i18n.dev_team}}</label>{{.i18n.colon}}
<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>
</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>
</li>
</ul>