131 lines
5.1 KiB
Smarty
131 lines
5.1 KiB
Smarty
<h2 class="h1 text-center p-t-1">{t}Hodnocení{/t}</h2>
|
|
<div class="text-center">
|
|
<div class="reviews-stars-wrapper">
|
|
{if $ratings.rating}
|
|
<div class="number-stars p-x-1 rating-{$ratings.rating|round}" title="{t}Průměrné hodnocení:{/t} {$ratings.rating|round:1}">
|
|
<i class="fc icons_star"></i>
|
|
<i class="fc icons_star"></i>
|
|
<i class="fc icons_star"></i>
|
|
<i class="fc icons_star"></i>
|
|
<i class="fc icons_star"></i>
|
|
</div>
|
|
<div class="number-reviews">{t pocet=$ratings.rating|round:1}{pocet} z 5{/t}</div>
|
|
{include 'block.reviews.star-tooltip.tpl'}
|
|
{/if}
|
|
</div>
|
|
</div>
|
|
|
|
{$reviewsCount = $ratings.reviews|count}
|
|
|
|
{if $reviewsCount > 0}
|
|
{foreach $ratings.reviews as $review}
|
|
{if $review@index == 2 and $reviewsCount >= 3}
|
|
<div data-more-reviews style="display: none;">
|
|
{/if}
|
|
<div class="row review-item">
|
|
|
|
<div class="col-xs-12 col-lg-2 review-data">
|
|
{if $review.user_name}
|
|
{$author = $review.user_name|cat:", "|cat:$review.user_city}
|
|
{else}
|
|
{$author = $review.name|default:"{t}Anonymní{/t}"}
|
|
{/if}
|
|
|
|
<strong>{$author}</strong><br>
|
|
{if $review.date}{$review.date|date_format:"%e. %-m. %Y"}<br>{/if}
|
|
|
|
{if $review.rating}
|
|
<div class="number-stars rating-{$review.rating|round}">
|
|
<i class="fc icons_star"></i>
|
|
<i class="fc icons_star"></i>
|
|
<i class="fc icons_star"></i>
|
|
<i class="fc icons_star"></i>
|
|
<i class="fc icons_star"></i>
|
|
</div>
|
|
{/if}
|
|
|
|
<p class="review-verified">
|
|
{if $review.verified}
|
|
<i class="fc icons_check-circle"></i>
|
|
{t}Recenze nakupujícího{/t}
|
|
{else}
|
|
{t}Recenze návštěvníka{/t}
|
|
{/if}
|
|
{$review.source}
|
|
</p>
|
|
<p class="review-report">
|
|
<a href="" data-wpj-focus="{path('kupshop_content_contactform_sendform', ['type'=>'report-inappropriate-content', 'report_type'=>'reviews', 'content_id'=>{$review.id}])}" data-wpj-focus-ajax="1">
|
|
{t}Nahlásit{/t}
|
|
</a>
|
|
</p>
|
|
</div>
|
|
<div class="col-xs-12 col-lg-10">
|
|
<div class="review-text">
|
|
<p>{$review.summary}</p>
|
|
{if $review.pros}<p class="pros"><strong>{t}Klady{/t}</strong>{$review.pros}</p>{/if}
|
|
{if $review.cons}<p class="cons"><strong>{t}Zápory{/t}</strong>{$review.cons}</p>{/if}
|
|
|
|
{ifmodule PRODUCTS_COLLECTIONS}
|
|
{if $review.id_product != $body.product.id}
|
|
<p class="review-collection-product">{t}Původně vloženo k{/t} <a
|
|
href="{url s=product IDproduct=$review.id_product TITLE=$review.product_title}"
|
|
title="{t}Zobrazit produkt{/t}">{$review.product_title}</a></p>
|
|
{/if}
|
|
{/ifmodule}
|
|
</div>
|
|
|
|
{if $review.response}
|
|
<div class="review-response-wrapper">
|
|
<div class="review-text review-response-text">
|
|
<p>{$review.response|nl2br nofilter}</p>
|
|
</div>
|
|
<div class="review-response-data">
|
|
{block "review-response-avatat"}{/block}
|
|
<strong>{$dbcfg.shop_title|lower}</strong>
|
|
{if $review.response_time}
|
|
<br><span>{$review.response_time|date_format:"%e. %-m. %Y"}</span>
|
|
{/if}
|
|
</div>
|
|
</div>
|
|
{/if}
|
|
</div>
|
|
</div>
|
|
{if $review@last && $reviewsCount >= 3}
|
|
</div>
|
|
{/if}
|
|
{/foreach}
|
|
|
|
{elseif !$ratings.user_already_rated}
|
|
<p class="text-center p-y-1">
|
|
{if $ratings.rating}
|
|
{t}Tento produkt zatím nemá žádné textové hodnocení.{/t}
|
|
{else}
|
|
{t}Tento produkt zatím nemá žádné hodnocení.{/t}
|
|
{/if}
|
|
|
|
{if !$body.product->isold()}
|
|
<a href="" data-wpj-focus="{path('kupshop_catalog_reviews_productreview', ['id'=>$body.product.id])}" data-wpj-focus-ajax="1" >{t}Přidejte první.{/t}</a>
|
|
{/if}
|
|
</p>
|
|
{/if}
|
|
|
|
<p class="text-center reviews m-t-2">
|
|
{if $reviewsCount >= 3}
|
|
<a href="" class="btn btn-outlined btn-outlined--green more" data-opener="[data-more-reviews]">{t}zobrazit další{/t}</a>
|
|
{/if}
|
|
|
|
{if $ratings.user_already_rated}
|
|
<span class="p-x-2">{t}Tento produkt jste už hodnotil(a).{/t}</span>
|
|
{else}
|
|
<a href="" class="btn btn-outlined btn-outlined--green add " data-wpj-focus="{path('kupshop_catalog_reviews_productreview', ['id'=>$body.product.id])}" data-wpj-focus-ajax="1" >
|
|
<span class="fc icons_plus"></span> {t}ohodnotit{/t}
|
|
</a>
|
|
{/if}
|
|
</p>
|
|
|
|
<p class="text-center m-b-0">
|
|
<a href="{url s=page label='review-rules'}" class="reviews-rules-link">{t}Informace k získávání recenzí{/t}</a>
|
|
</p>
|
|
|
|
<hr class="m-t-2">
|