<commit_before><?php

use yii\helpers\Html;
use yii\grid\GridView;
use yii\grid\DataColumn;

/* @var $this yii\web\View */
/* @var $searchModel backend\modules\supplies\models\SuppliesSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = 'Материалы';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="supplies-index">

    <h1><?= Html::encode($this->title) ?></h1>
    <?php // echo $this->render('_search', ['model' => $searchModel]); ?>

    <p>
        <?= Html::a('Создать материал', ['add'], ['class' => 'btn btn-success']) ?>
    </p>
    <?php
    $allColor = \common\models\Color::find()->all();
    $color = '<div class="selectColor" style = "width:100px;height:32px;border: 1px solid grey;font-size: 13px;text-align: center;padding-top: 7px">Выберите цвет</div>';
    $color .= "<div class='allColor'>";
    foreach($allColor as $c){
        $color .= "<div class='selectOnecolorAlt' color-v='$c->value' color='$c->id' data-sup-id='$model->id' data-id='$c->id' style='background-color:$c->value;width: 100px;height: 20px;margin: 5px'></div>";
    }
    $color .= "</div>";
    ?><commit_msg>Фильтры материалы 2<commit_after><?php

use yii\helpers\Html;
use yii\grid\GridView;
use yii\grid\DataColumn;

/* @var $this yii\web\View */
/* @var $searchModel backend\modules\supplies\models\SuppliesSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = 'Материалы';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="supplies-index">

    <h1><?= Html::encode($this->title) ?></h1>
    <?php // echo $this->render('_search', ['model' => $searchModel]); ?>

    <p>
        <?= Html::a('Создать материал', ['add'], ['class' => 'btn btn-success']) ?>
    </p>
    <?php
    $allColor = \common\models\Color::find()->all();
    if(isset($_GET['SuppliesSearch']['color'])){
        $defaultColor = \common\models\Color::find()->where(['id'=>$_GET['SuppliesSearch']['color']])->one();
        $color = '<div class="selectColor" style = "width:100px;height:32px;border: 1px solid lightgrey;border-radius:4px;font-size: 13px;text-align: center;padding-top: 7px;background-color:'.$defaultColor->value.'"></div>';
    }
    else {
        $color = '<div class="selectColor" style = "width:100px;height:32px;border: 1px solid lightgrey;border-radius:4px;font-size: 13px;text-align: center;padding-top: 7px">Выберите цвет</div>';
    }
    $color .= "<div class='allColor'>";
    foreach($allColor as $c){
        $color .= "<div class='selectOnecolorAlt' color-v='$c->value' color='$c->id' data-sup-id='$model->id' data-id='$c->id' style='background-color:$c->value;width: 100px;height: 20px;margin: 5px'></div>";
    }
    $color .= "</div>";
    ?>
{'fraction_non_alphanumeric': 0.23317396101507906, 'fraction_numerical': 0.016917984553144538, 'mean_word_length': 4.343811394891945, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 67, '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': '4759987', 'n_tokens_mistral': 1016, 'n_tokens_neox': 993, 'n_words': 161}