Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<Description>integration library for integrating cloudscribe SimpleContent with cloudscribe Core multi-tenant web app foundation</Description>
<Version>5.1.0</Version>
<Version>5.1.2</Version>
<Authors>Joe Audette</Authors>
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
<PackageTags>cloudscribe;blog</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

var disqusScriptPath = "//" + Model.ProjectSettings.DisqusShortName + ".disqus.com/embed.js";
}
@if (allowDisqus && (Model.CurrentPost != null) && (!string.IsNullOrEmpty(Model.CurrentPost.Id)))
@if (allowDisqus && (Model.CurrentPost != null) && (!string.IsNullOrEmpty(Model.CurrentPost.Id)) && (Model.ShowComments))
{
@sr["Comments"]
<div id="disqus_thread" data-disqus-config data-disqus-page-url="@Context.Request.GetCurrentFullUrl()" data-disqus-page-id="@Model.CurrentPost.Id" data-disqus-script-url="@disqusScriptPath"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@
<label asp-for="IsFeatured" class="form-check-label">@sr["Is Featured"]</label>
</div>
</div>
<div class="form-group">
<div class="form-check">
<input asp-for="ShowComments" class="form-check-input" />
<label asp-for="ShowComments" class="form-check-label">@sr["Allow Comments"]</label>
</div>
</div>

@if (Model.TeasersEnabled)
{
Expand Down Expand Up @@ -106,7 +112,7 @@
</div>
}

</div>
</div>
</form>
<partial name="EditDraftPubDatePartial" model="@Model" />
@if (!string.IsNullOrEmpty(Model.Id))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,20 @@
<label asp-for="IsFeatured" class="form-check-label">@sr["Is Featured"]</label>
</div>
</div>
<div class="form-group">
<div class="form-check">
<input asp-for="ShowComments" class="form-check-input" />
<label asp-for="ShowComments" class="form-check-label">@sr["Allow Comments"]</label>
</div>
</div>

@if (Model.TeasersEnabled)
{
<partial name="EditWithTemplateTeaserHtmlPartial" model="@Model" />
}
else
{
<partial name="EditTeaserDisabledPartial" />
<partial name="EditTeaserDisabledPartial" />
}

<div class="form-inline">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@
if (!pubDate.HasValue) { pubDate = DateTime.UtcNow; }
}
<time class="@GetPubDateClass()" datetime='@pubDate.Value.ToString("s")' itemprop="datePublished">@Model.FormatDate(pubDate.Value)</time>
<partial name="CommentLinkDetail" model="@Model" />
@if (Model.ShowComments)
{
<partial name="CommentLinkDetail" model="@Model" />
}
@if (Model.CurrentPost.Categories.Count > 0)
{
<ul class="categories">
Expand All @@ -47,7 +50,7 @@
}
</ul>
}
</div>
</div>
</header>
<partial name="NextPreviousPartial" model="@Model" />
<partial name="PostContentBodyPartial" model="@Model" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@
</h1>
<div class="bh">
<time class="@GetPubDateClass()" datetime='@pubDate.Value.ToString("s")' itemprop="datePublished">@Model.FormatDate(pubDate.Value)</time>
<partial name="CommentLinkList" model="@Model" />
@if (Model.TmpPost.ShowComments)
{
<partial name="CommentLinkList" model="@Model" />
}
@if (Model.TmpPost.Categories.Count > 0)
{
<ul class="categories">
Expand All @@ -48,7 +51,7 @@
}
</ul>
}
</div>
</div>
</header>
<div itemprop="articleBody">
@if (!Model.TmpPost.IsPublished)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<Description>Bootstrap 4 pre-compiled views for cloudscribe.SimpleContent.Web</Description>
<Version>5.1.0</Version>
<Version>5.1.2</Version>
<Authors>Joe Audette</Authors>
<TargetFramework>netcoreapp3.1</TargetFramework>
<RazorLangVersion>3.0</RazorLangVersion>
Expand Down
1 change: 1 addition & 0 deletions src/cloudscribe.SimpleContent.Models/Blog/IPost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public interface IPost : IContentItem
bool IsFeatured { get; set; }
string ImageUrl { get; set; }
string ThumbnailUrl { get; set; }
bool ShowComments { get; set; }

/// <summary>
/// If not null or whitespace, displays this teaser on blog index/listing views regardless of <see cref="TeaserMode"/> settings.
Expand Down
1 change: 1 addition & 0 deletions src/cloudscribe.SimpleContent.Models/Blog/Post.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public Post()
public string ThumbnailUrl { get; set; }

public string ContentType { get; set; } = "html";
public bool ShowComments { get; set; } = true;

/// <summary>
/// If not null or whitespace, displays this teaser on blog index/listing views regardless of <see cref="TeaserMode"/> settings.
Expand Down
1 change: 1 addition & 0 deletions src/cloudscribe.SimpleContent.Models/ModelExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ public static void CopyTo(this IPost input, IPost target)
target.CorrelationKey = input.CorrelationKey;
target.ImageUrl = input.ImageUrl;
target.ThumbnailUrl = input.ThumbnailUrl;
target.ShowComments = input.ShowComments;
target.IsFeatured = input.IsFeatured;
target.TeaserOverride = input.TeaserOverride;
target.SuppressTeaser = input.SuppressTeaser;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<Description>cloudscribe.SimpleContent.Models Class Library</Description>
<VersionPrefix>5.1.0</VersionPrefix>
<VersionPrefix>5.1.2</VersionPrefix>
<Authors>Joe Audette</Authors>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<PackageTags>cloudscribe;blog;cms</PackageTags>
Expand All @@ -14,10 +14,14 @@
</PropertyGroup>

<ItemGroup>
<None Include="icon.png" Pack="true" PackagePath="\"/>
<None Include="icon.png" Pack="true" PackagePath="\" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.1.6">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="cloudscribe.Pagination.Models" Version="1.1.0" />

<PackageReference Include="System.Security.Claims" Version="4.3.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ public PostEntity()
public string ImageUrl { get; set; }
public string ThumbnailUrl { get; set; }

//added to support TalkAbout Comments switch
public bool ShowComments { get; set; } = false;

private List<string> categories;
public List<string> Categories
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<Description>base package - Entity Framework Core implementation of cloudscribe SimpleContent commands and queries</Description>
<Version>5.1.0</Version>
<Version>5.1.2</Version>
<Authors>Joe Audette</Authors>
<TargetFrameworks>netstandard2.1</TargetFrameworks>
<PackageTags>cloudscribe;commands;queries;ef</PackageTags>
Expand Down
Loading