Skip to content

Commit 0da8191

Browse files
committed
Added null state if there is nothing to convert
1 parent 1778801 commit 0da8191

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

AutoBlockList/Controllers/AutoBlockListApiController.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ public PagedResult<DisplayAutoBlockListContent> GetAllContentWithNC(int page)
100100

101101
return contentTypes != null && contentTypes.Any() ? contentTypes : null;
102102
});
103+
104+
if (contentTypes == null || !contentTypes.Any())
105+
return new PagedResult<DisplayAutoBlockListContent>(0, 0, 0);
106+
103107
var contentTypesIds = contentTypes.Select(x => x.Id).ToList();
104108
contentTypesIds.AddRange(_autoBlockListService.GetComposedOf(contentTypesIds));
105109

AutoBlockList/wwwroot/backoffice/autoBlockList/overview.html

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,22 @@
1313

1414
<div class="umb-logviewer" ng-if="!vm.loading">
1515
<div class="umb-logviewer__main-content" style="width: calc(100% - 425px);">
16-
<umb-box>
16+
17+
<umb-box ng-if="!vm.loadingTable && vm.pagedContent.totalItems === 0">
18+
<umb-box-content>
19+
20+
<umb-empty-state size="small">
21+
There is nothing to convert.
22+
</umb-empty-state>
23+
24+
</umb-box-content>
25+
</umb-box>
26+
27+
<umb-box ng-if="vm.pagedContent.totalItems > 0">
1728
<umb-box-header title="Content" description="Converts all nested content data types to block lists and adds them to the contents document type. It also converts the content to make it work with block list."></umb-box-header>
1829

1930
<umb-box-content>
20-
31+
2132
<div class="umb-editor-sub-header umb-editor-sub-header-- --state-selection mt3" ng-if="vm.selectedContent.length">
2233
<div>
2334
<umb-button action="vm.clearSelection()"

0 commit comments

Comments
 (0)