<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
	    xmlns:n="http://typo3.org/ns/GeorgRinger/News/ViewHelpers"
	    data-namespace-typo3-fluid="true">
<f:layout name="General" />
<!--
	=====================
		Templates/News/List.html
-->

<f:section name="Header" />

<f:section name="news-item">
  <f:switch expression="{settings.templateLayout}">
    <f:defaultCase>
        <f:if condition="{iterator.isFirst}">
            <f:then>
                <f:render partial="List/Item" arguments="{newsItem: newsItem,settings:settings,iterator:iterator,big:1}" />
            </f:then>
            <f:else>
                <f:render partial="List/Item" arguments="{newsItem: newsItem,settings:settings,iterator:iterator}" />
            </f:else>
        </f:if>
    </f:defaultCase>
  </f:switch>
</f:section>

<f:section name="content">
  <f:if condition="{settings.listPid}">
    <f:then>
      <div class="header">
        <div class="title">
          <h2>{contentObjectData.header}</h2>
        </div>
        <!-- Desktop button -->
        <f:link.page title="Alle Artikel" pageUid="{settings.listPid}" class="btn header-btn">Alle Artikel</f:link.page>
      </div>
    </f:then>
    <f:else>
        <h1><span class="tapered">{contentObjectData.header}</span></h1>
    </f:else>
  </f:if>
	<!--TYPO3SEARCH_end-->
	<f:if condition="{news}">
		<f:then>
      <div class="news-list-view news-list-{settings.templateLayout}" id="news-container-{contentObjectData.uid}">
          <f:if condition="{settings.hidePagination}">
            <f:then>
              <f:for each="{news}" as="newsItem" iteration="iterator">
                  <f:render section="news-item" arguments="{_all}" />
              </f:for>
            </f:then>
            <f:else>
              <f:for each="{pagination.paginator.paginatedItems}" as="newsItem" iteration="iterator">
                  <f:render section="news-item" arguments="{_all}" />
              </f:for>
              <f:if condition="{settings.list.paginate.insertBelow}">
                  <f:render partial="List/Pagination" arguments="{pagination: pagination.pagination, paginator: pagination.paginator}" />
              </f:if>
            </f:else>
          </f:if>
      </div>
      <f:if condition="{settings.listPid}">
        <f:then>
          <!-- Mobile button below the news -->
          <f:link.page title="Alle Artikel" pageUid="{settings.listPid}" class="btn mobile-btn">Alle Artikel</f:link.page>
        </f:then>
      </f:if>
		</f:then>
		<f:else>
			<div class="no-news-found">
				<f:translate key="list_nonewsfound" />
			</div>
		</f:else>
	</f:if>
	<!--TYPO3SEARCH_begin-->
</f:section>
</html>
