diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Pages/Index.cshtml b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Pages/Index.cshtml index 1bfd46cdac..95833052b7 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Pages/Index.cshtml +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Pages/Index.cshtml @@ -16,39 +16,41 @@ - - @await Component.InvokeAsync(typeof(ContentViewComponent), new { entityType = "quote", entityId = "1" }) - - @await Component.InvokeAsync(typeof(TagViewComponent), new + @if (GlobalFeatureManager.Instance.IsEnabled()) { - entityType = "quote", - entityId = "1", - tags = new List { "a", "b" } - }) - + @await Component.InvokeAsync(typeof(ContentViewComponent), new {entityType = "quote", entityId = "1"}) + } + + @if (GlobalFeatureManager.Instance.IsEnabled()) + { + @await Component.InvokeAsync(typeof(TagViewComponent), new + { + entityType = "quote", + entityId = "1", + tags = new List {"a", "b"} + }) + } - - @if (GlobalFeatureManager.Instance.IsEnabled()) { - @await Component.InvokeAsync(typeof(RatingViewComponent), new { entityType = "quote", entityId = "1" }) + @await Component.InvokeAsync(typeof(RatingViewComponent), new {entityType = "quote", entityId = "1"}) } @if (GlobalFeatureManager.Instance.IsEnabled()) { - @await Component.InvokeAsync(typeof(ReactionSelectionViewComponent), new { entityType = "quote", entityId = "1" }) + @await Component.InvokeAsync(typeof(ReactionSelectionViewComponent), new {entityType = "quote", entityId = "1"}) } @if (GlobalFeatureManager.Instance.IsEnabled()) { - @await Component.InvokeAsync(typeof(CommentingViewComponent), new { entityType = "quote", entityId = "1" }) + @await Component.InvokeAsync(typeof(CommentingViewComponent), new {entityType = "quote", entityId = "1"}) } @@ -58,7 +60,7 @@

"Writing code is very simple, but writing simple code is the hardest thing there is!"

-

- Halil ibrahim Kalkan Inspired from Johan Cruyff

+

- Halil ibrahim Kalkan Inspired from Johan Cruyff

@@ -66,31 +68,33 @@ @if (GlobalFeatureManager.Instance.IsEnabled()) { - @await Component.InvokeAsync(typeof(RatingViewComponent), new { entityType = "quote", entityId = "2" }) + @await Component.InvokeAsync(typeof(RatingViewComponent), new {entityType = "quote", entityId = "2"}) } @if (GlobalFeatureManager.Instance.IsEnabled()) { - @await Component.InvokeAsync(typeof(ReactionSelectionViewComponent), new { entityType = "quote", entityId = "2" }) + @await Component.InvokeAsync(typeof(ReactionSelectionViewComponent), new {entityType = "quote", entityId = "2"}) } @if (GlobalFeatureManager.Instance.IsEnabled()) { - @await Component.InvokeAsync(typeof(CommentingViewComponent), new { entityType = "quote", entityId = "2" }) + @await Component.InvokeAsync(typeof(CommentingViewComponent), new {entityType = "quote", entityId = "2"}) } - - @await Component.InvokeAsync(typeof(TagViewComponent), new + @if (GlobalFeatureManager.Instance.IsEnabled()) { - entityType = "IndexPage", - entityId = Guid.Empty.ToString(), - tags = new List { "a", "b" } - }) + @await Component.InvokeAsync(typeof(TagViewComponent), new + { + entityType = "IndexPage", + entityId = Guid.Empty.ToString(), + tags = new List {"a", "b"} + }) + } - + \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/GlobalFeatures/ContentsFeature.cs b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/GlobalFeatures/ContentsFeature.cs new file mode 100644 index 0000000000..6514a9c7b8 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/GlobalFeatures/ContentsFeature.cs @@ -0,0 +1,17 @@ +using JetBrains.Annotations; +using Volo.Abp.GlobalFeatures; + +namespace Volo.CmsKit.GlobalFeatures +{ + [GlobalFeatureName(Name)] + public class ContentsFeature : GlobalFeature + { + public const string Name = "CmsKit.Contents"; + + internal ContentsFeature( + [NotNull] GlobalCmsKitFeatures cmsKit + ) : base(cmsKit) + { + } + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/GlobalFeatures/GlobalCmsKitFeatures.cs b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/GlobalFeatures/GlobalCmsKitFeatures.cs index bb7694262b..db987784fd 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/GlobalFeatures/GlobalCmsKitFeatures.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/GlobalFeatures/GlobalCmsKitFeatures.cs @@ -13,12 +13,16 @@ namespace Volo.CmsKit.GlobalFeatures public RatingsFeature Ratings => GetFeature(); + public TagsFeature Tags => GetFeature(); + public GlobalCmsKitFeatures([NotNull] GlobalFeatureManager featureManager) : base(featureManager) { AddFeature(new ReactionsFeature(this)); AddFeature(new CommentsFeature(this)); AddFeature(new RatingsFeature(this)); + AddFeature(new TagsFeature(this)); + AddFeature(new ContentsFeature(this)); } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/GlobalFeatures/TagsFeature.cs b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/GlobalFeatures/TagsFeature.cs new file mode 100644 index 0000000000..ff20c130fd --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/GlobalFeatures/TagsFeature.cs @@ -0,0 +1,17 @@ +using JetBrains.Annotations; +using Volo.Abp.GlobalFeatures; + +namespace Volo.CmsKit.GlobalFeatures +{ + [GlobalFeatureName(Name)] + public class TagsFeature : GlobalFeature + { + public const string Name = "CmsKit.Tags"; + + internal TagsFeature( + [NotNull] GlobalCmsKitFeatures cmsKit + ) : base(cmsKit) + { + } + } +} \ No newline at end of file