File: //proc/self/cwd/nueva/modules/pmproductvideoreviews/views/templates/hook/partials/distribution.tpl
{**
* rec.reviews
*
* @author Presta-Module.com <support@presta-module.com> - https://www.presta-module.com
* @copyright Presta-Module - https://www.presta-module.com
* @license see file: LICENSE.txt
*
* ____ __ __
* | _ \ | \/ |
* | |_) | | |\/| |
* | __/ | | | |
* |_| |_| |_|
*
*}
<div class="mt-1"></div>
<div class="pvr_review_container-block" id="pvr_block_reviews">
{if !empty($battle.worst) && !empty($battle.best) && !empty($battle_details)}
<div class="w-100">
<div class="battle">
<div class="battle-left col-xs-12 col-sm-6 col-md-6 col-lg-4">
<h6 class="text-center"><i class="material-icons">thumb_up</i> {l s='Top positif review' mod='pmproductvideoreviews'}</h6>
<article id="{$battle.best.id_rating|escape:'htmlall':'UTF-8'}" class="reviews-listing">
<a class="reviews-title-battle" id="battle-review-data-{$battle.best.id_rating|escape:'htmlall':'UTF-8'}">
<div class="reviews-item-content-battle">
<span class="col-xs-6 left-battle">
{$battle_details[$battle.best.id_rating].firstname|escape:'htmlall':'UTF-8'}
</span>
<span class="col-xs-6 right right-battle">
<i class="material-icons icons-battle"></i> {dateFormat date=$battle_details[$battle.best.id_rating].date_add full=0}
</span>
</div>
<div class="reviews-item-content-battle">
<div class="rating-star-yellow rating-star-yellow-battle col-xs-6">
{section loop=$max_rating name=note}
<input type="radio" value="{$smarty.section.note.iteration|intval}" {if $battle.best.note >= $smarty.section.note.iteration}checked="checked" {/if} />
<label class="product-tab{if $battle.best.note >= $smarty.section.note.iteration} checked{/if}" for="rating{$smarty.section.note.iteration|intval}" title="{$smarty.section.note.iteration|intval}"></label>
{/section}
</div>
<div class="col-xs-6 right">
<i class="material-icons icons-battle"></i> {dateFormat date=$battle_details[$battle.best.id_rating].date_add full=0}
</div>
</div>
</a>
<div class="reviews-image-battle" draggable="true" data-rtg-id="{$battle.best.id_rating|escape:'htmlall':'UTF-8'}" id="pvr-img-preview-battle-{$battle.best.id_rating|escape:'htmlall':'UTF-8'}">
<button class="pvr-close" id="btn-close-battle-{$battle.best.id_rating|escape:'htmlall':'UTF-8'}" data-rtg-id="{$battle.best.id_rating|escape:'htmlall':'UTF-8'}" style="display: none;">X</button>
<video preload="auto" data-rtg-id="{$battle.best.id_rating|escape:'htmlall':'UTF-8'}" poster="{$battle.best.video_prw_img|escape:'htmlall':'UTF-8'}" class="w-100 pvr-video-player-battle">
<source src="{$battle.best.video_url|escape:'htmlall':'UTF-8'}" type="video/mp4">
</video>
</div>
</article>
</div>
<div class="battle-right col-xs-12 col-sm-6 col-md-6 col-lg-4">
<h6 class="text-center"><i class="material-icons">thumb_down</i> {l s='Top critical review' mod='pmproductvideoreviews'}</h6>
<article id="{$battle.worst.id_rating|escape:'htmlall':'UTF-8'}" class="reviews-listing">
<a class="reviews-title-battle" id="battle-review-data-{$battle.worst.id_rating|escape:'htmlall':'UTF-8'}">
<div class="reviews-item-content-battle">
<span class="col-xs-6">
{$battle_details[$battle.worst.id_rating].firstname|escape:'htmlall':'UTF-8'}
</span>
<span class="col-xs-6 right right-battle">
<i class="material-icons icons-battle"></i> {dateFormat date=$battle_details[$battle.worst.id_rating].date_add full=0}
</span>
</div>
<div class="reviews-item-content-battle">
<div class="rating-star-yellow rating-star-yellow-battle col-xs-6">
{section loop=$max_rating name=note}
<input type="radio" value="{$smarty.section.note.iteration|intval}" {if $battle.worst.note >= $smarty.section.note.iteration}checked="checked" {/if} />
<label class="product-tab{if $battle.worst.note >= $smarty.section.note.iteration} checked{/if}" for="rating{$smarty.section.note.iteration|intval}" title="{$smarty.section.note.iteration|intval}"></label>
{/section}
</div>
<div class="col-xs-6 right">
<i class="material-icons icons-battle"></i> {dateFormat date=$battle_details[$battle.worst.id_rating].date_add full=0}
</div>
</div>
</a>
<div class="reviews-image-battle" draggable="true" data-rtg-id="{$battle.worst.id_rating|escape:'htmlall':'UTF-8'}" id="pvr-img-preview-battle-{$battle.worst.id_rating|escape:'htmlall':'UTF-8'}">
<button class="pvr-close" id="btn-close-battle-{$battle.worst.id_rating|escape:'htmlall':'UTF-8'}" data-rtg-id="{$battle.worst.id_rating|escape:'htmlall':'UTF-8'}" style="display: none;">X</button>
<video preload="auto" data-rtg-id="{$battle.worst.id_rating|escape:'htmlall':'UTF-8'}" poster="{$battle.worst.video_prw_img|escape:'htmlall':'UTF-8'}" class="w-100 pvr-video-player-battle">
<source src="{$battle.worst.video_url|escape:'htmlall':'UTF-8'}" type="video/mp4">
</video>
</div>
</article>
</div>
<div class="distribution">
<h6 class="text-distribution text-xs-center"><i class="material-icons">equalizer</i> {l s='Repartition' mod='pmproductvideoreviews'}</h6>
{foreach from=$distribution_data name=distrib key=note item=count}
<div class="row">
<div class="col-xs-7 col-sm-6 col-md-4 col-lg-6 progress-stars-distribution">
{if $note == 5}
<i class="material-icons progress-stars"></i>
<i class="material-icons progress-stars"></i>
<i class="material-icons progress-stars"></i>
<i class="material-icons progress-stars"></i>
<i class="material-icons progress-stars"></i>
{/if}
{if $note == 4}
<i class="material-icons progress-stars"></i>
<i class="material-icons progress-stars"></i>
<i class="material-icons progress-stars"></i>
<i class="material-icons progress-stars"></i>
<i class="material-icons progress-stars-empty"></i>
{/if}
{if $note == 3}
<i class="material-icons progress-stars"></i>
<i class="material-icons progress-stars"></i>
<i class="material-icons progress-stars"></i>
<i class="material-icons progress-stars-empty"></i>
<i class="material-icons progress-stars-empty"></i>
{/if}
{if $note == 2}
<i class="material-icons progress-stars"></i>
<i class="material-icons progress-stars"></i>
<i class="material-icons progress-stars-empty"></i>
<i class="material-icons progress-stars-empty"></i>
<i class="material-icons progress-stars-empty"></i>
{/if}
{if $note == 1}
<i class="material-icons progress-stars"></i>
<i class="material-icons progress-stars-empty"></i>
<i class="material-icons progress-stars-empty"></i>
<i class="material-icons progress-stars-empty"></i>
<i class="material-icons progress-stars-empty"></i>
{/if}
</div>
<div class="col-xs-5 col-sm-6 col-md-8 col-lg-6">
<div class="progress-distrib">
<span class="col-xs-12 text-center progress-distrib-total">
<strong class="col-xs-12">
{$percent_per_note.$note|escape:'htmlall':'UTF-8'}%
</strong>
</span>
<span class="progress-bar" style="width: {$percent_per_note.$note|escape:'htmlall':'UTF-8'}%;"><b style=""></span>
</div>
</div>
</div>
{/foreach}
</div>
</div>
</div>
{/if}