From 0b17d63e59d29c039329ec400f4608185e7633be Mon Sep 17 00:00:00 2001 From: colorfulberry Date: Fri, 18 Sep 2020 09:51:06 +0800 Subject: [PATCH] feat: improve the dataset --- templates/explore/dataset_list.tmpl | 8 ++++++-- templates/repo/datasets/index.tmpl | 6 +++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/templates/explore/dataset_list.tmpl b/templates/explore/dataset_list.tmpl index 5f4720fec..f7caf4f36 100755 --- a/templates/explore/dataset_list.tmpl +++ b/templates/explore/dataset_list.tmpl @@ -26,7 +26,7 @@
- {{.Title}} + {{.Repo.OwnerName}} / {{.Title}}
{{svg "octicon-tasklist" 16}} {{$.i18n.Tr (printf "dataset.task.%s" .Task)}} @@ -37,7 +37,11 @@
-
{{.Description}}
+ {{if .Description}} +

{{.Description}}

+ {{else if .Repo.DescriptionHTML}} +

{{.Repo.DescriptionHTML}}

+ {{end}}

{{$.i18n.Tr "org.repo_updated"}} {{TimeSinceUnix .UpdatedUnix $.i18n.Lang}}

diff --git a/templates/repo/datasets/index.tmpl b/templates/repo/datasets/index.tmpl index 09642b222..1c6a2a2b2 100755 --- a/templates/repo/datasets/index.tmpl +++ b/templates/repo/datasets/index.tmpl @@ -21,7 +21,11 @@
- {{.dataset.Description}} + {{if .dataset.Description }} + {{.dataset.Description}} + {{else}} + {{.Repository.DescriptionHTML}} + {{end}}