summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/tmpl/kanji.html8
-rw-r--r--util/tmpl/term.html15
2 files changed, 5 insertions, 18 deletions
diff --git a/util/tmpl/kanji.html b/util/tmpl/kanji.html
index d30499ea..55cf6b2e 100644
--- a/util/tmpl/kanji.html
+++ b/util/tmpl/kanji.html
@@ -1,13 +1,9 @@
<div class="kanji-definition">
{{#with options}}
{{#if enableAnkiConnect}}
- <div class="action-icons">
+ <div class="action-bar">
{{#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}}
+ <a href="#" title="Add Kanji" class="{{#unless kanji}}disabled{{/unless}}"><img src="{{../../root}}/add_kanji.png"></a>
{{/with}}
</div>
{{/if}}
diff --git a/util/tmpl/term.html b/util/tmpl/term.html
index e1ed005e..7d0d75d1 100644
--- a/util/tmpl/term.html
+++ b/util/tmpl/term.html
@@ -3,19 +3,10 @@
{{#with options}}
{{#if enableAnkiConnect}}
- <div class="action-icons">
+ <div class="action-bar">
{{#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}}
+ <a href="#" title="Add as expression" class="{{#unless vocabExp}}disabled{{/unless}}"><img src="{{../../root}}/img/add_expression.png"></a>
+ <a href="#" title="Add as reading" class="{{#unless vocabExp}}disabled{{/unless}}"><img src="{{../../root}}/img/add_reading.png"></a>
{{/with}}
</div>
{{/if}}