<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
      xmlns:tal="http://xml.zope.org/namespaces/tal"
      xmlns:metal="http://xml.zope.org/namespaces/metal"
      xmlns:i18n="http://xml.zope.org/namespaces/i18n"
      lang="en"
      metal:use-macro="context/main_template/macros/master"
      i18n:domain="plone">

<body>
    <metal:content-core fill-slot="content-core">
        <metal:block define-macro="content-core"
                     tal:define="kssClassesView context/@@kss_field_decorator_view;
                                 getKssClasses nocall:kssClassesView/getKssClassesInlineEditable;
                                 size context/size;
                                 portal_state context/@@plone_portal_state;
                                 context_state context/@@plone_context_state;
                                 tag python:context.tag(scale='preview');
                                 webformatimage python:context.content_type in ('image/png', 'image/jpeg', 'image/gif');
                                 fullscreenview python:webformatimage and 'image_view_fullscreen' or 'download'">
            <a href=""
	           tal:attributes="href string:${context_state/object_url}/$fullscreenview">
                <tal:block condition="size" replace="structure tag" />
                <br />
            </a>

            <span class="discreet visualNoPrint"
                  tal:define="objectsize python:context.getObjSize(here)">

              <span tal:condition="size"
	                class="discreet">
                <span i18n:translate="label_full_size">Full-size image:</span>

                <span tal:condition="size"
                      tal:content="objectsize">
                    File size
                </span>
				&#124;
	            <a href=""
	               tal:condition="webformatimage"
	               tal:attributes="href string:${context_state/object_url}/$fullscreenview">
	                <span class="visualNoPrint">
                    <img tal:attributes="src string:${portal_state/portal_url}/search_icon.png"
                         alt="View image" title="View image"
                         i18n:attributes="alt title" />
                    <span i18n:translate="">View</span>
                	</span>
	            </a>

	            <a href=""
	               tal:attributes="href string:${context_state/object_url}/download">
	                <span class="visualNoPrint">
                    <img tal:attributes="src string:${portal_state/portal_url}/download_icon.png"
                         alt="Download image" title="Download image"
                         i18n:attributes="alt title" />
                    <span i18n:translate="">Download</span>
                	</span>
	            </a>

		      </span>
              <span tal:condition="not:size"
                    i18n:translate="no_image_uploaded">
                  (No image has been uploaded yet)
              </span>
            </span>
        </metal:block>
    </metal:content-core>
</body>

</html>


