Files
kupshop/web/templates/elnino/reviews/block.reviews.tpl
2025-08-02 16:30:27 +02:00

49 lines
1.8 KiB
Smarty

{if $product_reviews.rating}
<div class="review-average">
<strong>{t}Průměrné hodnocení:{/t} {$product_reviews.rating|round:1}</strong>
<div class="review-stars" title="{t}Průměrné hodnocení:{/t} {$product_reviews.rating|round:1}">
{for $i=1 to 5}
<span class="fc icons_star {if $i > $product_reviews.rating|round}empty{else}full{/if}"></span>
{/for}
</div>
{include 'block.reviews.star-tooltip.tpl'}
</div>
{/if}
{$textReviewsCount = $product_reviews.reviews|count}
{if $textReviewsCount > 0}
{include "reviews/product.reviews.list.tpl"}
{elseif !$product_reviews.user_already_rated}
<p class="text-center">
{if $product_reviews.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}
<div class="review-btns">
{if $textReviewsCount >= 3}
<a href="" class="btn btn-secondary more" data-reviews-opener data-more="{t}zobrazit další{/t}"
data-less="{t}zobrazit méně{/t}">{t}zobrazit další{/t}</a>
{/if}
{if $product_reviews.user_already_rated}
<p>{t}Tento produkt jste už hodnotil(a).{/t}</p>
{else}
<a href="" class="btn btn-primary add" data-wpj-focus="{path('kupshop_catalog_reviews_productreview', ['id'=>$body.product.id])}" data-wpj-focus-ajax="1">
{t}ohodnotit produkt{/t}
</a>
{/if}
</div>
<div class="reviews-rules-link">
<a href="{url s=page label='review-rules'}">{t}Informace k získávání recenzí{/t}</a>
</div>