diff --git a/routers/user/profile.go b/routers/user/profile.go index 215dff008..dc1d0a113 100644 --- a/routers/user/profile.go +++ b/routers/user/profile.go @@ -209,6 +209,27 @@ func Profile(ctx *context.Context) { } total = int(count) + case "datasets": + datasetSearchOptions := &models.SearchDatasetOptions{ + Keyword: keyword, + OwnerID: ctxUser.ID, + SearchOrderBy: orderBy, + ListOptions: models.ListOptions{ + Page: page, + PageSize: setting.UI.ExplorePagingNum, + }, + } + + if len(datasetSearchOptions.SearchOrderBy) == 0 { + datasetSearchOptions.SearchOrderBy = models.SearchOrderByAlphabetically + } + + datasets, count, err := models.SearchDataset(datasetSearchOptions) + if err != nil { + ctx.ServerError("SearchDatasets", err) + } + total = int(count) + ctx.Data["datasets"] = datasets default: repos, count, err = models.SearchRepository(&models.SearchRepoOptions{ ListOptions: models.ListOptions{ diff --git a/templates/datasets/dataset_list.tmpl b/templates/datasets/dataset_list.tmpl index aa1006a7b..2d334ef3c 100644 --- a/templates/datasets/dataset_list.tmpl +++ b/templates/datasets/dataset_list.tmpl @@ -1,4 +1,4 @@ -