Browse Source

fix #25

tags/vopendata0.1.2
palytoxin 5 years ago
parent
commit
723527cbb6
5 changed files with 13 additions and 0 deletions
  1. +1
    -0
      options/locale/locale_en-US.ini
  2. +1
    -0
      options/locale/locale_zh-CN.ini
  3. +6
    -0
      routers/home.go
  4. +1
    -0
      routers/routes/routes.go
  5. +4
    -0
      templates/base/head_navbar.tmpl

+ 1
- 0
options/locale/locale_en-US.ini View File

@@ -59,6 +59,7 @@ manage_org = Manage Organizations
admin_panel = Site Administration
account_settings = Account Settings
settings = Settings
your_dashboard = Dashboard
your_profile = Profile
your_starred = Starred
your_settings = Settings


+ 1
- 0
options/locale/locale_zh-CN.ini View File

@@ -59,6 +59,7 @@ manage_org=管理我的组织
admin_panel=管理后台
account_settings=帐户设置
settings=帐户设置
your_dashboard=个人概览
your_profile=个人信息
your_starred=已点赞
your_settings=设置


+ 6
- 0
routers/home.go View File

@@ -37,6 +37,12 @@ const (

// Home render home page
func Home(ctx *context.Context) {
ctx.Data["PageIsHome"] = true
ctx.Data["IsRepoIndexerEnabled"] = setting.Indexer.RepoIndexerEnabled
ctx.HTML(200, tplHome)
}

func Dashboard(ctx *context.Context) {
if ctx.IsSigned {
if !ctx.User.IsActive && setting.Service.RegisterEmailConfirm {
ctx.Data["Title"] = ctx.Tr("auth.active_your_account")


+ 1
- 0
routers/routes/routes.go View File

@@ -285,6 +285,7 @@ func RegisterRoutes(m *macaron.Macaron) {
return ""
})
m.Get("/", routers.Home)
m.Get("/dashboard", routers.Dashboard)
m.Group("/explore", func() {
m.Get("", func(ctx *context.Context) {
ctx.Redirect(setting.AppSubURL + "/explore/repos")


+ 4
- 0
templates/base/head_navbar.tmpl View File

@@ -128,6 +128,10 @@
</div>

<div class="divider"></div>
<a class="item" href="{{AppSubUrl}}/dashboard">
{{svg "octicon-info" 16}}
{{.i18n.Tr "your_dashboard"}}<!-- Your dashboard -->
</a>
<a class="item" href="{{AppSubUrl}}/{{.SignedUser.Name}}">
{{svg "octicon-person" 16}}
{{.i18n.Tr "your_profile"}}<!-- Your profile -->


Loading…
Cancel
Save