<commit_before>{# ----Blogger:BlogBundle:News:news.html.twig----
=================================================
Template to show page with one article detailed #}

{% extends ':Blog:base.html.twig' %}

{% block content %}

    <!-- article -->

    <div class="inner">
        <div class="border">
            <div class="space-between">
                <a href="{{ path('main') }}">
                    <div class="button inner-orange article-navigation go-back">
                        Назад
                    </div>
                </a>
                <div></div>
            </div>
            <div class="article">
                <div class="title">
                    {{ article.title }}
                </div>
                <div class="head-info">
                    <a href="{{ path('news_sorted', { 'category': 'theme', 'value': article.theme }) }}">
                        <div class="theme button">                        
                            #{{ article.theme }}                        
                        </div>
                    </a>
                    <a href="{{ path('user', { 'username': article.author.username }) }}">
                        <div class="author button">                        
                            Автор: {{ article.author.username }}                        
                        </div>
                    </a>
                </div>
                <div class="date">
                    создано: {{ article.created|date }}
                </div>
                <div class="image">
                    <img src="{{ asset('uploads/images/' ~ article.image.path) }}">
                </div>
                <div class="description">
                    {{ article.description }}
                </div>
                {% if article.isUpdated %}
                    <div class="date">
                        отредактировано: {{ article.updated|date }}
                    </div>
                {% endif %}
            </div>
            {% block comment_error %}
            {% endblock %}
            <!-- foot navigation -->
            <div class="article-navigation">
                {% if (is_granted('ROLE_MODERATOR')) or (app.user == article.author) %}
                    <a href="{{ path('news_edit',{ 'id': article.id }) }}">
                        <div class="button inner-orange">
                            Редактировать &#10000;
                        </div>
                    </a>
                {% else %}
                    <div></div>
                {% endif %}
                <a href="{{ path('comment_add', { 'id': article.id }) }}">
                    <div class="button inner-orange button-comment">
                        комментировать
                    </div>
                </a>
            </div>
        </div>
    </div>

    <!-- comments -->

    {% block comment_form %}
    {% endblock %}
    {% block comments %}
        {% if article.comments!= null %}
            <div class="inner">
                <div class="border">
                    {% set comment_number = 0 %}
                    {% for comment in article.comments %}
                        {% set comment_number = comment_number + 1 %}
                        <div class="article comment">                                                                                    
                            <a href="{{ path('user', { 'username': comment.author.username }) }}">                                
                                <div class="author row">
                                    <div class="left row">
                                        {% if comment.author.userAccount != null %}
                                            {% if comment.author.userAccount.avatar != null %}
                                                <div class="avatar">                                    
                                                    <img src="{{ asset('uploads/users/' ~ app.user.userAccount.avatar.name) }}"></img>
                                                </div>
                                            {% endif %}
                                        {% endif %}                                    
                                        {{ comment.author.username }}
                                    </div>
                                    <div class="right">
                                        <div class="">
                                            #{{ comment_number }}
                                        </div>
                                    </div>
                                </div>
                            </a>                          
                            <div class="date">
                                {{ comment.created|date }}
                            </div>
                            <div class="description">
                                {{ comment.content }}
                            </div>
                        </div><commit_msg>fix comment bug with author<commit_after>{# ----Blogger:BlogBundle:News:news.html.twig----
=================================================
Template to show page with one article detailed #}

{% extends ':Blog:base.html.twig' %}

{% block content %}

    <!-- article -->

    <div class="inner">
        <div class="border">
            <div class="space-between">
                <a href="{{ path('main') }}">
                    <div class="button inner-orange article-navigation go-back">
                        Назад
                    </div>
                </a>
                <div></div>
            </div>
            <div class="article">
                <div class="title">
                    {{ article.title }}
                </div>
                <div class="head-info">
                    <a href="{{ path('news_sorted', { 'category': 'theme', 'value': article.theme }) }}">
                        <div class="theme button">                        
                            #{{ article.theme }}                        
                        </div>
                    </a>
                    <a href="{{ path('user', { 'username': article.author.username }) }}">
                        <div class="author button">                        
                            Автор: {{ article.author.username }}                        
                        </div>
                    </a>
                </div>
                <div class="date">
                    создано: {{ article.created|date }}
                </div>
                <div class="image">
                    <img src="{{ asset('uploads/images/' ~ article.image.path) }}">
                </div>
                <div class="description">
                    {{ article.description }}
                </div>
                {% if article.isUpdated %}
                    <div class="date">
                        отредактировано: {{ article.updated|date }}
                    </div>
                {% endif %}
            </div>
            {% block comment_error %}
            {% endblock %}
            <!-- foot navigation -->
            <div class="article-navigation">
                {% if (is_granted('ROLE_MODERATOR')) or (app.user == article.author) %}
                    <a href="{{ path('news_edit',{ 'id': article.id }) }}">
                        <div class="button inner-orange">
                            Редактировать &#10000;
                        </div>
                    </a>
                {% else %}
                    <div></div>
                {% endif %}
                <a href="{{ path('comment_add', { 'id': article.id }) }}">
                    <div class="button inner-orange button-comment">
                        комментировать
                    </div>
                </a>
            </div>
        </div>
    </div>

    <!-- comments -->

    {% block comment_form %}
    {% endblock %}
    {% block comments %}
        {% if article.comments!= null %}
            <div class="inner">
                <div class="border">
                    {% set comment_number = 0 %}
                    {% for comment in article.comments %}
                        {% set comment_number = comment_number + 1 %}
                        <div class="article comment">                                                                                    
                            <a href="{{ path('user', { 'username': comment.author.username }) }}">                                
                                <div class="author row">
                                    <div class="left row">
                                        {% if comment.author.userAccount != null %}
                                            {% if comment.author.userAccount.avatar != null %}
                                                <div class="avatar">                                    
                                                    <img src="{{ asset('uploads/users/' ~ comment.author.userAccount.avatar.name) }}"></img>
                                                </div>
                                            {% endif %}
                                        {% endif %}                                    
                                        {{ comment.author.username }}
                                    </div>
                                    <div class="right">
                                        <div class="">
                                            #{{ comment_number }}
                                        </div>
                                    </div>
                                </div>
                            </a>                          
                            <div class="date">
                                {{ comment.created|date }}
                            </div>
                            <div class="description">
                                {{ comment.content }}
                            </div>
                        </div>
{'fraction_non_alphanumeric': 0.13246083680349, 'fraction_numerical': 0.001388062661114416, 'mean_word_length': 0.7376399655469423, 'pattern_counts': {'":': 0, '<': 147, '<?xml version=': 0, '>': 147, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 70, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1359350', 'n_tokens_mistral': 2188, 'n_tokens_neox': 1935, 'n_words': 421}