{*
* 2007-2024 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author    PrestaShop SA <contact@prestashop.com>
*  @copyright 2007-2024 PrestaShop SA
*  @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*}
{if $agileRatings}
    <div id="seller_rating_feedback" class="col-xs-12 mb-1 pb-1 seller-rating-feedback">
        <h3 class="mt-1 mb-2">{l s='Feedback List' d='Modules.Agilemultisellerpro.Multipleshop'}</h3>

        {foreach from=$agileRatings item=rating name=ratingloop}
            {if $rating.content}
                <div class="agile-row">
                    <div class="col-xs-12 col-md-3">
                        <p class="h6">
                            {$rating.customer|truncate:20:'...':true|escape:'html':'UTF-8'}
                        </p>
                        <p>
                            {dateFormat date=$rating.dateAdd|escape:'html':'UTF-8' full=1}
                        </p>
                        <p>
                            {$rating.stars nofilter}
                            {$rating.grade|round:1|floatval}
                        </p>
                    </div>
                    <div class="col-xs-12 col-md-9">
                        <p>
                            {$rating.content|escape:'html':'UTF-8'}
                        </p>
                    </div>
                </div>
                {if !empty($rating.response)}
                    <div class="agile-row seller-rating-feedback__response">
                        <div class="col-xs-12 col-md-3">
                            <p>
                                {$shop_name|escape:'html':'UTF-8'}<br>{dateFormat date=$rating.dateUpd|escape:'html':'UTF-8' full=1}
                            </p>
                        </div>
                        <div class="col-xs-12 col-md-9">
                            <p>
                                {$rating.response|escape:'html':'UTF-8'}
                            </p>
                        </div>
                    </div>
                {/if}
                {if !$smarty.foreach.ratingloop.last}
                    <hr>
                {/if}
            {/if}
        {/foreach}

        {if count($agileRatings) > 0}
            <hr>
            {block name='pagination'}
                {include file='_partials/pagination.tpl' pagination=$agileRatingsPagination}
            {/block}
        {/if}
    </div>
{/if}
