<commit_before>@using System.Threading.Tasks
@using CompetitionPlatform.Helpers
@model CompetitionPlatform.Models.BlogViewModels.BlogCommentPartialViewModel

@if (ClaimsHelper.GetUser(User.Identity).Email != null)
{
    <form asp-controller="Blog" asp-action="AddComment" enctype="multipart/form-data" class="form form--message">
        @if (ClaimsHelper.GetUser(User.Identity).Email != null)
        {
            <div class="message_card message_card--form">
                <div class="user_badge user_badge--small">
                    <div class="user_badge__img">
                        <a href=""><img src="~/images/avatar.svg" alt=""></a>
                    </div>
                    <div class="user_badge__message">
                        <div class="message_card__inner">
                            <div class="user_badge__title">
                                <a href="">@ClaimsHelper.GetUser(User.Identity).GetFullName()</a>
                            </div>
                            @Html.Hidden("blogId", Model.BlogId)
                            <input asp-for="@Model.BlogId" type="hidden" />
                            <textarea asp-for="@Model.Comment" id="msg" placeholder="Enter your comment here..." class="form-control form-control--textarea message_card__area"></textarea>
                        </div>
                    </div>
                </div>
            </div>
            <div class="message_actions">
                <div class="row">
                    <div class="col-sm-6">
                        @*<div class="checkbox">
                                <label for="ch1" class="checkbox__label"><input type="checkbox" id="ch1" class="checkbox__control"> Notify me of new comments via email</label>
                            </div>*@
                    </div>
                    <div class="col-sm-6 text-right">
                        <input type="submit" value="Post Comment" class="btn" />
                    </div>
                </div>
            </div>
        }
    </form>
}
else
{
    <div class="form form--message disabled">
        <div class="message_card__inner">
            <div style="height: 80px; line-height: 60px;" class="form-control" disabled>
                <div class="text-center">
                    Please
                    <a asp-area="" asp-controller="Home" asp-action="SignIn" class="">login</a>
                    to leave a comment
                </div>
            </div>
        </div>
    </div>
}

<div class="messages_list">
    @foreach (var comment in Model.Comments)
    {
        <div class="message_card @(!string.IsNullOrEmpty(comment.ParentId) ? "message_card--accent" : "")">
            <div class="user_badge user_badge--small">
                <div class="user_badge__img"><a href=""><img src="~/images/avatar.svg" alt=""></a></div>
                <div class="user_badge__message">
                    <div class="message_card__inner">
                        <div class="user_badge__title">
                            <a href="">@comment.FullName</a>
                            @if (comment.UserId == Model.BlogAuthorId)
                            {
                                <span class="label label--primary">creator</span>
                            }<commit_msg>In blog comments make names unclickable.<commit_after>@using System.Threading.Tasks
@using CompetitionPlatform.Helpers
@model CompetitionPlatform.Models.BlogViewModels.BlogCommentPartialViewModel

@if (ClaimsHelper.GetUser(User.Identity).Email != null)
{
    <form asp-controller="Blog" asp-action="AddComment" enctype="multipart/form-data" class="form form--message">
        @if (ClaimsHelper.GetUser(User.Identity).Email != null)
        {
            <div class="message_card message_card--form">
                <div class="user_badge user_badge--small">
                    <div class="user_badge__img">
                        <a href=""><img src="~/images/avatar.svg" alt=""></a>
                    </div>
                    <div class="user_badge__message">
                        <div class="message_card__inner">
                            <div class="user_badge__title">
                                <div>@ClaimsHelper.GetUser(User.Identity).GetFullName()</div>
                            </div>
                            @Html.Hidden("blogId", Model.BlogId)
                            <input asp-for="@Model.BlogId" type="hidden" />
                            <textarea asp-for="@Model.Comment" id="msg" placeholder="Enter your comment here..." class="form-control form-control--textarea message_card__area"></textarea>
                        </div>
                    </div>
                </div>
            </div>
            <div class="message_actions">
                <div class="row">
                    <div class="col-sm-6">
                        @*<div class="checkbox">
                                <label for="ch1" class="checkbox__label"><input type="checkbox" id="ch1" class="checkbox__control"> Notify me of new comments via email</label>
                            </div>*@
                    </div>
                    <div class="col-sm-6 text-right">
                        <input type="submit" value="Post Comment" class="btn" />
                    </div>
                </div>
            </div>
        }
    </form>
}
else
{
    <div class="form form--message disabled">
        <div class="message_card__inner">
            <div style="height: 80px; line-height: 60px;" class="form-control" disabled>
                <div class="text-center">
                    Please
                    <a asp-area="" asp-controller="Home" asp-action="SignIn" class="">login</a>
                    to leave a comment
                </div>
            </div>
        </div>
    </div>
}

<div class="messages_list">
    @foreach (var comment in Model.Comments)
    {
        <div class="message_card @(!string.IsNullOrEmpty(comment.ParentId) ? "message_card--accent" : "")">
            <div class="user_badge user_badge--small">
                <div class="user_badge__img"><a href=""><img src="~/images/avatar.svg" alt=""></a></div>
                <div class="user_badge__message">
                    <div class="message_card__inner">
                        <div class="user_badge__title">
                            <span>@comment.FullName</span>
                            @if (comment.UserId == Model.BlogAuthorId)
                            {
                                <span class="label label--primary">creator</span>
                            }
{'fraction_non_alphanumeric': 0.1362055933484505, 'fraction_numerical': 0.002418745275888133, 'mean_word_length': 1.5108159392789373, 'pattern_counts': {'":': 0, '<': 125, '<?xml version=': 0, '>': 125, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6270755', 'n_tokens_mistral': 1786, 'n_tokens_neox': 1688, 'n_words': 317}