From 972b3bf3b0b772dd919333375356ae56e469ebea Mon Sep 17 00:00:00 2001 From: mrsdizzie Date: Mon, 30 Mar 2020 02:49:54 -0400 Subject: [PATCH] Split dashboard elements into separate template files (#10885) * 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 * End file with an empty line Co-authored-by: zeripath --- 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 f14f89d80b2..f5b0e3f377a 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 00000000000..e1a3ca7d3a8 --- /dev/null +++ b/templates/user/dashboard/heatmap.tmpl @@ -0,0 +1,8 @@ +
+ +
+
{{.i18n.Tr "user.heatmap.loading"}}
+
+
+
+
diff --git a/templates/user/dashboard/repolist.tmpl b/templates/user/dashboard/repolist.tmpl new file mode 100644 index 00000000000..63019e58e83 --- /dev/null +++ b/templates/user/dashboard/repolist.tmpl @@ -0,0 +1,109 @@ +