diff --git a/templates/repo/datasets/index.tmpl b/templates/repo/datasets/index.tmpl index 4afe13083..b24c4abca 100644 --- a/templates/repo/datasets/index.tmpl +++ b/templates/repo/datasets/index.tmpl @@ -1,30 +1,61 @@ {{template "base/head" .}} -
+
{{template "repo/header" .}} -
- {{template "base/alert" .}} -
+
+ {{template "base/alert" .}} +
-

{{.i18n.Tr "datasets"}}

+

{{.i18n.Tr "datasets"}}

+
+ No Description +
+
+ + +
+
{{template "repo/datasets/dataset_list" .}}
@@ -41,8 +72,6 @@
- - -
+
{{template "base/footer" .}} diff --git a/web_src/js/index.js b/web_src/js/index.js index c6f90d7ab..63d04699c 100644 --- a/web_src/js/index.js +++ b/web_src/js/index.js @@ -1086,6 +1086,18 @@ async function initRepository() { initReactionSelector(); } + // Datasets + if ($('.repository.dataset-list.view').length > 0) { + const editContentToggle = function () { + $('#dataset-content').toggle(); + $('#dataset-content-edit').toggle(); + $('#dataset-content input').focus(); + return false; + }; + $('#dataset-edit').on('click', editContentToggle); + $('#cancel').on('click', editContentToggle); + } + // Diff if ($('.repository.diff').length > 0) { $('.diff-counter').each(function () {