diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 110c2a2090..c4956c65f1 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -391,7 +391,8 @@ follow = Follow unfollow = Unfollow heatmap.loading = Loading Heatmap… user_bio = Biography - +own = Own +all = All form.name_reserved = The username '%s' is reserved. form.name_pattern_not_allowed = The pattern '%s' is not allowed in a username. form.name_chars_not_allowed = User name '%s' contains invalid characters. diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini index 751aea64ba..1eb590c176 100755 --- a/options/locale/locale_zh-CN.ini +++ b/options/locale/locale_zh-CN.ini @@ -391,7 +391,8 @@ follow=关注 unfollow=取消关注 heatmap.loading=正在加载热图... user_bio=简历 - +own = 个人 +all = 所有 form.name_reserved='%s' 用户名被保留。 form.name_pattern_not_allowed=用户名中不允许使用 "%s"。 form.name_chars_not_allowed=用户名 '%s' 包含无效字符。 diff --git a/routers/user/home.go b/routers/user/home.go old mode 100644 new mode 100755 index 2fc0c60aad..7d1f247eaa --- a/routers/user/home.go +++ b/routers/user/home.go @@ -145,18 +145,18 @@ func Dashboard(ctx *context.Context) { ctx.Data["MirrorCount"] = len(mirrors) ctx.Data["Mirrors"] = mirrors - retrieveFeeds(ctx, models.GetFeedsOptions{ - RequestedUser: ctxUser, - Actor: ctx.User, - IncludePrivate: true, - OnlyPerformedBy: false, - IncludeDeleted: false, - }) + //retrieveFeeds(ctx, models.GetFeedsOptions{ + // RequestedUser: ctxUser, + // Actor: ctx.User, + // IncludePrivate: true, + // OnlyPerformedBy: false, + // IncludeDeleted: false, + //}) if ctx.Written() { return } - ctx.HTML(200, tplDashboard) + //ctx.HTML(200, tplDashboard) } // Milestones render the user milestones page diff --git a/routers/user/profile.go b/routers/user/profile.go old mode 100644 new mode 100755 index 0e29b61174..063b269148 --- a/routers/user/profile.go +++ b/routers/user/profile.go @@ -178,10 +178,17 @@ func Profile(ctx *context.Context) { total = ctxUser.NumFollowing case "activity": + typeQuery := ctx.Query("type") + ctx.Data["ActTabName"] = typeQuery + onlyPerformedBy := true + if typeQuery == "all" { + onlyPerformedBy = false + } + retrieveFeeds(ctx, models.GetFeedsOptions{RequestedUser: ctxUser, Actor: ctx.User, IncludePrivate: showPrivate, - OnlyPerformedBy: true, + OnlyPerformedBy: onlyPerformedBy, IncludeDeleted: false, }) if ctx.Written() { @@ -261,6 +268,8 @@ func Profile(ctx *context.Context) { ctx.Data["ShowUserEmail"] = len(ctxUser.Email) > 0 && ctx.IsSigned && (!ctxUser.KeepEmailPrivate || ctxUser.ID == ctx.User.ID) + Dashboard(ctx) + ctx.HTML(200, tplProfile) } diff --git a/templates/base/head_navbar.tmpl b/templates/base/head_navbar.tmpl index 1eada0a01b..fd6634a7d1 100755 --- a/templates/base/head_navbar.tmpl +++ b/templates/base/head_navbar.tmpl @@ -9,7 +9,7 @@ {{if .IsSigned}} - {{.i18n.Tr "dashboard"}} + {{.i18n.Tr "dashboard"}} {{.i18n.Tr "custom.head.openi"}} {{if not .UnitIssuesGlobalDisabled}} {{.i18n.Tr "issues"}} @@ -109,13 +109,9 @@
- - {{svg "octicon-info" 16}} - {{.i18n.Tr "your_dashboard"}} - {{svg "octicon-person" 16}} - {{.i18n.Tr "your_profile"}} + {{.i18n.Tr "your_dashboard"}} {{svg "octicon-star" 16}} diff --git a/templates/explore/repo_list.tmpl b/templates/explore/repo_list.tmpl old mode 100644 new mode 100755 diff --git a/templates/user/dashboard/repo_list_dashboard.tmpl b/templates/user/dashboard/repo_list_dashboard.tmpl new file mode 100755 index 0000000000..89be6fc746 --- /dev/null +++ b/templates/user/dashboard/repo_list_dashboard.tmpl @@ -0,0 +1,131 @@ +

+ {{.i18n.Tr "explore.repos"}} +

+
+
+ +
+ +
+ +
diff --git a/templates/user/profile.tmpl b/templates/user/profile.tmpl old mode 100644 new mode 100755 index 58f6cc471a..4b1619f0c8 --- a/templates/user/profile.tmpl +++ b/templates/user/profile.tmpl @@ -89,7 +89,7 @@ {{svg "octicon-inbox" 16}} {{.i18n.Tr "user.datasets"}} - + {{svg "octicon-rss" 16}} {{.i18n.Tr "user.activity"}} @@ -117,6 +117,12 @@
{{end}} +
{{template "user/dashboard/feeds" .}}
@@ -135,8 +141,7 @@ {{template "explore/dataset_list" .}} {{template "base/paginate" .}} {{else}} - {{template "explore/repo_search" .}} - {{template "explore/repo_list" .}} + {{template "user/dashboard/repo_list_dashboard" .}} {{template "base/paginate" .}} {{end}}