Blame view

dictionary/templates/lexeme_edit_form.html 6.07 KB
janek37 authored
1
{% load dictionary_extras i18n %}
janek37 authored
2
<form action="" method="post" id="lexeme-edit-form">
janek37 authored
3
4
    <p class="lexeme-save">
        <button type="submit" disabled="disabled" class="lexeme-edit-submit">
janek37 authored
5
            {% trans 'Zapisz' %}
janek37 authored
6
7
        </button>
        <button type="reset" disabled="disabled" class="lexeme-edit-cancel">
janek37 authored
8
            {% trans 'Anuluj' %}
janek37 authored
9
10
11
        </button>
        <button type="button" class="lexeme-edit-delete"
                {% if not editable %}disabled="disabled"{% endif %}>
janek37 authored
12
            {% trans 'Usuń leksem' %}
janek37 authored
13
14
        </button>
    </p>
janek37 authored
15
16
    <table id="vocab-list">
        <tr>
janek37 authored
17
18
            <th>{% trans 'Słownik właściciel' %}</th>
            <th>{% trans 'Słowniki używające' %}</th>
janek37 authored
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
        </tr>
        <tr>
            <td>
                {% if multiple_editable %}
                    {{ form.new_owner.as_widget }}
                {% else %}
                    <strong id="owner-vocabulary">{{ owner.id }}</strong>
                {% endif %}
            </td>
            <td>
                <ul>
                    {% for v in ro_vocabularies %}
                        <li>
                            {{ v.id }}
                        </li>
                    {% endfor %}
                    <li>
                        {{ form.vocabularies.as_widget }}
                    </li>
                </ul>
            </td>
        </tr>
    </table>
    <p class="main-field">
        {{ form.status.label_tag }} {{ form.status.as_widget }}
    </p>
janek37 authored
45
46
47
48
49
50
    <p class="main-field">
        {{ form.part_of_speech.label_tag }} {{ form.part_of_speech.as_widget }}
        <span id="homonym-count"></span>
    </p>
    <p class="main-field">
        {{ form.entry.label_tag }} {{ form.entry.as_widget }}
janek37 authored
51
        {% if homonym %}#{{ homonym }}{% endif %}
janek37 authored
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
    </p>
    <p class="main-field">
        {{ form.pronunciation.label_tag }} {{ form.pronunciation.as_widget }}
    </p>
    <p class="main-field">
        {{ form.valence.label_tag }} {{ form.valence.as_widget }}
    </p>
    <p class="main-field">
        {{ form.gloss.label_tag }} {{ form.gloss.as_widget }}
    </p>
    <p class="main-field">
        {{ form.note.label_tag }} {{ form.note.as_widget }}
    </p>
    <p class="main-field">
        {{ form.source.label_tag }} {{ form.source.as_widget }}
    </p>
janek37 authored
68
69
70
71
    <p>
        {{ form.borrowing_source.label_tag }}
        {{ form.borrowing_source.as_widget }}
    </p>
janek37 authored
72
73
74
75
76
77
    <div id="extra-attributes">
        {% for form in attribute_forms %}
            {{ form.as_p }}
        {% endfor %}
    </div>
    <p>
janek37 authored
78
        {% trans 'Sposoby odmiany' %}:
janek37 authored
79
80
81
82
83
        <input type="hidden" name="id" value="{{ id }}"/>
        {% if editable %}
            <button type="button" id="add-row">
                <span class="ui-icon ui-icon-plus"></span>
            </button>
janek37 authored
84
        {% endif %}
janek37 authored
85
86
87
88
89
90
    </p>
    <ul id="pattern-list" {{ editable|yesno:'class="editable",'|safe }}>
        {% for lip_form, ro_qualifiers in lip_forms %}
            {% include 'lexeme_edit_form_row.html' %}
        {% endfor %}
    </ul>
janek37 authored
91
    <p>{% trans 'Kwalifikatory' %}:</p>
janek37 authored
92
93
94
95
    <p>
        {% if ro_qualifiers %}
            {{ owner.id }}: {{ ro_qualifiers|join:", " }};
        {% endif %}
janek37 authored
96
97
    </p>
    <p>
janek37 authored
98
        {% trans 'stylistyczne' %}: {{ form.style_qualifiers.as_widget }}
janek37 authored
99
100
    </p>
    <p>
janek37 authored
101
        {% trans 'zakresowe' %}: {{ form.scope_qualifiers.as_widget }}
janek37 authored
102
    </p>
janek37 authored
103
    <p id="specialist" style="display: none;">
janek37 authored
104
        {{ form.specialist.as_widget }} {% trans 'specjalistyczny' %}
janek37 authored
105
106
107
108
    </p>
    <p class="main-field">
        {{ form.qualifiers_dor.label_tag }} {{ form.qualifiers_dor.as_widget }}
    </p>
janek37 authored
109
    {% comment %}
janek37 authored
110
111
112
113
114
115
116
117
    <p class="main-field">
        {{ form.qualifiers_style.label_tag }}
        {{ form.qualifiers_style.as_widget }}
    </p>
    <p class="main-field">
        {{ form.qualifiers_scope.label_tag }}
        {{ form.qualifiers_scope.as_widget }}
    </p>
janek37 authored
118
    {% endcomment %}
janek37 authored
119
120
121
    <div id="classifications">
        {% include "classification_forms.html" %}
    </div>
janek37 authored
122
    <p>
janek37 authored
123
124
125
126
127
128
        <strong>{{ form.extended_note.label_tag }}</strong>
    </p>
    <p>
        {{ form.extended_note.as_widget }}
    </p>
    <p>
janek37 authored
129
130
131
132
133
134
135
        <strong>{{ form.comment.label_tag }}</strong>
    </p>
    <p>
        {{ form.comment.as_widget }}
    </p>
    {% if editable or cross_references %}
        <p>
janek37 authored
136
            {% trans 'Odsyłacze' %}:
janek37 authored
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
            {% if editable %}
                <button type="button" id="add-cr-row">
                    <span class="ui-icon ui-icon-plus"></span>
                </button>
            {% endif %}
        </p>
        <ul id="cr-list">
            {% for cr in cross_references %}
                <li class="cr-row ui-state-default ui-corner-all"
                    id="cr-{{ cr.pk }}">
                    {% if editable %}
                        <span class="remove ui-icon ui-icon-closethick"></span>
                    {% endif %}
                    <span class="type">{{ cr.type.desc }}</span>
                    <span class="entry">{{ cr.to_lexeme.entry }}</span>
janek37 authored
152
153
154
155
156
                    <span class="hom">
                        {% if cr.to_lexeme.homonym_count > 1 %}
                            #{{ cr.to_lexeme.homonym_number }}
                        {% endif %}
                    </span>
janek37 authored
157
158
159
160
161
162
                    <span class="gender">
                        {% with cr.to_lexeme.part_of_speech.lexical_class_id as lc %}
                            {{ cr.to_lexeme.lip_data.genders }}
                            {{ cr.to_lexeme|attribute:"aspekt" }}
                        {% endwith %}
                    </span>
janek37 authored
163
164
165
166
167
                </li>
            {% endfor %}
        </ul>
    {% endif %}
    <p class="lexeme-save">
janek37 authored
168
        <button type="submit" disabled="disabled" class="lexeme-edit-submit">
janek37 authored
169
            {% trans 'Zapisz' %}
janek37 authored
170
        </button>
janek37 authored
171
        <button type="reset" disabled="disabled" class="lexeme-edit-cancel">
janek37 authored
172
            {% trans 'Anuluj' %}
janek37 authored
173
        </button>
janek37 authored
174
        <button type="button" class="lexeme-edit-delete"
janek37 authored
175
                {% if not editable %}disabled="disabled"{% endif %}>
janek37 authored
176
            {% trans 'Usuń leksem' %}
janek37 authored
177
178
        </button>
    </p>
janek37 authored
179
180
181
</form>
<div id="table-preview">
</div>