|
|
|
@@ -487,10 +487,6 @@ func MyFavoriteDataset(ctx *context.Context) { |
|
|
|
} |
|
|
|
|
|
|
|
NotColDatasets, NotColcount, err := models.MyFvAttachments(&models.AttachmentsOptions{ |
|
|
|
ListOptions: models.ListOptions{ |
|
|
|
Page: page, |
|
|
|
PageSize: setting.UI.DatasetPagingNum, |
|
|
|
}, |
|
|
|
Keyword: keyword, |
|
|
|
NeedDatasetIDs: true, |
|
|
|
DatasetIDs: NotColDatasetIDs, |
|
|
|
@@ -508,10 +504,6 @@ func MyFavoriteDataset(ctx *context.Context) { |
|
|
|
} |
|
|
|
//If is collaborator, there is no need to determine whether the dataset is private or public |
|
|
|
IsColDatasets, IsColcount, err := models.MyFvAttachments(&models.AttachmentsOptions{ |
|
|
|
ListOptions: models.ListOptions{ |
|
|
|
Page: page, |
|
|
|
PageSize: setting.UI.DatasetPagingNum, |
|
|
|
}, |
|
|
|
Keyword: keyword, |
|
|
|
NeedDatasetIDs: true, |
|
|
|
DatasetIDs: NotColDatasetIDs, |
|
|
|
@@ -562,6 +554,15 @@ func merge(a, b interface{}) interface{} { |
|
|
|
|
|
|
|
return a |
|
|
|
} |
|
|
|
func getTotalPage(total int64, pageSize int) int { |
|
|
|
|
|
|
|
another := 0 |
|
|
|
if int(total)%pageSize != 0 { |
|
|
|
another = 1 |
|
|
|
} |
|
|
|
return int(total)/pageSize + another |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
func GetDatasetStatus(ctx *context.Context) { |
|
|
|
|
|
|
|
|