Permalink
Browse files

Graceful handling of non images

  • Loading branch information...
1 parent b307021 commit ce1bbafa4e30a45e577f4049bfcd74bef7e43a57 @do3cc do3cc committed Mar 27, 2012
Showing with 5 additions and 3 deletions.
  1. +5 −3 plone/app/contenttypes/skins/templates/image_view.pt
@@ -12,9 +12,11 @@
tal:define="size context/image/getSize">
<a class="discreet"
- tal:attributes="href string:${context/@@plone_context_state/object_url}/image_view_fullscreen">
- <img tal:define="scale context/@@images"
- tal:replace="structure python: scale.scale('image', scale='preview').tag()" />
+ tal:attributes="href string:${context/@@plone_context_state/object_url}/image_view_fullscreen"
+ tal:define="scale context/@@images;
+ img_tag python:scale.scale('image', scale='preview').tag()"
+ tal:on-error="string: Image cannot be displayed">
+ <img tal:replace="structure img_tag" />
<br />
<span class="visualNoPrint">
<img src="" alt="" tal:replace="structure context/search_icon.png" />

0 comments on commit ce1bbaf

Please sign in to comment.