<!-- advanced:item_opinion -->
<div class="customer_opinion_wrapper">
	<div style="position:relative;width:664px;float:left;">
		<span class="title">Kundenbewertungen</span><br /><br />

		{if $shopArticle->opinion}
			{if $opinion_show}
				{foreach item=rezension name=opinion_loop from=$shopArticle->opinion}
					<div class="opinion_box_big">
						<div class="name">{$rezension->user_name}</div>
						<div class="date">{$rezension->date}</div>
						<div class="opinion">
							{section name=chk start=1 max=5 loop=6 step=1} 
								{if $rezension->rang >= $smarty.section.chk.index}
									<div class="opinion_bull_active"></div>
								{else}
									<div class="opinion_bull"></div>
								{/if}
							{/section}
							<br style="clear:both;" />
						</div>
						<div class="opinion_text">{$rezension->opinion_text}</div>
					</div>
				{/foreach}
			{else}
				{foreach item=rezension name=opinion_loop from=$shopArticle->opinion}
					{if  $smarty.foreach.opinion_loop.iteration == 5}
						{break}
					{/if}
					<div class="opinion_box_small">
						<div class="name">{$rezension->user_name}</div>
						<div class="date">{$rezension->date}</div>
						<div class="opinion">
							{section name=chk start=1 max=5 loop=6 step=1} 
								{if $rezension->rang >= $smarty.section.chk.index}
									<div class="opinion_bull_active"></div>
								{else}
									<div class="opinion_bull"></div>
								{/if}
							{/section}
							<br style="clear:both;" />
						</div>
						<div class="opinion_text">{$rezension->opinion_text|truncate:250:"...":true}</div>
						<a href="?opinion_show=1" class="opinion_link">Weiter lesen</a>
					</div>
				{/foreach}
				<br style="clear:both;" />
			{/if}
		{else}
			<div style="position:relative;top:40px;left:20px;width:200px;">
				Es ist f&uuml;r diesen Artikel noch keine Bewertung abgegeben worden.
			</div>
		{/if}
		
		{if !$opinion_show}
			<div class="opinion_stat">
				<div class="opinion">
					{section name=chk start=1 max=5 loop=6 step=1} 
						{if $shopArticle->avg_opinion >= $smarty.section.chk.index}
							<div class="opinion_bull_active"></div>
						{else}
							<div class="opinion_bull"></div>
						{/if}
					{/section}
					<br style="clear:both;" />
				</div>

				<strong>{$shopArticle->opinion|@count} Bewertungen</strong>
			</div>
		
			<a href="?opinion_show=1" class="opinion_show_all_button">Zeige alle Bewertungen</a>
		{/if}


	</div>
	<div id="opinion_form_wrapper">
		<span class="title">Meinung verfassen</span>
		{if $customer}
			<form method="post">
				<input type="hidden" name="create_opinion" value="1" />
				<span class="opinion_rating_title">Ihre Bewertung</span>
				<div class="opinion_rating">
					<input class="hover-star required" type="radio" name="rang" title="Ausreichend" value="1"/>
					<input class="hover-star" type="radio" name="rang" title="Durchschnittlich" value="2"/>
					<input class="hover-star" type="radio" name="rang" title="Gut" value="3"/>
					<input class="hover-star" type="radio" name="rang" title="Sehr Gut" value="4"/>
					<input class="hover-star" type="radio" name="rang" title="Perfekt" value="5"/>
					<div id="hover-test"></div>
				</div>

				<span class="opinion_text_title">Ihr Fazit:</span>
				<textarea name="opinion_text" class="opinion_text_input"></textarea>

				<span class="author_title">Autor:</span>
				<div class="author">{$customer->firstname} {$customer->surname}</div>

				<input type="submit" class="opinion_create_button" name="Bewertung absenden" />
			</form>
		{else}
			<div style="position:relative;top:40px;left:20px;width:200px;">
				Bitte loggen Sie sich ein, um f&uuml;r den Artikel eine Bewertung zu schreiben. <a href="/Kundencenter/" style="text-decoration:none;color:#a9a9a9;">Hier gehts zum Login...</a>
			</div>
		{/if}	
	</div>
	
	<br style="clear:left;">
</div>
<br />
