From 534dc93e53a808dbc53add2cc73a343028f57094 Mon Sep 17 00:00:00 2001 From: "j. mccann" Date: Sun, 29 Mar 2020 22:39:04 -0400 Subject: [PATCH 1/2] Split dashboard elements into separate template files No code change just Move Heatmap and Repo list/search into separate template files (like feeds and navbar already are). This will let a user more easily replace dashboard.tmpl without regularly becoming out of sync with fixes or changes to the actual code. Fixes #10870 --- templates/user/dashboard/dashboard.tmpl | 119 +----------------------- templates/user/dashboard/heatmap.tmpl | 8 ++ templates/user/dashboard/repolist.tmpl | 109 ++++++++++++++++++++++ 3 files changed, 119 insertions(+), 117 deletions(-) create mode 100644 templates/user/dashboard/heatmap.tmpl create mode 100644 templates/user/dashboard/repolist.tmpl diff --git a/templates/user/dashboard/dashboard.tmpl b/templates/user/dashboard/dashboard.tmpl index f14f89d80b2a..f5b0e3f377a9 100644 --- a/templates/user/dashboard/dashboard.tmpl +++ b/templates/user/dashboard/dashboard.tmpl @@ -6,126 +6,11 @@
{{if .EnableHeatmap}} -
- -
-
{{.i18n.Tr "user.heatmap.loading"}}
-
-
-
-
+ {{template "user/dashboard/heatmap" .}} {{end}} {{template "user/dashboard/feeds" .}}
- + {{template "user/dashboard/repolist" .}}
diff --git a/templates/user/dashboard/heatmap.tmpl b/templates/user/dashboard/heatmap.tmpl new file mode 100644 index 000000000000..b1ec035aa024 --- /dev/null +++ b/templates/user/dashboard/heatmap.tmpl @@ -0,0 +1,8 @@ +
+ +
+
{{.i18n.Tr "user.heatmap.loading"}}
+
+
+
+
\ No newline at end of file diff --git a/templates/user/dashboard/repolist.tmpl b/templates/user/dashboard/repolist.tmpl new file mode 100644 index 000000000000..612c5205c10a --- /dev/null +++ b/templates/user/dashboard/repolist.tmpl @@ -0,0 +1,109 @@ +
+ +
+ + + +
+
+
\ No newline at end of file From 2845aaf3901317c730347286d41c5035060a9268 Mon Sep 17 00:00:00 2001 From: zeripath Date: Mon, 30 Mar 2020 07:20:48 +0100 Subject: [PATCH 2/2] End file with an empty line --- templates/user/dashboard/heatmap.tmpl | 2 +- templates/user/dashboard/repolist.tmpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/user/dashboard/heatmap.tmpl b/templates/user/dashboard/heatmap.tmpl index b1ec035aa024..e1a3ca7d3a89 100644 --- a/templates/user/dashboard/heatmap.tmpl +++ b/templates/user/dashboard/heatmap.tmpl @@ -5,4 +5,4 @@
- \ No newline at end of file + diff --git a/templates/user/dashboard/repolist.tmpl b/templates/user/dashboard/repolist.tmpl index 612c5205c10a..63019e58e83f 100644 --- a/templates/user/dashboard/repolist.tmpl +++ b/templates/user/dashboard/repolist.tmpl @@ -106,4 +106,4 @@ - \ No newline at end of file +