<div id="share-panel"
     i18n:domain="ploneintranet"
>
  <ul class="menu"
      id="share-panel-menu"
      tal:define="
        content_type_name view/content_type_name;
        pdf_view nocall:here/@@pdf;
        has_pdf python:pdf_view.has_pdf();
        timestamp python: pdf_view.timestamp;
      "
  >
    <li tal:condition="view/can_share_download">
      <a class="${view/icon_class} close-panel"
         href="${context/absolute_url}/download?t=${timestamp}"
      ><tal:label i18n:translate="">Download as</tal:label>
        <tal:type replace="content_type_name" />
      </a>
    </li>
    <li tal:condition="view/can_share_pdf">
      <a class="icon-file-pdf close-panel"
         href="${context/absolute_url}/@@pdf?t=${timestamp}"
      ><tal:label i18n:translate="">Download as</tal:label>
        PDF
      </a>
    </li>
    <li tal:condition="view/can_share_print">
      <a class="icon-print"
         href="${view/print_url}"
         target="printframe"
         i18n:translate=""
      >Print</a>
      <iframe name="printframe"
              onload="try {this.contentWindow.document.URL == 'about:blank' || this.contentWindow.print()} catch(error) { this.contentWindow.print();}"
              style="display: None"
      ></iframe>
    </li>
    <li tal:condition="view/can_publish_widely">
      <a class="icon-feather pat-modal close-panel"
         href="${context/absolute_url}/panel-publish-to-library#document-content"
         data-pat-modal="class: panel medium"
         i18n:translate=""
      >Publish to library</a>
    </li>
  </ul>
</div>
