diff options
author | Alex Yatskov <alex@foosoft.net> | 2016-05-03 20:25:35 -0700 |
---|---|---|
committer | Alex Yatskov <alex@foosoft.net> | 2016-05-03 20:25:35 -0700 |
commit | 1e2a249c537ba4b0eb4b07b855511dec20d45c88 (patch) | |
tree | ffb91c4f1282e89e5af09deb8ddf288557c0e75f /util/tmpl | |
parent | 2b3550bd337381ba602df9d89e143e2927df9797 (diff) |
Show action icons
Diffstat (limited to 'util/tmpl')
-rw-r--r-- | util/tmpl/term-list.html | 2 | ||||
-rw-r--r-- | util/tmpl/term.html | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/util/tmpl/term-list.html b/util/tmpl/term-list.html index 6206f323..9199092c 100644 --- a/util/tmpl/term-list.html +++ b/util/tmpl/term-list.html @@ -1,5 +1,5 @@ {{> header.html}} {{#each defs}} -{{> term.html}} +{{> term.html root=../root}} {{/each}} {{> footer.html}} diff --git a/util/tmpl/term.html b/util/tmpl/term.html index 0daf9f49..f31d9da0 100644 --- a/util/tmpl/term.html +++ b/util/tmpl/term.html @@ -1,4 +1,12 @@ <div class="term-definition"> + <div class="action-icons"> + {{#with addable}} + {{#if vocabExp}}<a href="#" title="Add as expression"><img src="{{../root}}/img/icon_add_expression.png"></a>{{/if}} + {{#if vocabReading}}<a href="#" title="Add as reading"><img src="{{../root}}/img/icon_add_reading.png"></a>{{/if}} + {{/with}} + <a href="#" title="Copy definition"><img src="{{root}}/img/icon_copy_definition.png"></a> + </div> + {{#if reading}} <div class="term-expression"><ruby>{{#kanjiLinks}}{{expression}}{{/kanjiLinks}}<rt>{{reading}}</rt></ruby></div> {{else}} |