pattern_preview.html
4.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
{% load i18n %}
<div class="entry-article scheme{{ pattern.type.inflection_type.color_scheme }}">
<div class="article-header">
<h1>
{{ pattern.name }}
</h1>
<p>{{ pattern.type.inflection_type.full_name }}</p>
<p>{% trans 'Type' %}: {{ pattern.type.symbol }}</p>
<p>
{% if detailed_counts %}
{% trans 'Total lexeme count' %}:
{% else %}
{% trans 'Lexeme count' %}:
{% 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">{{ subgroup_name }}</th>
{% for subgroup_label, count, example, url, extras in detailed_counts %}
<th>{{ subgroup_label }}</th>
{% endfor %}
</tr>
<tr>
<th class="left-header">{% trans 'Lexeme count' %}</th>
{% for subgroup_label, count, example, url, extras in detailed_counts %}
<td>
{% if count > 1 %}
<a href="{{ url }}">{{ count }}</a>
{% else %}
{{ count }}
{% endif %}
</td>
{% endfor %}
</tr>
<tr>
<th class="left-header example-header">{% trans 'Example' %}</th>
{% for subgroup_label, count, example, url, extras in detailed_counts %}
<td>
{% if example != None %}
{% if detailed_counts|length > 1 or extras_present %}
<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>
{% if extras_present %}
<tr>
<th class="left-header">{% trans 'Including quasi-verbs' %}</th>
{% for subgroup_label, count, example, url, extras in detailed_counts %}
<td>
{% with extras_count=extras.0 extras_url=extras.2 %}
{% if extras_count > 1 %}
<a href="{{ extras_url }}">{{ extras_count }}</a>
{% else %}
{{ extras_count }}
{% endif %}
{% endwith %}
</td>
{% endfor %}
</tr>
<tr>
<th class="left-header example-header">{% trans 'Example' %}</th>
{% for subgroup_label, count, example, url, extras in detailed_counts %}
<td>
{% with extras.1 as example %}
{% if example != None %}
<span class="radio switch-example" data-example="{{ example.1 }}"></span>
{% include "lexeme_link.html" with lexeme=example.0 %}
{% endif %}
{% endwith %}
</td>
{% endfor %}
</tr>
{% endif %}
</table>
{% endif %}
</div>
<div class="inflection-tables">
<div class="inflection-table-container">
<table class="inflection-table">
<tr>
<td class="header-c"><strong>{% trans 'Label' %}</strong></td>
<td class="header-c"><strong>{% trans 'Base form' %}</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 }}
<span class="qualifiers">
{% for qualifier in ending.qualifiers.all %}{{ qualifier.label }} {% endfor %}
</span>
</td>
</tr>
{% endfor %}
</table>
</div>
</div>
</div>