#175 in-reply-to in all comments page

This commit is contained in:
Hamid Reza Mohammadi 2021-07-08 16:50:39 +04:30
parent be71d7c84d
commit 9ac68d77c9

View File

@ -78,7 +78,8 @@ namespace GanjooRazor.Pages
foreach (var comment in comments)
{
string commentAuthorLink = comment.UserId == null ? comment.AuthorName : $"<a href=\"/hashieha/?userid={comment.UserId}\">{comment.AuthorName}</a>";
htmlText += $"<p>{commentAuthorLink} <small>در {comment.CommentDate.ToFriendlyPersianDateTextify()}</small> دربارهٔ <a href=\"{comment.Poem.UrlSlug}#comment-{comment.Id}\">{comment.Poem.Title}</a>:</p>" +
string inReplyTo = comment.InReplayTo == null ? "" : $" در پاسخ به {comment.InReplayTo.AuthorName} ";
htmlText += $"<p>{commentAuthorLink} <small>در {comment.CommentDate.ToFriendlyPersianDateTextify()}{inReplyTo}</small> دربارهٔ <a href=\"{comment.Poem.UrlSlug}#comment-{comment.Id}\">{comment.Poem.Title}</a>:</p>" +
$"<blockquote>{comment.HtmlComment}{Environment.NewLine}" +
$"</blockquote>{Environment.NewLine}<div class='spacer'>&nbsp;</div><hr />{Environment.NewLine}";
}