Browse Source

Merge branch 'cms-kit/content-management' into cms-kit/content-management-cleaning

pull/6850/head
Enis Necipoglu 6 years ago
committed by GitHub
parent
commit
da854375ea
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 50
      modules/cms-kit/host/Volo.CmsKit.Web.Unified/Pages/Index.cshtml
  2. 17
      modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/GlobalFeatures/ContentsFeature.cs
  3. 4
      modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/GlobalFeatures/GlobalCmsKitFeatures.cs
  4. 17
      modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/GlobalFeatures/TagsFeature.cs

50
modules/cms-kit/host/Volo.CmsKit.Web.Unified/Pages/Index.cshtml

@ -16,38 +16,40 @@
<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"
})
@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"
})
}
</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>
@ -57,7 +59,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>
@ -65,30 +67,32 @@
<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()
})
@await Component.InvokeAsync(typeof(TagViewComponent), new
{
entityType = "IndexPage",
entityId = Guid.Empty.ToString()
})
}
</abp-column>
</abp-row>
</abp-row>

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

4
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<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));
}
}
}

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