From 2cbc2e401273567a474f747b175109c696e7d506 Mon Sep 17 00:00:00 2001 From: colorfulberry Date: Fri, 29 May 2020 17:52:25 +0800 Subject: [PATCH] feat: add attachment and downalod link --- options/locale/locale_en-US.ini | 1 + options/locale/locale_zh-CN.ini | 1 + templates/repo/datasets/dataset_list.tmpl | 96 +++++++++++++------------------ web_src/less/_dataset.less | 1 - 4 files changed, 42 insertions(+), 57 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index aba21c11d..64d21cad3 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -643,6 +643,7 @@ edit = edit private = private public = public back = back +copy_url=copy download url visibility = visibility visibility_description = Only the owner or the organization members if they have rights, will be able to see it. visibility_helper = Make Dataset Private diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini index 0eaf888e3..210497681 100644 --- a/options/locale/locale_zh-CN.ini +++ b/options/locale/locale_zh-CN.ini @@ -643,6 +643,7 @@ edit=编辑 private=私有 public=公有 back=返回 +copy_url=复制下载链接 visibility=可见性 visibility_description=只有组织所有人或拥有权利的组织成员才能看到。 visibility_helper=将数据集设为私有 diff --git a/templates/repo/datasets/dataset_list.tmpl b/templates/repo/datasets/dataset_list.tmpl index 35d1c684a..f7fd6ffa7 100644 --- a/templates/repo/datasets/dataset_list.tmpl +++ b/templates/repo/datasets/dataset_list.tmpl @@ -1,81 +1,65 @@ -
-
-
-
- {{svg "octicon-file-directory" 16}}深度学习数据集视频1.1.0 +{{if .dataset.Attachments}} + {{range .dataset.Attachments}} +
+
+ +
+ {{.Size | FileSize}} +
+
+ {{svg "octicon-flame" 16}} {{(.DownloadCount | PrettyNumber)}}
-
-
- 12GB -
-
- berry5 天前创建 -
+
+ {{svg "octicon-file" 16}} +
-
-
- -
- +
+
+ private +
+ public +
+
+
+ 删除
-
-
- 删除
-
+ {{end}} +{{end}}
-
- {{svg "octicon-file-directory" 16}}深度学习数据集视频1.1.0 -
+ + {{svg "octicon-cloud-download" 16}} 深度学习数据集视频1.1.0 +
-
+
12GB
-
- berry5 天前创建 +
+ {{svg "octicon-flame" 16}} 100
-
-
- -
- -
-
-
- 删除 -
-
-
-
-
-
-
- {{svg "octicon-file-directory" 16}}深度学习数据集视频1.1.0 -
-
- 12GB + {{svg "octicon-flame" 16}}
- berry5 天前创建 -
- -
-
- +
+ private
- + public
-
\ No newline at end of file +
diff --git a/web_src/less/_dataset.less b/web_src/less/_dataset.less index f28690b06..1e591c51d 100644 --- a/web_src/less/_dataset.less +++ b/web_src/less/_dataset.less @@ -145,7 +145,6 @@ align-items: center; } .title { - color: #444444; font-size: 16px; font-weight: bold; margin: 0 6px;