Commit ea232a86f8b1ec5d3f46084d786bdea24e546474
1 parent
81daac4e
filtrowanie wg źródła
--HG-- branch : beta
Showing
3 changed files
with
8 additions
and
1 deletions
README-DEV
... | ... | @@ -3,6 +3,8 @@ dodawanie filtrów dla leksemów |
3 | 3 | 1. w js/lexeme-view.js dodajemy opis do filter_fields |
4 | 4 | [opcjonalnie: generować listę wartości w dictionary/views.py] |
5 | 5 | 2. dodać tłumaczenie pola do LexemeQuery.filter_field_translation |
6 | + (jeśli tłumaczenie nie jest potrzebne, to trzeba dodać pole to | |
7 | + LexemeQuery.literal_filter_fields) | |
6 | 8 | 3. jeśli filtr potrzebuje specjalnej obsługi, to w LexemeQuery.apply_filter_rule |
7 | 9 | 4. i już! |
8 | 10 | |
... | ... |
dictionary/ajax_lexeme_slickgrid.py
... | ... | @@ -64,7 +64,7 @@ class LexemeQuery(SlickGridQuery): |
64 | 64 | |
65 | 65 | literal_filter_fields = [ |
66 | 66 | 'entry', 'part_of_speech', 'status', 'comment', 'qualifiers_dor', |
67 | - 'gloss', 'note', 'extended_note', 'pronunciation', 'valence', | |
67 | + 'gloss', 'note', 'extended_note', 'pronunciation', 'valence', 'source', | |
68 | 68 | 'lexemeav__attribute_value_id', |
69 | 69 | 'inflection__pronunciation', |
70 | 70 | 'value', |
... | ... |
dictionary/static/js/lexeme-view.js