pattern_preview.html 3.1 KB
{% load i18n %}
<div class="entry-article scheme{{ pattern.type.lexical_class.color_scheme }}">
    <div class="article-header">
        <h1>
            {{ pattern.name }}
        </h1>
        <p>{{ pattern.type.lexical_class.full_name }}</p>
        <p>{% trans 'Typ' %}: {{ pattern.type.symbol }}</p>
        <p>
            {% if detailed_counts %}
                {% trans 'Sumaryczna liczba leksemów' %}:
            {% else %}
                {% trans 'Liczba leksemów' %}:
            {% endif %}
            {% if lexeme_count > 0 %}
                <a href="{{ pattern_filter_url }}">{{ lexeme_count }}</a>
            {% else %}
                {{ lexeme_count }}
            {% endif %}
        </p>
        {% if detailed_counts %}
            <table class="detailed-counts">
                <tr>
                    <th class="left-header">{% trans 'Rodzaj' %}</th>
                    {% for subgroup_label, count, example, url in detailed_counts %}
                        <th>{{ subgroup_label }}</th>
                    {% endfor %}
                </tr>
                <tr>
                    <th class="left-header">{% trans 'Liczba leksemów' %}</th>
                    {% for subgroup_label, count, example, url in detailed_counts %}
                        <td>
                            {% if count > 1 %}
                                <a href="{{ url }}">{{ count }}</a>
                            {% else %}
                                {{ count }}
                            {% endif %}
                        </td>
                    {% endfor %}
                </tr>
                <tr>
                    <th class="left-header">{% trans 'Przykład' %}</th>
                    {% for subgroup_label, count, example, url in detailed_counts %}
                        <td>
                            {% if example != None %}
                                {% if detailed_counts|length > 1 %}
                                    <span class="radio switch-example{% if forloop.first %} checked active-example{% endif %}"
                                          data-example="{{ example.1 }}"></span>
                                {% endif %}
                                {% include "lexeme_link.html" with lexeme=example.0 %}
                            {% endif %}
                        </td>
                    {% endfor %}
                </tr>
            </table>
        {% endif %}
    </div>
    <div class="inflection-tables">
        <div class="inflection-table-container">
            <table class="inflection-table">
                <tr>
                    <td class="header-c"><strong>{% trans 'Etykieta' %}</strong></td>
                    <td class="header-c"><strong>{% trans 'Forma bazowa' %}</strong></td>
                </tr>
                {% for ending in pattern.endings.all %}
                    <tr>
                        <td class="left">{{ ending.base_form_label.symbol }}</td>
                        <td><span class="root">{{ root }}</span>·{{ ending.string }}</td>
                    </tr>
                {% endfor %}
            </table>
        </div>
    </div>
</div>