<!-- SENAITE customized base.pt

   - Hide the folderlisting macro to avoid the "This folder contains no items" message
   - Use HTML table structure to render the widgets

-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
      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"
      metal:use-macro="context/main_template/macros/master">

  <head><title></title></head>

  <body>

    <metal:content-core metal:fill-slot="content-core">

      <metal:body_macro metal:define-macro="body">

        <table class="table table-hover table-sm my-3 table-borderless">
          <colgroup>
            <col />
            <col style="width:100%" />
          </colgroup>
          <tr tal:define="field_macro field_macro | context/senaite_widgets/field/macros/view"
              tal:repeat="field python:context.Schema().filterFields(isMetadata=0)">

            <tal:if_visible define="purl nocall:context/portal_url;
                                    portal purl/getPortalObject;
                                    mode string:view;
                                    visState python:field.widget.isVisible(here, mode);
                                    visCondition python:field.widget.testCondition(None, portal, context);"
                            condition="python:visState == 'visible' and visCondition">
              <metal:use_field use-macro="field_macro" />
            </tal:if_visible>
          </tr>
        </table>
      </metal:body_macro>

      <metal:folderlisting_macro metal:define-macro="folderlisting"
                                 tal:define="fl_macro context/folder_listing/macros/listing | nothing;
                                                     folderish context/isPrincipiaFolderish | nothing;">
        <tal:if_folderlisting condition="python:False and folderish and fl_macro">
          <!-- hide the folderlisting macro -->
          <!-- <metal:use_macro use-macro="context/folder_listing/macros/listing|nothing" /> -->
        </tal:if_folderlisting>
      </metal:folderlisting_macro>

    </metal:content-core>

  </body>

</html>
