<commit_before>{% macro render_paper_section(contribution) %}
    {% set can_submit = contribution.is_user_associated(session.user, check_abstract=true) %}
    {% set paper = contribution.paper %}
    {% set show_paper = paper.accepted_revision %}
    {% set show_paper_status = paper.last_revision and can_submit %}
    {% set show_paper_submission = contribution.event_new.cfp.is_open and can_submit %}

    {% if show_paper or show_paper_status or show_paper_submission %}
        <section>
            <div class="header">
                <div class="header-row">
                    <h3 class="icon-file">Paper</h3>
                </div>
            </div>
            {% if show_paper %}
                {# TODO: Implement new accepted paper widget #}
            {% elif show_paper_status %}
                {{ _render_paper_status_box(paper) }}
            {% elif show_paper_submission %}
                {{ _render_paper_submission_box(contribution) }}
            {% endif %}
        </section>
    {% endif %}
{% endmacro %}


{% macro _render_paper_status_box(paper) %}
    {% set state_mapping = {'submitted': '',
                            'accepted': 'accept',
                            'rejected': 'danger',<commit_msg>Show paper status even if accepted<commit_after>{% macro render_paper_section(contribution) %}
    {% set can_submit = contribution.is_user_associated(session.user, check_abstract=true) %}
    {% set paper = contribution.paper %}
    {% set show_paper = paper and paper.accepted_revision %}
    {% set show_paper_status = paper and can_submit %}
    {% set show_paper_submission = contribution.event_new.cfp.is_open and can_submit %}

    {% if show_paper or show_paper_status or show_paper_submission %}
        <section>
            <div class="header">
                <div class="header-row">
                    <h3 class="icon-file">{% trans %}Paper{% endtrans %}</h3>
                </div>
            </div>

            {% if show_paper %}
                {# TODO: Implement new accepted paper widget #}
            {% endif %}

            {% if show_paper_status %}
                {{ _render_paper_status_box(paper) }}
            {% elif not show_paper and show_paper_submission %}
                {{ _render_paper_submission_box(contribution) }}
            {% endif %}
        </section>
    {% endif %}
{% endmacro %}


{% macro _render_paper_status_box(paper) %}
    {% set state_mapping = {'submitted': '',
                            'accepted': 'accept',
                            'rejected': 'danger',
{'fraction_non_alphanumeric': 0.1212475633528265, 'fraction_numerical': 0.0015594541910331384, 'mean_word_length': 2.1027811366384523, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1215226', 'n_tokens_mistral': 786, 'n_tokens_neox': 689, 'n_words': 144}