<f:layout name="Default"/>

<f:section name="main">
    <div class="tt_address_list">
        <f:render section="displayMode_{settings.displayMode}" arguments="{_all}" />
    </div>
</f:section>

<f:section name="displayMode_list">
    <!--TYPO3SEARCH_end-->
    <f:if condition="{settings.hidePagination}">
        <f:then>
            <f:for each="{addresses}" as="address" iteration="iterator">
                <f:render partial="ListItem" section="detailed" arguments="{_all}"/>
            </f:for>
        </f:then>
        <f:else>
            <f:if condition="{newPagination}">
                <f:then>
                    <f:if condition="{settings.paginate.insertAbove}">
                        <f:render partial="Pagination" arguments="{pagination: pagination.pagination, pages: pagination.pages, paginator: pagination.paginator}" />
                    </f:if>
                    <f:for each="{pagination.paginator.paginatedItems}" as="address" iteration="iterator">
                        <f:render partial="ListItem" section="detailed" arguments="{_all}"/>
                    </f:for>
                    <f:if condition="{settings.paginate.insertBelow}">
                        <f:render partial="Pagination" arguments="{pagination: pagination.pagination, pages: pagination.pages, paginator: pagination.paginator}" />
                    </f:if>
                </f:then>
                <f:else>
                    <f:render partial="ListWithOldPagination" arguments="{_all}" />
                </f:else>
            </f:if>
        </f:else>
    </f:if>
    <!--TYPO3SEARCH_begin-->
</f:section>

<f:section name="displayMode_single">
    <f:for each="{addresses}" as="address">
        <f:render partial="Full" arguments="{_all}"/>
    </f:for>
</f:section>

<f:section name="displayMode_map">
    <f:render partial="Maps" section="{settings.map.rendering}" arguments="{_all}"/>
</f:section>

<f:section name="displayMode_shortlist">
    <table class="table ce-table ce-table--adress">
        <tbody>
    <f:if condition="{settings.hidePagination}">
        <f:then>
            <f:for each="{addresses}" as="address" iteration="iterator">
                <f:render partial="ListItem" section="shortInfo" arguments="{_all}"/>
            </f:for>
        </f:then>
        <f:else>
            <f:if condition="{newPagination}">
                <f:then>
                    <f:if condition="{settings.paginate.insertAbove}">
                        <f:render partial="Pagination" arguments="{pagination: pagination.pagination, pages: pagination.pages, paginator: pagination.paginator}" />
                    </f:if>
                    <f:for each="{pagination.paginator.paginatedItems}" as="address" iteration="iterator">
                        <f:render partial="ListItem" section="shortInfo" arguments="{_all}"/>
                    </f:for>
                    <f:if condition="{settings.paginate.insertBelow}">
                        <f:render partial="Pagination" arguments="{pagination: pagination.pagination, pages: pagination.pages, paginator: pagination.paginator}" />
                    </f:if>
                </f:then>
                <f:else>
                    <f:render partial="ListWithOldPagination" arguments="{_all}" />
                </f:else>
            </f:if>
        </f:else>
    </f:if>
        </tbody>
    </table>

</f:section>


<f:section name="displayMode_detailsimple">
    <f:for each="{addresses}" as="address">
        <f:render partial="Simple" arguments="{_all}"/>
    </f:for>
</f:section>
