From 70e0bb1c52b55818869cdb84af4acd09857ce569 Mon Sep 17 00:00:00 2001 From: fomichev Date: Mon, 24 Mar 2025 15:10:18 +0300 Subject: [PATCH] =?utf8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD?= =?utf8?q?=D1=8B=20=D1=81=D1=81=D1=8B=D0=BB=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../marketplace-flowwow-emails/index.php | 19 ++++++++++++++++++- erp24/views/marketplace-orders/index.php | 1 + 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/erp24/views/marketplace-flowwow-emails/index.php b/erp24/views/marketplace-flowwow-emails/index.php index a5ec2d45..c7c69c74 100644 --- a/erp24/views/marketplace-flowwow-emails/index.php +++ b/erp24/views/marketplace-flowwow-emails/index.php @@ -30,7 +30,24 @@ $this->params['breadcrumbs'][] = $this->title; 'id', 'subject', - 'email_status', + + [ + 'attribute' => 'email_status', + 'format' => 'raw', + 'value' => function ($model) { + $text = ''; + $class = ''; + if ($model->email_status === 1) { + $class = 'bg-success text-white'; + $text = 'Обработано'; + } elseif ($model->email_status === 0) { + $class = 'bg-danger text-white'; + $text = 'Необработано'; + } + return Html::tag('span', $text, ['class' => "badge $class"]); + }, + 'filter' => Html::input('text', 'MarketplaceFlowwowEmailsSearch[email_status]', $searchModel->email_status, ['class' => 'form-control']), + ], 'from', 'to', 'date', diff --git a/erp24/views/marketplace-orders/index.php b/erp24/views/marketplace-orders/index.php index 6c98c79b..f454f412 100644 --- a/erp24/views/marketplace-orders/index.php +++ b/erp24/views/marketplace-orders/index.php @@ -26,6 +26,7 @@ YiiAsset::register($this); 'btn btn-success']) ?> 'btn btn-success']) ?> 'btn btn-success']) ?> + 'btn btn-success']) ?>

render('_search', ['model' => $searchModel]); ?> -- 2.39.5