<html xmlns:tal="http://xml.zope.org/namespaces/tal"
      xmlns:metal="http://xml.zope.org/namespaces/metal"
      i18n:domain="senaite.core">

<body>

<div metal:define-macro="portlet"
     tal:define="portal_state context/@@plone_portal_state;
                 portal_url portal_state/portal_url;
                 anonymous portal_state/anonymous;
                 plone_view context/@@plone;"
     tal:condition="python: not anonymous">

    <div class="portlet" id="portlet-accreditation"
        tal:condition="python:context.bika_setup.laboratory.LaboratoryAccredited"
        tal:define="logo python:context.bika_setup.laboratory.getAccreditationBodyLogo()">
        <a href="#"
            tal:attributes="href string:${context/portal_url}/accreditation">
        <img
            tal:condition="logo"
            tal:attributes="src string:${context/portal_url}/bika_setup/laboratory/AccreditationBodyLogo"/>
        <img
            tal:condition="not: logo"
            tal:attributes="src string:${context/portal_url}/++resource++bika.lims.images/AccreditationBodyLogo.png"/>
        </a>
    </div>

</div>

</body>

</html>
