{{function page_tree aPageTree=[] bMenu=true}}{{if $bMenu && isset($aPageTree.sMenu)}}{{$aPageTree.sMenu}}&nbsp;&raquo;&nbsp;{{/if}}{{foreach from=$aPageTree.aPath item=aPage}}{{$aPage.sName}}&nbsp;&raquo;&nbsp;{{/foreach}}{{/function}}
<table class="list">
	<thead>
		<tr>
			<th class="id" rowspan="2">{{$lang.smartoffer_id}}</th>
			<th class="name" colspan="2" rowspan="2">{{$lang.smartoffer_name}}</th>
			<th class="date">{{$lang.smartoffer_time}}</th>
			<th class="date">{{$lang.smartoffer_time_ago}}</th>
		</tr>
		<tr>
			<th class="smartoffer">{{$lang.smartoffer_price}}<br/>{{$lang.smartoffer_current}}</th>
			<th class="smartoffer">{{$lang.smartoffer_avail}}<br/>{{$lang.smartoffer_current}}</th>
		</tr>
	</thead>
	{{foreach from=$aSmartoffer.aSearch item=SOaPage}}
		<tr>
			<td class="name" colspan="3">
				{{if !empty( $SOaPage.aSearch.sPhrase )}}{{$lang.smartoffer_phrase}}: <strong>{{$SOaPage.aSearch.sPhrase}}</strong> {{if $SOaPage.aSearch.iFullSearch}}({{$lang.smartoffer_search_full}}){{/if}}{{/if}}
				{{if !empty( $SOaPage.aSearch.sProducer )}}{{$lang.smartoffer_producer}}: <strong>{{$SOaPage.aSearch.sProducer}}</strong>{{/if}}
				{{if !empty( $SOaPage.aSearch.sPriceFrom )}}{{$lang.smartoffer_price_from}}: <strong>{{$SOaPage.aSearch.sPriceFrom}}</strong>{{/if}}
				{{if !empty( $SOaPage.aSearch.sPriceTo )}}{{$lang.smartoffer_price_to}}: <strong>{{$SOaPage.aSearch.sPriceTo}}</strong>{{/if}}
				{{if !empty( $SOaPage.aSearch.sCatalogNumber )}}{{$lang.smartoffer_catalog_number}}: <strong>{{$SOaPage.aSearch.sCatalogNumber}}</strong>{{/if}}
				{{if !empty( $SOaPage.aSearch.sProductIndex )}}{{$lang.smartoffer_product_index}}: <strong>{{$SOaPage.aSearch.sProductIndex}}</strong>{{/if}}
				{{if !empty( $SOaPage.aSearch.asAttributeValue )}}{{foreach from=$SOaPage.aSearch.asAttributeValue key=sAttribute item=sValue}}{{$sAttribute}}: <strong>{{$sValue}}</strong> {{/foreach}}{{/if}}
				{{if !empty( $SOaPage.aSearch.aCategory )}}{{$lang.smartoffer_category}}: {{page_tree aPageTree=$SOaPage.aSearch.aCategory.aPageTree}}<strong>{{$SOaPage.aSearch.aCategory.sName}}</strong>{{/if}}
			</td>
			<td class="date">{{date( 'Y-m-d H:i:s', $SOaPage.iTime )}}</td>
			<td class="date">{{$SOaPage.sTimeDifference}}</td>
		</tr>
		{{foreach from=$SOaPage.aProducts.aList item=SOaProduct}}
			<tr class="product {{if $SOaProduct.iTime > $SOaPage.iTime}}new{{/if}} {{if in_array( $SOaProduct.iProduct, $aSmartoffer.aProductsIds )}}visited{{/if}}">
				<td class="id">{{$SOaProduct.iProduct}}</td>
				<td class="photo">{{if !empty( $SOaProduct.aDataImage )}}<a class="photo" href="{{$config.dir_files}}{{$SOaProduct.aDataImage.sFileName}}"><img src="{{$config.dir_files}}30/{{$SOaProduct.aDataImage.sFileName}}" alt="(f)" /></a>{{/if}}</td>
				<td class="name">{{$SOaProduct.sName}}</td>
				<td class="price">{{$SOaProduct.sPrice}}</td>
				<td class="available smartoffer">{{$aSmartoffer.aAvailabilities[$SOaProduct.TiAvailable]}}</td>
			</tr>
		{{/foreach}}
	{{/foreach}}
	<tr class="legend"><td colspan="5">{{$lang.smartoffer_legend}}</td></tr>
	<tr class="legend"><td colspan="5"><div></div>{{$lang.smartoffer_legend_search_white}}</td></tr>
	<tr class="legend visited"><td colspan="5"><div></div>{{$lang.smartoffer_legend_search_green}}</td></tr>
	<tr class="legend new"><td colspan="5"><div></div>{{$lang.smartoffer_legend_search_red}}</td></tr>
</table>