diff options
Diffstat (limited to 'ext/data/templates/default-anki-field-templates.handlebars')
-rw-r--r-- | ext/data/templates/default-anki-field-templates.handlebars | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/ext/data/templates/default-anki-field-templates.handlebars b/ext/data/templates/default-anki-field-templates.handlebars index 3ca7ba18..3f20f8ee 100644 --- a/ext/data/templates/default-anki-field-templates.handlebars +++ b/ext/data/templates/default-anki-field-templates.handlebars @@ -101,12 +101,26 @@ <div style="text-align: left;"> {{~#scope~}} {{~#if (op "===" definition.type "term")~}} - {{~> glossary-single definition brief=brief noDictionaryTag=noDictionaryTag ~}} + {{~#unless (op "&&" selectedDictionary (op "!=" selectedDictionary definition.dictionary))~}} + {{~> glossary-single definition brief=brief noDictionaryTag=noDictionaryTag ~}} + {{~/unless~}} {{~else if (op "||" (op "===" definition.type "termGrouped") (op "===" definition.type "termMerged"))~}} {{~#if (op ">" definition.definitions.length 1)~}} - <ol>{{~#each definition.definitions~}}<li>{{~> glossary-single . brief=../brief noDictionaryTag=../noDictionaryTag ~}}</li>{{~/each~}}</ol> + <ol> + {{~#each definition.definitions~}} + {{~#unless (op "&&" ../selectedDictionary (op "!=" ../selectedDictionary dictionary))~}} + <li> + {{~> glossary-single . brief=../brief noDictionaryTag=../noDictionaryTag ~}} + </li> + {{~/unless~}} + {{~/each~}} + </ol> {{~else~}} - {{~#each definition.definitions~}}{{~> glossary-single . brief=../brief noDictionaryTag=../noDictionaryTag ~}}{{~/each~}} + {{~#each definition.definitions~}} + {{~#unless (op "&&" ../selectedDictionary (op "!=" ../selectedDictionary dictionary))~}} + {{~> glossary-single . brief=../brief noDictionaryTag=../noDictionaryTag ~}} + {{~/unless~}} + {{~/each~}} {{~/if~}} {{~else if (op "===" definition.type "kanji")~}} {{~#if (op ">" definition.glossary.length 1)~}} |