From 7d93587acb250266782e3788894a9e26ddf1eaa5 Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Wed, 19 Oct 2016 08:52:22 -0700 Subject: Conditionally show add buttons --- tmpl/kanji-list.html | 2 +- tmpl/kanji.html | 8 +++----- tmpl/term-list.html | 2 +- tmpl/term.html | 14 ++++++-------- 4 files changed, 11 insertions(+), 15 deletions(-) (limited to 'tmpl') diff --git a/tmpl/kanji-list.html b/tmpl/kanji-list.html index 34349862..d418eafd 100644 --- a/tmpl/kanji-list.html +++ b/tmpl/kanji-list.html @@ -1,5 +1,5 @@ {{> header.html}} {{#each definitions}} -{{> kanji.html root=../root options=../options sequence=../sequence}} +{{> kanji.html addable=../addable root=../root options=../options sequence=../sequence}} {{/each}} {{> footer.html}} diff --git a/tmpl/kanji.html b/tmpl/kanji.html index 0a0cfe11..daa825be 100644 --- a/tmpl/kanji.html +++ b/tmpl/kanji.html @@ -1,11 +1,9 @@
- {{#with options}} -
- {{#if enableAnkiConnect}} - +
+ {{#if addable}} + {{/if}}
- {{/with}}
{{character}}
diff --git a/tmpl/term-list.html b/tmpl/term-list.html index 615534f6..d0b060c8 100644 --- a/tmpl/term-list.html +++ b/tmpl/term-list.html @@ -1,5 +1,5 @@ {{> header.html}} {{#each definitions}} -{{> term.html root=../root options=../options sequence=../sequence}} +{{> term.html addable=../addable root=../root options=../options sequence=../sequence}} {{/each}} {{> footer.html}} diff --git a/tmpl/term.html b/tmpl/term.html index aff3e2ff..7d60e42a 100644 --- a/tmpl/term.html +++ b/tmpl/term.html @@ -1,15 +1,13 @@
- {{#with options}} -
- {{#if enableAudioPlayback}} - +
+ {{#if options.enableAudioPlayback}} + {{/if}} - {{#if enableAnkiConnect}} - - + {{#if addable}} + + {{/if}}
- {{/with}} {{#if reading}}
{{#kanjiLinks}}{{expression}}{{/kanjiLinks}}{{reading}}
-- cgit v1.2.3