<commit_before>{% load i18n leprikon_tags sekizai_tags thumbnail %}

<div class="box box-{{ object.subject_type.subject_type }} box-{{ object.subject_type.slug }}">
    <div class="box-header">
        <strong>{{ object.display_name }}</strong>
        {% for group in object.all_groups %}
        <small class="tag" style="color: {{ group.font_color }}; border-color: {{ group.font_color }}; background-color: {{ group.color }}">
            {{ group.name }}
        </small>
        {% endfor %}
        {% if object.price %}
        <small>{{ object.price | currency }}{% if object.school_year_division.period_name %} / {{ object.school_year_division.period_name }}{% endif %}</small>
        {% endif %}
        {% if request.user.is_staff or request.leader in object.all_leaders %}
        <a class="btn btn-primary btn-xs" href="{% url_with_back 'leprikon:subject_update' object.subject_type.slug object.id %}">
            <span class="glyphicon glyphicon-edit" aria-hidden="true"></span>
            {% trans 'edit' %}
        </a>
        {% endif %}
    </div>

    <div class="box-content">
        {% if object.photo %}
        <a href="{% thumbnail object.photo 1500x1500 %}" data-toggle="lightbox" data-title="{{ object.photo.name }}">
            <img class="right" alt="{{ object.photo.name }}" src="{% thumbnail object.photo 200x200 %}" />
        </a>
        {% endif %}

        {% if object.start_date %}{# event #}
        <p>
            {% trans 'Start' %}: {{ object.start_date }}{% if objec.start_time %}, {{ objec.start_time }}{% endif %}
            {% if object.start_date != object.end_date or objec.end_time %}
                <br/>
                {% trans 'End' %}:
                {% if object.start_date != object.end_date %}
                    {{ object.end_date }}{% if objec.end_time %}, {{ objec.end_time }}{% endif %}
                {% else %}
                    {{ objec.end_time }}
                {% endif %}
            {% endif %}
            {% if object.place %}
                <br/>
                {% trans 'Place' %}: {{ object.place }}
            {% endif %}
        </p>
        {% elif object.all_times or object.place %}{# course #}
        <p>
            {% if object.all_times %}{% trans 'Time' %}: {{ object.all_times | comma_separated }}{% endif %}
            {% if object.all_times and object.place %}<br/>{% endif %}
            {% if object.place %}{% trans 'Place' %}: {{ object.place }}{% endif %}
        </p>
        {% endif %}

        {{ object.description | safe }}

        {% if object.all_leaders %}
        <p>
            {% blocktrans count counter=object.all_leaders|length %}Led by{% plural %}Led by{% endblocktrans %}
            {{ object.get_leaders_list }}
        </p>
        {% endif %}

        {% if object.subject_type.all_attachments or object.all_attachments %}
        <p>
            {% trans 'Attachments' %}:
            {% for attachment in object.subject_type.all_attachments %}
            <a href="{{ attachment.file.url }}">{{ attachment.file }}</a>
            {% endfor %}
            {% for attachment in object.all_attachments %}
            <a href="{{ attachment.file.url }}">{{ attachment.file }}</a>
            {% endfor %}
        </p>
        {% endif %}

        {% if object.page %}
        <p>
            {% trans 'More information' %}:<commit_msg>show age groups in subject preview<commit_after>{% load i18n leprikon_tags sekizai_tags thumbnail %}

<div class="box box-{{ object.subject_type.subject_type }} box-{{ object.subject_type.slug }}">
    <div class="box-header">
        <strong>{{ object.display_name }}</strong>
        {% for group in object.all_groups %}
        <small class="tag" style="color: {{ group.font_color }}; border-color: {{ group.font_color }}; background-color: {{ group.color }}">
            {{ group.name }}
        </small>
        {% endfor %}
        {% if object.price %}
        <small>{{ object.price | currency }}{% if object.school_year_division.period_name %} / {{ object.school_year_division.period_name }}{% endif %}</small>
        {% endif %}
        {% if request.user.is_staff or request.leader in object.all_leaders %}
        <a class="btn btn-primary btn-xs" href="{% url_with_back 'leprikon:subject_update' object.subject_type.slug object.id %}">
            <span class="glyphicon glyphicon-edit" aria-hidden="true"></span>
            {% trans 'edit' %}
        </a>
        {% endif %}
    </div>

    <div class="box-content">
        {% if object.photo %}
        <a href="{% thumbnail object.photo 1500x1500 %}" data-toggle="lightbox" data-title="{{ object.photo.name }}">
            <img class="right" alt="{{ object.photo.name }}" src="{% thumbnail object.photo 200x200 %}" />
        </a>
        {% endif %}

        {% if object.start_date %}{# event #}
        <p>
            {% trans 'Start' %}: {{ object.start_date }}{% if objec.start_time %}, {{ objec.start_time }}{% endif %}
            {% if object.start_date != object.end_date or objec.end_time %}
                <br/>
                {% trans 'End' %}:
                {% if object.start_date != object.end_date %}
                    {{ object.end_date }}{% if objec.end_time %}, {{ objec.end_time }}{% endif %}
                {% else %}
                    {{ objec.end_time }}
                {% endif %}
            {% endif %}
            {% if object.place %}
                <br/>
                {% trans 'Place' %}: {{ object.place }}
            {% endif %}
        </p>
        {% elif object.all_times or object.place %}{# course #}
        <p>
            {% if object.all_times %}{% trans 'Time' %}: {{ object.all_times | comma_separated }}{% endif %}
            {% if object.all_times and object.place %}<br/>{% endif %}
            {% if object.place %}{% trans 'Place' %}: {{ object.place }}{% endif %}
        </p>
        {% endif %}

        {{ object.description | safe }}

        <p>
            {% blocktrans count counter=object.all_age_groups|length %}Věková skupina{% plural %}Věkové skupiny{% endblocktrans %}:
            {{ object.all_age_groups|comma_separated }}
        </p>

        {% if object.all_leaders %}
        <p>
            {% blocktrans count counter=object.all_leaders|length %}Led by{% plural %}Led by{% endblocktrans %}
            {{ object.get_leaders_list }}
        </p>
        {% endif %}

        {% if object.subject_type.all_attachments or object.all_attachments %}
        <p>
            {% trans 'Attachments' %}:
            {% for attachment in object.subject_type.all_attachments %}
            <a href="{{ attachment.file.url }}">{{ attachment.file }}</a>
            {% endfor %}
            {% for attachment in object.all_attachments %}
            <a href="{{ attachment.file.url }}">{{ attachment.file }}</a>
            {% endfor %}
        </p>
        {% endif %}

        {% if object.page %}
        <p>
            {% trans 'More information' %}:
{'fraction_non_alphanumeric': 0.17199827858269975, 'fraction_numerical': 0.004590446133983647, 'mean_word_length': 1.9567430025445292, 'pattern_counts': {'":': 0, '<': 71, '<?xml version=': 0, '>': 71, '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': '5904232', 'n_tokens_mistral': 2290, 'n_tokens_neox': 2016, 'n_words': 431}