<div class="d3pipes_block_sync">

	<{if $block.errors}>
		<{foreach from=$block.errors item="error"}>
			<div class="errorMsg"><{$error|escape|nl2br}></div>
		<{/foreach}>
	<{/if}>

	<{if $block.pipes_entries}>
		<{* SEPARATED VIEW *}>
		<{foreach from=$block.pipes_entries item="pipe"}>

			<div class="d3pipes_block_sync_separated">
				<{$pipe.name}>
				<{if $pipe.image && $pipe.url}>
					<a href="<{$pipe.url}>"><img src="<{$pipe.image}>" alt="<{$pipe.name}>" /></a>
				<{/if}>
				<ul class="d3pipes_block_sync_separated">
					<{foreach from=$pipe.entries item="entry"}>

						<{if $entry.allow_html}>
							<{assign var="entry_headline4disp" value=$entry.headline}>
						<{else}>
							<{assign var="entry_headline4disp" value=$entry.headline|escape}>
						<{/if}>

						<li>
							<{$smarty.const._MEDIUMDATESTRING|date:$entry.pubtime+$timezone_offset|xugj_date}>
							<{if $entry.clipping_id && $block.link2clipping}>
								<a href="<{$block.mod_url}>/index.php?page=clipping&amp;clipping_id=<{$entry.clipping_id}>"><{$entry_headline4disp}></a>
							<{else}>
								<a href="<{$entry.link|escape}>"><{$entry_headline4disp}></a>
							<{/if}>
						</li>
					<{/foreach}>
				</ul>
			</div>
		<{/foreach}>
	<{else}>
		<{* AGGREGATED VIEW *}>
		<ul class="d3pipes_block_sync_aggregated">
			<{foreach from=$block.entries item="entry"}>

				<{if $entry.allow_html}>
					<{assign var="entry_headline4disp" value=$entry.headline}>
				<{else}>
					<{assign var="entry_headline4disp" value=$entry.headline|escape}>
				<{/if}>

				<li>
				<dl>
					<dt>
					<{if $entry.clipping_id && $block.link2clipping}>
						<a href="<{$block.mod_url}>/index.php?page=clipping&amp;clipping_id=<{$entry.clipping_id}>"><{$entry_headline4disp}></a>
					<{else}>
						<a href="<{$entry.link|escape}>"><{$entry_headline4disp}></a>
					<{/if}>
					</dt>

					<dd>
					<{$smarty.const._MEDIUMDATESTRING|date:$entry.pubtime+$timezone_offset|xugj_date}>
					<{if $entry.pipe.name}>
						(<{$entry.pipe.name}>)
					<{/if}>
					</dd>

				</dl>

				</li>
			<{/foreach}>
		</ul>
	<{/if}>

</div>
