<div id="item-list"
     tal:define="
       absolute_url here/absolute_url;
       view_name view/__name__;
       is_trash python: 'trash' in view_name or request.get('is_trash');
       items view/batched_items;
       ws view/workspace;
       ws_view nocall:ws/view;
       here_path_length python:len('/'.join(here.getPhysicalPath()));
       dummy context/@@http-cache-headers;
     "
     i18n:domain="ploneintranet"
>
  <tal:block repeat="item items">
    <label class="${item/cls}"
           title="${item/title}${python:item.get('description') and ' — '}${item/description|nothing}"
           tal:define="
             item_context item/context|nothing;
           "
    >
      <input name="items"
             type="checkbox"
             value="${uid}"
             tal:define="
               uid python: item.get('UID', '');
             "
             tal:condition="uid"
      />
      <a class="pat-inject follow ${python: item.get('dps', None) and 'pat-switch' or ''}"
         id="${python: 'item-%s' % item['UID'] if 'UID' in item else None}"
         href="${item/url}${python:'?is_trash=1' if is_trash else ''}"
         data-pat-inject="${item/dpi|nothing}"
         data-pat-switch="${item/dps|nothing}"
      >
        <img class="thumbnail"
             src="${python:ws_view.get_base_url_for_item(item['context'])}/@@images/image/thumb"
             tal:condition="python:item.get('context') and item.get('content_type', '')=='image'"
        />
        <strong class="title">
                  ${item/title}
          <abbr class="iconified icon-archive"
                tal:condition="item/is_archived|nothing"
                i18n:translate=""
          >(Archived)</abbr>
          <abbr class="iconified icon-trash"
                tal:condition="item_context/trashed|nothing"
                i18n:translate=""
          >(Trashed)</abbr>
        </strong>
        <dfn class="byline"
             tal:condition="item/description"
        >${item/description}</dfn>
        <dfn class="byline"
             tal:condition="item/archived|nothing"
        >
          <em i18n:translate="">(Archived)</em>
        </dfn>
      </a>
      <div class="item-info"
           tal:define="
             trashed item_context/trashed|nothing;
           "
           tal:condition="python: 'group' not in item['cls'] and not trashed"
      >
        <a class="option-trigger icon-ellipsis iconified pat-tooltip"
           href="${python:(item['url'] + '/@@context-menu').replace('/view/@@', '/@@')}#extra-options"
           title="Show options"
           data-pat-tooltip="source: ajax; position-list: lt"
           i18n:attributes="title;"
           i18n:translate=""
        >Options</a>
        <div class="additional-meta-data"
             tal:condition="python: item.get('structural_type', 'group') != 'group'"
        >
          <a class="author meta-column"
             href="${here/portal_url}/author/${item/creator}"
             title="Author of this document"
             tal:condition="item/creator|nothing"
             i18n:attributes="title"
          >${python:ws_view.get_principal_title(item['creator'])}</a>
          <a class="author meta-column"
             tal:condition="not:item/creator"
             i18n:translate=""
          >User not found</a>
          <time class="modification-date meta-column"
                title="Date and time of the latest modification"
                tal:condition="item/modified | nothing"
                i18n:attributes="title"
          >${python:view.date_as_datetime(item['modified']).strftime('%Y-%m-%d %H:%M:%S %z')}</time>
          <nav class="tag-cloud tags meta-column pat-navigation"
               tal:condition="item/subject | nothing"
          >
            <a class="tag pat-inject"
               href="${absolute_url}/@@${view_name}?grouping=label&amp;groupname=${subject}#workspace-documents"
               tal:repeat="subject item/subject"
            >${subject}</a>
          </nav>
        </div>
      </div>
    </label>
  </tal:block>
  <label id="injection-target-items"
         tal:condition="view/next_page_url"
  >
    <a class="pat-inject infinite-scrolling-trigger"
       href="${view/next_page_url}"
       data-pat-inject="source: #item-list; target: #injection-target-items::element; trigger: autoload-visible;"
       i18n:translate=""
    >Load more&hellip;</a>
  </label>
</div>
