<html
   xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
   xmlns:core="http://typo3.org/ns/TYPO3/CMS/Core/ViewHelpers"
   xmlns:be="http://typo3.org/ns/TYPO3/CMS/Backend/ViewHelpers"
   xmlns:pagemanager="http://typo3.org/ns/Meramo/Pagemanager/ViewHelpers"
   data-namespace-typo3-fluid="true">

   <f:layout name="Default" />

   <f:section name="Content">
    <h1>Liste demächst auslaufender Beiträge</h1>

    <f:flashMessages />

    <table class="tx_pagemanager table table-striped table-hover">
        <tr>
          <th><f:translate key="pagemanager.starttime" /></th>
          <th><f:translate key="pagemanager.endtime" /></th>
          <th><f:translate key="pagemanager.category" /></th>
          <th><f:translate key="pagemanager.title" /></th>
          <th><f:translate key="pagemanager.roof" /></th>
          <th><f:translate key="pagemanager.backend-user" /></th>
          <th><f:translate key="pagemanager.fullname" /></th>
          <th><f:translate key="pagemanager.action" /></th>
        </tr>
        <f:if condition="{paginator.paginatedItems}">
          <f:then>
            <f:for each="{paginator.paginatedItems}" as="activePage" iteration="iterator">
              <tr>
                  <td>
                    <f:format.date format="d.m.Y">{activePage.starttime}</f:format.date>
                  </td>
                  <td class="{pagemanager:cssBackground(endtime: '{activePage.endtime}')}">
                    <f:format.date format="d.m.Y">{activePage.endtime}</f:format.date>
                  </td>
                  <td>{activePage.category}</td>
                  <td>{activePage.title}</td>
                  <td>{activePage.roof}</td>
                  <td>{activePage.creator}</td>
                  <td>{activePage.fullName}</td>
                  <td>
                    <be:link.editRecord uid="{activePage.uid}" table="pages" returnUrl="">
                    <core:icon identifier="actions-document-open" />
                    </be:link.editRecord>
                  </td>
              </tr>
            </f:for>
          </f:then>
          <f:else>Kein Daten Gefunden</f:else>
        </f:if>
    </table>
    <!-- Render your paging -->
    <f:render partial="Paging.html" arguments="{totalrecords: totalRecords, cpage: cPage, paging: paging, pages: pages, paginator: paginator, actionName: actionName}" />

</f:section>

</html>
