-
Notifications
You must be signed in to change notification settings - Fork 63
Expand file tree
/
Copy pathCommentPartial.cshtml
More file actions
33 lines (32 loc) · 1.63 KB
/
CommentPartial.cshtml
File metadata and controls
33 lines (32 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
@using cloudscribe.SimpleContent.Models
@using cloudscribe.SimpleContent.Web
@addTagHelper "*, cloudscribe.Web.Common"
@model cloudscribe.SimpleContent.Web.ViewModels.BlogViewModel
@inject IStringLocalizer<SimpleContent> sr
<article data-id="@Model.TmpComment.Id" itemscope itemtype="http://schema.org/UserComments" itemprop="comment" class="@(Model.TmpComment.IsAdmin ? "self" : null)">
<img gravatar-email="@Model.TmpComment.Email" gravatar-size="50" alt="Comment by @Model.TmpComment.Author" />
<div class="comment-item">
<h3><time datetime='@Model.TmpComment.PubDate.ToString("s")' itemprop="commentTime">@Model.FormatCommentDate(Model.TmpComment.PubDate)</time></h3>
<p itemprop="commentText">@Html.Raw(Model.FilterComment(Model.TmpComment))</p>
@if (string.IsNullOrEmpty(Model.TmpComment.Website))
{
<strong itemprop="creator">@Model.TmpComment.Author</strong>
}
else
{
<strong itemprop="creator"><a href="@Model.TmpComment.Website" itemprop="url" rel="nofollow">@Model.TmpComment.Author</a></strong>
}
@if (Model.CanEdit)
{
<button class="deletecomment btn btn-link">@sr["Delete"]</button>
@if (Model.ProjectSettings.ModerateComments && !Model.TmpComment.IsApproved)
{
<button class="approvecomment btn btn-link">Approve</button>
}
}
</div>
@if (Model.ProjectSettings.ModerateComments && !Model.TmpComment.IsApproved && !Model.CanEdit)
{
<div itemprop="approvalWarning">@sr["! The comment will not be visible until a moderator approves it !"]</div>
}
</article>