From eb09616e1d310eebddac4a1af29842b276d96f79 Mon Sep 17 00:00:00 2001 From: lewis <747342561@qq.com> Date: Mon, 17 May 2021 10:45:05 +0800 Subject: [PATCH 01/15] 1 --- templates/explore/repo_list.tmpl | 99 ++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) mode change 100644 => 100755 templates/explore/repo_list.tmpl diff --git a/templates/explore/repo_list.tmpl b/templates/explore/repo_list.tmpl old mode 100644 new mode 100755 index b10a860aec..f6463f20af --- a/templates/explore/repo_list.tmpl +++ b/templates/explore/repo_list.tmpl @@ -24,6 +24,105 @@
+
+ + +

+ {{.i18n.Tr "home.my_repos"}} ${reposTotalCount} + {{if or (not .ContextUser.IsOrganization) .IsOrganizationOwner}} + + {{end}} +

+ +
+
{{range .Repos}} -- 2.34.1 From 11d6cb1b89ded5be1c865c745d378f5fa1e5afac Mon Sep 17 00:00:00 2001 From: lewis <747342561@qq.com> Date: Tue, 18 May 2021 15:23:48 +0800 Subject: [PATCH 02/15] mod dashboard --- routers/user/home.go | 2 +- routers/user/profile.go | 2 + templates/base/head_navbar.tmpl | 8 +- templates/explore/repo_list.tmpl | 243 +++++++++++++------------------ 4 files changed, 105 insertions(+), 150 deletions(-) mode change 100644 => 100755 routers/user/home.go mode change 100644 => 100755 routers/user/profile.go diff --git a/routers/user/home.go b/routers/user/home.go old mode 100644 new mode 100755 index 2fc0c60aad..9421ee7d14 --- a/routers/user/home.go +++ b/routers/user/home.go @@ -156,7 +156,7 @@ func Dashboard(ctx *context.Context) { 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..0fcc6453ab --- a/routers/user/profile.go +++ b/routers/user/profile.go @@ -261,6 +261,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 index f6463f20af..89be6fc746 100755 --- a/templates/explore/repo_list.tmpl +++ b/templates/explore/repo_list.tmpl @@ -1,31 +1,9 @@

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

-
-
- - -

- {{.i18n.Tr "home.my_repos"}} ${reposTotalCount} - {{if or (not .ContextUser.IsOrganization) .IsOrganizationOwner}} - - {{end}} -

-