summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2012-09-24 20:47:06 +0200
committerJon Bergli Heier <snakebite@jvnv.net>2012-09-24 20:47:06 +0200
commit7aa6f36e6df3fed026e7a802c79bd945bce9a8c4 (patch)
tree43aaee7790ebb2d4a6d12d55362821448d754f7d /templates
parent9c915bab172a4d5a2d9aed056c9261cd7b0cbd60 (diff)
Show a placeholder image when no thumbnail could be fetched or generated.
Diffstat (limited to 'templates')
-rw-r--r--templates/images.tmpl9
1 files changed, 9 insertions, 0 deletions
diff --git a/templates/images.tmpl b/templates/images.tmpl
index 4cd3752..1dcfc46 100644
--- a/templates/images.tmpl
+++ b/templates/images.tmpl
@@ -1,6 +1,15 @@
#def title: images
#def header: images
#extends templates.base
+#def head
+<script type="text/javascript">
+ function thumb_onerror(img) {
+ var no_thumb = '${root}s/no-thumbnail.png';
+ if(img.src != no_thumb)
+ img.src = no_thumb;
+ }
+</script>
+#end def
#def content
<p>You have $len($files) uploaded images totaling $total_size.</p>
<ul class="image-list">