<commit_before><?php
use yii\helpers\Html;
use app\models\Shop;

$this->registerJsFile('@web/js/jquery.tablesorter.min.js', ['yii\web\JqueryAsset']);

$shop = Shop::find()->where(['alias' => $url])->one();
$this->title = $shop->name;
$this->params['breadcrumbs'][] = ['label' => 'Магазины', 'url' => ['/shop/index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="body-content page" id="<?= $shop->id ?>">
	<h1><?= Html::encode($this->title) ?></h1>

    <div class="panel panel-default">
        <div class="panel-heading">
            <img src="<?= $shop->getLogo() ?>" alt="<?= $shop->name ?>" class="img-rounded">
            <div class="info">
                <p><?= $shop->about ?></p>
                <?php if($shop->subway) echo '<p>Станция метро: /go '.$shop->subway.'</p>' ?>
                <?php if(isset($shop->x_cord) && isset($shop->z_cord)) echo '<p>Координаты: X: '.$shop->x_cord.', Z: '.$shop->z_cord.'</p>' ?>
                <?= '<p>Последнее обновление: '.gmdate("Y-m-d H:i", $shop->updated_at).'</p>' ?>
                <?php if($shop->status == 8) echo '<p><a href="http://'.$shop->source.'" target="_blank">Источник</a></p>' ?>
            </div>
        </div>
        <?php if(isset($shop->description)) echo'<div class="panel-body">'.$shop->description.'</div>' ?>
        <table class="table table-hover sort pointer">
            <thead>
                <tr>
                    <th width="5%"></th>
                    <th width="5%">ID</th>
                    <th class="name">Название</th>
                    <th width="15%">Цена продажи</th>
                    <th width="15px" class="{sorter: false} flag"></th>
                    <th width="15%">Цена покупки</th>
                    <th width="15px" class="{sorter: false} flag"></th>
                    <th width="15%">Кол-во за сделку</th>
                </tr>
            </thead>
            <tbody>
            <?php foreach($shop->prices as $price):
                $complaint_sell = ($price->complaint_sell == 0)?' ':' bad';
                $complaint_buy = ($price->complaint_buy == 0)?' ':' complaint bad';
            ?>
                <tr data-href="<?= Yii::$app->urlManager->createUrl(['item/view', 'alias' => $price->item->alias]) ?>">
                    <td><img src="/images/items/<?= $price->item->alias ?>.png" alt="<?= $price->item->name; ?>" align="left" class="small-icon"></td>
                    <td><?= $price->item->alias; ?></td>
                    <td class="name"><?= $price->item->name; ?></td>
                    <td><?= ($price->price_sell)?$price->price_sell:'—' ?></td>
                    <td class="flag"><span class="glyphicon glyphicon-bookmark complaint<?= $complaint_sell ?>" data-type="sell"></span></td>
                    <td><?= ($price->price_buy)?$price->price_buy:'—' ?></td>
                    <td class="flag"><span class="glyphicon glyphicon-bookmark complaint<?= $complaint_buy ?>" data-type="buy"></span></td>
                    <td><?= $price->stuck; ?></td>
                </tr>
            <?php endforeach; ?>
            </tbody>
        </table>
    </div>

</div><commit_msg>Исправлена ошибка с выводом источника прайса<commit_after><?php
use yii\helpers\Html;
use app\models\Shop;

$this->registerJsFile('@web/js/jquery.tablesorter.min.js', ['yii\web\JqueryAsset']);

$shop = Shop::find()->where(['alias' => $url])->one();
$this->title = $shop->name;
$this->params['breadcrumbs'][] = ['label' => 'Магазины', 'url' => ['/shop/index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="body-content page" id="<?= $shop->id ?>">
	<h1><?= Html::encode($this->title) ?></h1>

    <div class="panel panel-default">
        <div class="panel-heading">
            <img src="<?= $shop->getLogo() ?>" alt="<?= $shop->name ?>" class="img-rounded" />
            <div class="info">
                <p><?= $shop->about ?></p>
                <?php if($shop->subway) echo '<p>Станция метро: /go '.$shop->subway.'</p>' ?>
                <?php if(isset($shop->x_cord) && isset($shop->z_cord)) echo '<p>Координаты: X: '.$shop->x_cord.', Z: '.$shop->z_cord.'</p>' ?>
                <?= '<p>Последнее обновление: '.gmdate("Y-m-d H:i", $shop->updated_at).'</p>' ?>
                <?php if($shop->source) echo '<p><a href="http://'.$shop->source.'" target="_blank">Источник</a></p>' ?>
            </div>
        </div>
        <?php if(isset($shop->description)) echo'<div class="panel-body">'.$shop->description.'</div>' ?>
        <table class="table table-hover sort pointer">
            <thead>
                <tr>
                    <th width="5%"></th>
                    <th width="5%">ID</th>
                    <th class="name">Название</th>
                    <th width="15%">Цена продажи</th>
                    <th width="15px" class="{sorter: false} flag"></th>
                    <th width="15%">Цена покупки</th>
                    <th width="15px" class="{sorter: false} flag"></th>
                    <th width="15%">Кол-во за сделку</th>
                </tr>
            </thead>
            <tbody>
            <?php foreach($shop->prices as $price):
                $complaint_sell = ($price->complaint_sell == 0)?' ':' bad';
                $complaint_buy = ($price->complaint_buy == 0)?' ':' complaint bad';
            ?>
                <tr data-href="<?= Yii::$app->urlManager->createUrl(['item/view', 'alias' => $price->item->alias]) ?>">
                    <td><img src="/images/items/<?= $price->item->alias ?>.png" alt="<?= $price->item->name; ?>" align="left" class="small-icon" /></td>
                    <td><?= $price->item->alias; ?></td>
                    <td class="name"><?= $price->item->name; ?></td>
                    <td><?= ($price->price_sell)?$price->price_sell:'—' ?></td>
                    <td class="flag"><span class="glyphicon glyphicon-bookmark complaint<?= $complaint_sell ?>" data-type="sell"></span></td>
                    <td><?= ($price->price_buy)?$price->price_buy:'—' ?></td>
                    <td class="flag"><span class="glyphicon glyphicon-bookmark complaint<?= $complaint_buy ?>" data-type="buy"></span></td>
                    <td><?= $price->stuck; ?></td>
                </tr>
            <?php endforeach; ?>
            </tbody>
        </table>
    </div>

</div>
{'fraction_non_alphanumeric': 0.24139020537124803, 'fraction_numerical': 0.005213270142180095, 'mean_word_length': 2.1434955312810327, 'pattern_counts': {'":': 0, '<': 193, '<?xml version=': 0, '>': 289, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '616258', 'n_tokens_mistral': 2135, 'n_tokens_neox': 2079, 'n_words': 356}