<div class="photoAlbumEntry eea-sparql-item">
  <a tal:define="
      description context/Description|string:;
      title context/pretty_title_or_id|string:;
      desc_or_title python:description or title;
      url context/absolute_url|string:#;
      image_thumb exists:context/image_thumb;
      image_tag python:getattr(context, 'tag', None)"
    tal:attributes="href url; title description">

    <span class="photoAlbumEntryWrapper" tal:condition="image_thumb">
      <img style="border: none" tal:attributes="
        title desc_or_title;
        alt title;
        src string:$url/image_thumb"/>
    </span>

    <span class="photoAlbumEntryWrapper" tal:condition="python:not image_thumb and image_tag">
      <img tal:replace="structure python:image_tag(scale='thumb', title=description)" />
    </span>
    <div class="preview ui-icon ui-icon-search" title="Preview"
         i18n:attributes="title" i18n:translate="">Preview</div>
    <script tal:define='jq_sparql_url string:"${url}"'
        tal:content="string:
        jQuery('a[href=${jq_sparql_url}]').EEASparqlPreview();
    "></script>

    <span class="photoAlbumEntryTitle" tal:content="context/pretty_title_or_id|string:">Title</span>
    <span class="photoAlbumEntryDescription" tal:content="description">Description</span>

  </a>
</div>
