aboutsummaryrefslogtreecommitdiff
path: root/util/tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'util/tmpl')
-rw-r--r--util/tmpl/kanji-list.html2
-rw-r--r--util/tmpl/kanji.html22
-rw-r--r--util/tmpl/term-list.html2
-rw-r--r--util/tmpl/term.html32
4 files changed, 33 insertions, 25 deletions
diff --git a/util/tmpl/kanji-list.html b/util/tmpl/kanji-list.html
index 23e4d13f..094441f2 100644
--- a/util/tmpl/kanji-list.html
+++ b/util/tmpl/kanji-list.html
@@ -1,5 +1,5 @@
{{> header.html}}
{{#each defs}}
-{{> kanji.html root=../root}}
+{{> kanji.html root=../root options=../options}}
{{/each}}
{{> footer.html}}
diff --git a/util/tmpl/kanji.html b/util/tmpl/kanji.html
index 7f797c4b..8aab5f18 100644
--- a/util/tmpl/kanji.html
+++ b/util/tmpl/kanji.html
@@ -1,13 +1,17 @@
<div class="kanji-definition">
- <div class="action-icons">
- {{#with addable}}
- {{#if kanji}}
- <a href="#" title="Add Kanji"><img src="{{../root}}/add_kanji.png"></a>
- {{else}}
- <img src="{{../root}}/add_kanji.png" class="inactive">
- {{/if}}
- {{/with}}
- </div>
+ {{#with options}}
+ {{#if enableAnkiConnect}}
+ <div class="action-icons">
+ {{#with ../addable}}
+ {{#if kanji}}
+ <a href="#" title="Add Kanji"><img src="{{../../root}}/add_kanji.png"></a>
+ {{else}}
+ <img src="{{../../root}}/add_kanji.png" class="inactive">
+ {{/if}}
+ {{/with}}
+ </div>
+ {{/if}}
+ {{/with}}
<div class="kanji-glyph">{{character}}</div>
diff --git a/util/tmpl/term-list.html b/util/tmpl/term-list.html
index 9199092c..e4944a2f 100644
--- a/util/tmpl/term-list.html
+++ b/util/tmpl/term-list.html
@@ -1,5 +1,5 @@
{{> header.html}}
{{#each defs}}
-{{> term.html root=../root}}
+{{> term.html root=../root options=../options}}
{{/each}}
{{> footer.html}}
diff --git a/util/tmpl/term.html b/util/tmpl/term.html
index 3d3d4eb0..b1ff1fd8 100644
--- a/util/tmpl/term.html
+++ b/util/tmpl/term.html
@@ -1,19 +1,23 @@
<div class="term-definition">
- <div class="action-icons">
- {{#with addable}}
- {{#if vocabExp}}
- <a href="#" title="Add as expression"><img src="{{../root}}/img/add_expression.png"></a>
- {{else}}
- <img src="{{../root}}/img/add_expression.png" class="inactive">
- {{/if}}
+ {{#with options}}
+ {{#if enableAnkiConnect}}
+ <div class="action-icons">
+ {{#with ../addable}}
+ {{#if vocabExp}}
+ <a href="#" title="Add as expression"><img src="{{../../root}}/img/add_expression.png"></a>
+ {{else}}
+ <img src="{{../../root}}/img/add_expression.png" class="inactive">
+ {{/if}}
- {{#if vocabReading}}
- <a href="#" title="Add as reading"><img src="{{../root}}/img/add_reading.png"></a>
- {{else}}
- <img src="{{../root}}/img/add_reading.png" class="inactive">
- {{/if}}
- {{/with}}
- </div>
+ {{#if vocabReading}}
+ <a href="#" title="Add as reading"><img src="{{../../root}}/img/add_reading.png"></a>
+ {{else}}
+ <img src="{{../../root}}/img/add_reading.png" class="inactive">
+ {{/if}}
+ {{/with}}
+ </div>
+ {{/if}}
+ {{/with}}
{{#if reading}}
<div class="term-expression"><ruby>{{#kanjiLinks}}{{expression}}{{/kanjiLinks}}<rt>{{reading}}</rt></ruby></div>