From 9574d002deda4472835f1e22ee66227e3faaf5e1 Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Tue, 10 Sep 2019 09:27:33 +0300 Subject: [PATCH] Show information when no features resolved https://github.com/volosoft/volo/issues/570 --- .../Localization/Domain/en.json | 3 +- .../FeatureManagementModal.cshtml | 87 ++++++++++--------- 2 files changed, 50 insertions(+), 40 deletions(-) diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo/Abp/FeatureManagement/Localization/Domain/en.json b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo/Abp/FeatureManagement/Localization/Domain/en.json index 68af08b6a1..2e8812968d 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo/Abp/FeatureManagement/Localization/Domain/en.json +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo/Abp/FeatureManagement/Localization/Domain/en.json @@ -1,6 +1,7 @@ { "culture": "en", "texts": { - "Features": "Features" + "Features": "Features", + "NoFeatureFoundMessage": "There is't any available feature." } } \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Pages/FeatureManagement/FeatureManagementModal.cshtml b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Pages/FeatureManagement/FeatureManagementModal.cshtml index b52ea264b4..59e80e236c 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Pages/FeatureManagement/FeatureManagementModal.cshtml +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Pages/FeatureManagement/FeatureManagementModal.cshtml @@ -12,49 +12,58 @@
- - - - @for (var i = 0; i < Model.FeatureListDto.Features.Count; i++) - { - var feature = Model.FeatureListDto.Features[i]; -
+ @if (Model.FeatureListDto?.Features != null && Model.FeatureListDto.Features.Any()) + { + + + + @for (var i = 0; i < Model.FeatureListDto.Features.Count; i++) + { + var feature = Model.FeatureListDto.Features[i]; +
- @feature.Name + @feature.Name - - @if (feature.ValueType is FreeTextStringValueType) - { - - - } - @if (feature.ValueType is SelectionStringValueType) - { - - + @if (feature.ValueType is FreeTextStringValueType) + { + + + } + @if (feature.ValueType is SelectionStringValueType) + { + + - } - @if (feature.ValueType is ToggleStringValueType) - { - - - } -
- } -
- + + } + @if (feature.ValueType is ToggleStringValueType) + { + + + } +
+ } +
+ + } + else + { + + @L["NoFeatureFoundMessage"] + + }