tag and content features has been added.

pull/6821/head
Ilkay Ilknur 5 years ago
parent e404c30532
commit 009ba05b34

@ -16,39 +16,41 @@
<abp-card>
<abp-card-body class="p-5">
<abp-blockquote class="text-center">
@await Component.InvokeAsync(typeof(ContentViewComponent), new { entityType = "quote", entityId = "1" })
@await Component.InvokeAsync(typeof(TagViewComponent), new
@if (GlobalFeatureManager.Instance.IsEnabled<ContentsFeature>())
{
entityType = "quote",
entityId = "1",
tags = new List<string> { "a", "b" }
})
@await Component.InvokeAsync(typeof(ContentViewComponent), new {entityType = "quote", entityId = "1"})
}
@if (GlobalFeatureManager.Instance.IsEnabled<TagsFeature>())
{
@await Component.InvokeAsync(typeof(TagViewComponent), new
{
entityType = "quote",
entityId = "1",
tags = new List<string> {"a", "b"}
})
}
</abp-blockquote>
</abp-card-body>
</abp-card>
<abp-row>
<abp-column size-md="_6">
@if (GlobalFeatureManager.Instance.IsEnabled<RatingsFeature>())
{
@await Component.InvokeAsync(typeof(RatingViewComponent), new { entityType = "quote", entityId = "1" })
@await Component.InvokeAsync(typeof(RatingViewComponent), new {entityType = "quote", entityId = "1"})
}
</abp-column>
<abp-column size-md="_6">
@if (GlobalFeatureManager.Instance.IsEnabled<ReactionsFeature>())
{
@await Component.InvokeAsync(typeof(ReactionSelectionViewComponent), new { entityType = "quote", entityId = "1" })
@await Component.InvokeAsync(typeof(ReactionSelectionViewComponent), new {entityType = "quote", entityId = "1"})
}
</abp-column>
<abp-column size-md="_12">
@if (GlobalFeatureManager.Instance.IsEnabled<CommentsFeature>())
{
@await Component.InvokeAsync(typeof(CommentingViewComponent), new { entityType = "quote", entityId = "1" })
@await Component.InvokeAsync(typeof(CommentingViewComponent), new {entityType = "quote", entityId = "1"})
}
</abp-column>
</abp-row>
@ -58,7 +60,7 @@
<p class="h2 mb-4">
"Writing code is very simple, but writing simple code is the hardest thing there is!"
</p>
<p class="m-0"> - Halil ibrahim Kalkan <small class="d-block text-muted">Inspired from Johan Cruyff</small></p>
<p class="m-0"> - Halil ibrahim Kalkan <small class="d-block text-muted">Inspired from Johan Cruyff</small></p>
</abp-blockquote>
</abp-card-body>
</abp-card>
@ -66,31 +68,33 @@
<abp-column size-md="_6">
@if (GlobalFeatureManager.Instance.IsEnabled<RatingsFeature>())
{
@await Component.InvokeAsync(typeof(RatingViewComponent), new { entityType = "quote", entityId = "2" })
@await Component.InvokeAsync(typeof(RatingViewComponent), new {entityType = "quote", entityId = "2"})
}
</abp-column>
<abp-column size-md="_6">
@if (GlobalFeatureManager.Instance.IsEnabled<ReactionsFeature>())
{
@await Component.InvokeAsync(typeof(ReactionSelectionViewComponent), new { entityType = "quote", entityId = "2" })
@await Component.InvokeAsync(typeof(ReactionSelectionViewComponent), new {entityType = "quote", entityId = "2"})
}
</abp-column>
<abp-column size-md="_12">
@if (GlobalFeatureManager.Instance.IsEnabled<CommentsFeature>())
{
@await Component.InvokeAsync(typeof(CommentingViewComponent), new { entityType = "quote", entityId = "2" })
@await Component.InvokeAsync(typeof(CommentingViewComponent), new {entityType = "quote", entityId = "2"})
}
</abp-column>
</abp-row>
<abp-row>
<abp-column size="_12">
@await Component.InvokeAsync(typeof(TagViewComponent), new
@if (GlobalFeatureManager.Instance.IsEnabled<TagsFeature>())
{
entityType = "IndexPage",
entityId = Guid.Empty.ToString(),
tags = new List<string> { "a", "b" }
})
@await Component.InvokeAsync(typeof(TagViewComponent), new
{
entityType = "IndexPage",
entityId = Guid.Empty.ToString(),
tags = new List<string> {"a", "b"}
})
}
</abp-column>
</abp-row>
</abp-row>

@ -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)
{
}
}
}

@ -13,12 +13,16 @@ namespace Volo.CmsKit.GlobalFeatures
public RatingsFeature Ratings => GetFeature<RatingsFeature>();
public TagsFeature Tags => GetFeature<TagsFeature>();
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));
}
}
}

@ -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)
{
}
}
}
Loading…
Cancel
Save