aboutsummaryrefslogtreecommitdiff
path: root/tmpl
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2016-11-13 18:06:49 -0800
committerAlex Yatskov <alex@foosoft.net>2016-11-13 18:06:49 -0800
commitd95d607c19c0888ca96a693de541e2961bd8f4d9 (patch)
tree4cd90c2fc49327da7a46c2b11efa7096fff986fd /tmpl
parent253da36755f24d656664ca524808e3292eef3697 (diff)
Handle no definitions
Diffstat (limited to 'tmpl')
-rw-r--r--tmpl/kanji-list.html10
-rw-r--r--tmpl/term-list.html10
2 files changed, 14 insertions, 6 deletions
diff --git a/tmpl/kanji-list.html b/tmpl/kanji-list.html
index d418eafd..af38d485 100644
--- a/tmpl/kanji-list.html
+++ b/tmpl/kanji-list.html
@@ -1,5 +1,9 @@
{{> header.html}}
-{{#each definitions}}
-{{> kanji.html addable=../addable root=../root options=../options sequence=../sequence}}
-{{/each}}
+{{#if definitions}}
+ {{#each definitions}}
+ {{> kanji.html addable=../addable root=../root options=../options sequence=../sequence}}
+ {{/each}}
+{{else}}
+ <p>No results found</p>
+{{/if}}
{{> footer.html}}
diff --git a/tmpl/term-list.html b/tmpl/term-list.html
index d0b060c8..2088ac71 100644
--- a/tmpl/term-list.html
+++ b/tmpl/term-list.html
@@ -1,5 +1,9 @@
{{> header.html}}
-{{#each definitions}}
-{{> term.html addable=../addable root=../root options=../options sequence=../sequence}}
-{{/each}}
+{{#if definitions}}
+ {{#each definitions}}
+ {{> term.html addable=../addable root=../root options=../options sequence=../sequence}}
+ {{/each}}
+{{else}}
+ <p>No results found</p>
+{{/if}}
{{> footer.html}}