{namespace n=Tx_News_ViewHelpers}
<f:layout name="General" />
<!--
	=====================
		Templates/News/List.html
-->

<f:section name="content">
	<f:if condition="{news}">
		<f:then>
			<f:if condition="{settings.templateLayout} == 100">
				
				<!-- Archivio notizie -->
				<f:then>
					<ul class="base_list news_list">
						<f:if condition="{settings.hidePagination}">
							<f:then>
								<f:for each="{news}" as="newsItem" iteration="iterator">
									<f:render partial="List/Item" arguments="{newsItem: newsItem,settings:settings,iterator:iterator}" />
								</f:for>
							</f:then>
							<f:else>
								<n:widget.paginate objects="{news}" as="paginatedNews" configuration="{settings.list.paginate}" initial="{offset:settings.offset,limit:settings.limit}">
									<f:for each="{paginatedNews}" as="newsItem" iteration="iterator">
										<f:render partial="List/Item" arguments="{newsItem: newsItem,settings:settings,iterator:iterator}" />
									</f:for>
								</n:widget.paginate>
							</f:else>
						</f:if>
					</ul>
				</f:then>
				<!-- [FINE] Archivio notizie -->
				
				<!-- Lista ultime notizie -->
				<f:else>					
					<div class="four columns content omega">
						<div class="widget">
							<h3 class="t_line">Notizie</h3>
							<ol class="base_list icon_list">
								<f:if condition="{settings.hidePagination}">
									<f:then>
										<f:for each="{news}" as="newsItem" iteration="iterator">
											<f:render partial="List/Item" arguments="{newsItem: newsItem,settings:settings,iterator:iterator}" />
											<f:if condition="{iterator.isLast}">
												<f:then>
													<li>
														<br><i class="fa fa-archive"></i>
														<f:link.action pageUid="{settings.listPid}">Archivio notizie</f:link.action>
													</li>
												</f:then>
												<f:else></f:else>
											</f:if>
										</f:for>
									</f:then>
									<f:else>
										<n:widget.paginate objects="{news}" as="paginatedNews" configuration="{settings.list.paginate}" initial="{offset:settings.offset,limit:settings.limit}">
											<f:for each="{paginatedNews}" as="newsItem" iteration="iterator">
												<f:render partial="List/Item" arguments="{newsItem: newsItem,settings:settings,iterator:iterator}" />
												<f:if condition="{iterator.isLast}">
													<f:then>
														<li>
															<br><i class="fa fa-archive"></i>
															<f:link.action pageUid="{settings.listPid}">Archivio notizie</f:link.action>
														</li>
													</f:then>
													<f:else></f:else>
												</f:if>
											</f:for>
										</n:widget.paginate>
									</f:else>
								</f:if>
							</ol>
						</div>
					</div>
				</f:else>
				<!-- [FINE] Lista ultime notizie -->
				
			</f:if>
		</f:then>
		<f:else>
			<div class="no-news-found">
				<f:translate key="list_nonewsfound" />
			</div>
		</f:else>
	</f:if>
</f:section>
