<!-- content_box_item_list -->
{if isset($producerSelection) && $producerSelection}
	{assign var=link_attributes value="producerId=`$producerSelection`"}
	{assign var=list_title value=$shopProducers[$producerSelection]}
{else}
	{*{assign var=link_attributes value="wg=`$shopCurrentArticleGroup`"}*}
	{*{assign var=list_title value=$shopView.currentCommGroupName}*}
{/if}

{if $system_configuration.item_image_server_uri}
	{assign var=SHOP_DIR value="{$system_configuration.item_image_server_uri}"}		
{/if}

<div class="content_box_item_list">

	<div class="title_wrapper">
		<div class="title"><{$block->style}>{if isset($content_box_title) && $content_box_title}{$content_box_title}{else}{$structureData->name}{/if}</{$block->style}></div>
			
			<!-- sort list -->
			<div class="sort_wrapper">
				<div class="title">Sortiere nach</div>
				<div class="sort_selection">
					<div class="menu_arrow"></div>
					<div class="selected_name">
							{if $sort_by == 'name_up' || $sort_by == 'name_down'}Bezeichnung<input type="hidden" id="sort_selection_item" name="sort_selection_item" value="name" />{/if}
							{if $sort_by == 'number_up' || $sort_by == 'number_down'}Artikelnummer<input type="hidden" id="sort_selection_item" name="sort_selection_item" value="number" />{/if}
							{if $sort_by == 'manufacturer_up' || $sort_by == 'manufacturer_down'}Hersteller<input type="hidden" id="sort_selection_item" name="sort_selection_item" value="manufacturer" />{/if}
							{if $sort_by == 'price_up' || $sort_by == 'price_down'}Preis<input type="hidden" id="sort_selection_item" name="sort_selection_item" value="price" />{/if}
					</div>
					<div class="menu_field">
						<div style="position:absolute;left:110px;top:27px;height:1px;width:28px;background:#ffffff;z-index:100;"></div>
						<div class="category_menu">
							<ul>
								<li><a class="sort_item" rel="name" href="{$currentSURI}">Bezeichnung</a></li>
								<li><a class="sort_item" rel="number" href="{$currentSURI}">Artikelnummer</a></li>
								<li><a class="sort_item" rel="manufacturer" href="{$currentSURI}">Hersteller</a></li>
								<li><a class="sort_item" rel="price" href="{$currentSURI}">Preis</a></li>
							</ul>
						</div>
					</div>
				</div>
				<div class="sort_direction_up {if $sort_by == 'name_up' || $sort_by == 'number_up' || $sort_by == 'manufacturer_up' || $sort_by == 'price_up'}sort_up_active{/if}"></div>
				<div class="sort_direction_down {if $sort_by == 'name_down' || $sort_by == 'number_down' || $sort_by == 'manufacturer_down' || $sort_by == 'price_down'}sort_down_active{/if}"></div>
			</div>
			
			<!-- liste style -->
			<div class="item_list_style_wrapper">
				<div class="title">Darstellung</div>
				<div class="style_selection">
					
						<div class="menu_arrow"></div>
						<div class="selected_name">
								{if $listStyleType == 1}<a href="#" rel="1" class="list_style_button activ1"></a>{/if}
								{if $listStyleType == 2}<a href="#" rel="2" class="list_style_button activ2"></a>{/if}
								{if $listStyleType == 3}<a href="#" rel="3" class="list_style_button activ3"></a>{/if}
						</div>
				<div class="menu_field">
					<div style="position:absolute;left:60px;top:27px;height:1px;width:28px;background:#ffffff;z-index:100;"></div>
						<div class="category_menu">
							<ul>
								<li><a href="#" rel="1" class="list_style_button {if $listStyleType == 1}activ1{else}inactiv1{/if}"></a></li>
								<li><a href="#" rel="2" class="list_style_button {if $listStyleType == 2}activ2{else}inactiv2{/if}"></a></li>
								<li><a href="#" rel="3" class="list_style_button {if $listStyleType == 3}activ3{else}inactiv3{/if}"></a></li>
							</ul>
						</div>
					</div>
				</div>
			</div>
			<form id="listStyleForm" method="post">
				<input type="hidden" name="listStyleSelector"  value="" id="listStyleSelector">
			</form>
	
			<!-- item shown -->
			<div class="list_item_shown_wrapper">
				<div class="title">Artikel je Seite</div>
				<div class="item_shown_selection">
					
						<div class="menu_arrow"></div>
						<div class="selected_name">
								{if $itemsPerPage == 24}24{/if}
								{if $itemsPerPage == 48}48{/if}
								{if $itemsPerPage == 9999}alle{/if}
						</div>
				<div class="menu_field">
					<div style="position:absolute;left:60px;top:27px;height:1px;width:28px;background:#ffffff;z-index:100;"></div>
						<div class="category_menu">
							<ul>
								<li><a class="pagingButton {if $itemsPerPage == 9999}activ{/if}" rel="9999" href="#">alle</a></li>
								<li><a href="#" class="pagingButton {if $itemsPerPage == 24}activ{/if}" rel="24">24</a></li>
								<li><a class="pagingButton {if $itemsPerPage == 48}activ{/if}" rel="48" href="#">48</a></li>
							</ul>
						</div>
					</div>
				</div>
			</div>
			<form id="pagingSelectorForm" method="post"">
					<input type="hidden" name="pagingSelector"  value="" id="pagingSelector">
			</form>
			
				
			{if $shopArticles}
			<!-- pagination -->
			{if isset($found_pages) && $found_pages > 1}
			<div class="pagination">
				{if $found_showing_page > 1}
					<a rel="{$found_showing_page-1}" class="pagination_button" href="#">&laquo;</a>
				{else}
					<a class="inactive">&laquo;</a>
				{/if}
		
				{section name=pageloop start=1 loop=$found_pages+1}
					{if ($found_showing_page >= $smarty.section.pageloop.index - 6 && $found_showing_page <= $smarty.section.pageloop.index + 6) || $smarty.section.pageloop.index < 7 || $smarty.section.pageloop.index > $found_pages - 6}
						<a rel="{$smarty.section.pageloop.index}" href="#" class="pagination_button {if $found_showing_page == $smarty.section.pageloop.index}highlight{/if}">{$smarty.section.pageloop.index}</a>
					{elseif $smarty.section.pageloop.index == 7 || $smarty.section.pageloop.index == $found_pages - 7}
						<span>[...]</span>
					{/if}
				{/section}
		
				{if $found_showing_page < $found_pages}
					<a rel="{$found_showing_page+1}" class="pagination_button" href="#">&raquo;</a>
				{else}
					<a class="inactive">&raquo;</a>
				{/if}	
				<form id="paginationForm" method="post">
				<input type="hidden" name="page"  value="" id="paginationSeite">
				</form>
			</div>
			
		{/if}
		
		
		{/if}		
	</div>
	
	{if $shopArticles}
	<div class="box_content">
			{foreach name=ArticleList item=shopArticle from=$shopArticles}
				{if $shopArticle->short_uri}
					{if $currentSURI == '/index.php'}
						{assign var=itemSuri value="/`$shopArticle->short_uri`.html"}
					{else}
						{assign var=itemSuri value="`$currentSURI``$shopArticle->short_uri`.html"}
					{/if}
				{else}
					{assign var=itemSuri value="/index.php?item_id=`$shopArticle->id`"}
				{/if}
				
				{if isset($listStyleType) && $listStyleType == 3}
					{include file='content_item_list/item_box_3.tpl'}
				{else if isset($listStyleType) && $listStyleType == 2}
					{include file='content_item_list/item_box_2.tpl'}
				{else}
					{include file='content_item_list/item_box_1.tpl'}
				{/if}
			{/foreach}

			<div style="clear:both;"></div>
	</div>
	
	<br />
	
		<div class="title_wrapper">
		<div class="title"></div>
			
			<!-- sort list -->
			<div class="sort_wrapper">
				<div class="title">Sortiere nach</div>
				<div class="sort_selection">
					<div class="menu_arrow"></div>
					<div class="selected_name">
							{if $sort_by == 'name_up' || $sort_by == 'name_down'}Bezeichnung<input type="hidden" id="sort_selection_item" name="sort_selection_item" value="name" />{/if}
							{if $sort_by == 'number_up' || $sort_by == 'number_down'}Artikelnummer<input type="hidden" id="sort_selection_item" name="sort_selection_item" value="number" />{/if}
							{if $sort_by == 'manufacturer_up' || $sort_by == 'manufacturer_down'}Hersteller<input type="hidden" id="sort_selection_item" name="sort_selection_item" value="manufacturer" />{/if}
							{if $sort_by == 'price_up' || $sort_by == 'price_down'}Preis<input type="hidden" id="sort_selection_item" name="sort_selection_item" value="price" />{/if}
					</div>
					<div class="menu_field">
						<div style="position:absolute;left:110px;top:27px;height:1px;width:28px;background:#ffffff;z-index:100;"></div>
						<div class="category_menu">
							<ul>
								<li><a class="sort_item" rel="name" href="{$currentSURI}">Bezeichnung</a></li>
								<li><a class="sort_item" rel="number" href="{$currentSURI}">Artikelnummer</a></li>
								<li><a class="sort_item" rel="manufacturer" href="{$currentSURI}">Hersteller</a></li>
								<li><a class="sort_item" rel="price" href="{$currentSURI}">Preis</a></li>
							</ul>
						</div>
					</div>
				</div>
				<div class="sort_direction_up {if $sort_by == 'name_up' || $sort_by == 'number_up' || $sort_by == 'manufacturer_up' || $sort_by == 'price_up'}sort_up_active{/if}"></div>
				<div class="sort_direction_down {if $sort_by == 'name_down' || $sort_by == 'number_down' || $sort_by == 'manufacturer_down' || $sort_by == 'price_down'}sort_down_active{/if}"></div>
			</div>
			
			<!-- liste style -->
			<div class="item_list_style_wrapper">
				<div class="title">Darstellung</div>
				<div class="style_selection">
					
						<div class="menu_arrow"></div>
						<div class="selected_name">
								{if $listStyleType == 1}<a href="#" rel="1" class="list_style_button activ1"></a>{/if}
								{if $listStyleType == 2}<a href="#" rel="2" class="list_style_button activ2"></a>{/if}
								{if $listStyleType == 3}<a href="#" rel="3" class="list_style_button activ3"></a>{/if}
						</div>
				<div class="menu_field">
					<div style="position:absolute;left:60px;top:27px;height:1px;width:28px;background:#ffffff;z-index:100;"></div>
						<div class="category_menu">
							<ul>
								<li><a href="#" rel="1" class="list_style_button {if $listStyleType == 1}activ1{else}inactiv1{/if}"></a></li>
								<li><a href="#" rel="2" class="list_style_button {if $listStyleType == 2}activ2{else}inactiv2{/if}"></a></li>
								<li><a href="#" rel="3" class="list_style_button {if $listStyleType == 3}activ3{else}inactiv3{/if}"></a></li>
							</ul>
						</div>
					</div>
				</div>
			</div>
			<form id="listStyleForm" method="post">
				<input type="hidden" name="listStyleSelector"  value="" id="listStyleSelector">
			</form>
	
			<!-- item shown -->
			<div class="list_item_shown_wrapper">
				<div class="title">Artikel je Seite</div>
				<div class="item_shown_selection">
					
						<div class="menu_arrow"></div>
						<div class="selected_name">
								{if $itemsPerPage == 24}24{/if}
								{if $itemsPerPage == 48}48{/if}
								{if $itemsPerPage == 9999}alle{/if}
						</div>
				<div class="menu_field">
					<div style="position:absolute;left:60px;top:27px;height:1px;width:28px;background:#ffffff;z-index:100;"></div>
						<div class="category_menu">
							<ul>
								<li><a class="pagingButton {if $itemsPerPage == 9999}activ{/if}" rel="9999" href="#">alle</a></li>
								<li><a href="#" class="pagingButton {if $itemsPerPage == 24}activ{/if}" rel="24">24</a></li>
								<li><a class="pagingButton {if $itemsPerPage == 48}activ{/if}" rel="48" href="#">48</a></li>
							</ul>
						</div>
					</div>
				</div>
			</div>
			<form id="pagingSelectorForm" method="post"">
					<input type="hidden" name="pagingSelector"  value="" id="pagingSelector">
			</form>
			
				
			{if $shopArticles}
			<!-- pagination -->
			{if isset($found_pages) && $found_pages > 1}
			<div class="pagination">
				{if $found_showing_page > 1}
					<a rel="{$found_showing_page-1}" class="pagination_button" href="#">&laquo;</a>
				{else}
					<a class="inactive">&laquo;</a>
				{/if}
		
				{section name=pageloop start=1 loop=$found_pages+1}
					{if ($found_showing_page >= $smarty.section.pageloop.index - 6 && $found_showing_page <= $smarty.section.pageloop.index + 6) || $smarty.section.pageloop.index < 7 || $smarty.section.pageloop.index > $found_pages - 6}
						<a rel="{$smarty.section.pageloop.index}" href="#" class="pagination_button {if $found_showing_page == $smarty.section.pageloop.index}highlight{/if}">{$smarty.section.pageloop.index}</a>
					{elseif $smarty.section.pageloop.index == 7 || $smarty.section.pageloop.index == $found_pages - 7}
						<span>[...]</span>
					{/if}
				{/section}
		
				{if $found_showing_page < $found_pages}
					<a rel="{$found_showing_page+1}" class="pagination_button" href="#">&raquo;</a>
				{else}
					<a class="inactive">&raquo;</a>
				{/if}	
				<form id="paginationForm" method="post">
				<input type="hidden" name="page"  value="" id="paginationSeite">
				</form>
			</div>
			
		{/if}
		
		
		{/if}		
	</div>
	
	<br />
	{$system_configuration.shop_itemlist_footertext|replace:"\n":"<br />"}
	<div class="box_footer" style="clear:both; margin-bottom:20px;"></div>

	
	{else}
		<p>Keine Produkte vorhanden.</p>
	{/if}
	
	<form id="sort_by" method="post" action="{$currentSURI}">
		<input type="hidden" name="sort_by" id="sort_by_selector" value="{$sort_by}">
	</form>
	<form id="manufacturerSelectorForm" method="post" action="{$currentSURI}">
		<input type="hidden" name="manufacturerSelector" id="manufacturerSelector" value="{$sort_by}">
	</form>
	<script type="text/javascript" src="{$PARENT_THEME_DIR}/media/js/content_box_item_list.js"></script>
</div>

