diff --git a/models/Item.php b/models/Item.php
index c85fe8b..16dfca7 100644
--- a/models/Item.php
+++ b/models/Item.php
@@ -2,7 +2,6 @@
namespace app\models;
-use linslin\yii2\curl\Curl;
use Yii;
use yii\db\ActiveRecord;
use yii\helpers\ArrayHelper;
@@ -22,7 +21,6 @@ use yii\helpers\ArrayHelper;
* @property string $default_value
*
* @property History[] $histories
- * @property Room $room
* @property Board $board
* @property ItemWidget $widget
*/
diff --git a/views/history/_history.php b/views/history/_history.php
index 30c3c5f..7aef348 100644
--- a/views/history/_history.php
+++ b/views/history/_history.php
@@ -47,7 +47,7 @@ use app\models\Item;
item->type === Item::TYPE_RGB): ?>
- установил значение = $model->value ?> на RGB = $model->item->name ?> в комнате = $model->item->room->name ?>
+ установил значение = $model->value ?> на RGB = $model->item->name ?> в комнате = $model->item->widget->room->name ?>
type === History::TYPE_ITEM_VALUE): ?>
@@ -62,19 +62,19 @@ use app\models\Item;
ВЫКЛ
- в комнате = $model->item->room->name ?>
+ в комнате = $model->item->widget->room->name ?>
item->type === Item::TYPE_VARIABLE_TEMPERATURE): ?>
- Значение температуры = $model->item->name ?> было = $model->value ?> °С в комнате = $model->item->room->name ?>
+ Значение температуры = $model->item->name ?> было = $model->value ?> °С в комнате = $model->item->widget->room->name ?>
item->type === Item::TYPE_VARIABLE_HUMIDITY): ?>
- Значение влажности = $model->item->name ?> было = $model->value ?> % в комнате = $model->item->room->name ?>
+ Значение влажности = $model->item->name ?> было = $model->value ?> % в комнате = $model->item->widget->room->name ?>
item->type === Item::TYPE_VARIABLE_BOOLEAN): ?>
- Значение элемента = $model->item->name ?> было = Yii::$app->formatter->asBoolean($model->value) ?> в комнате = $model->item->room->name ?>
+ Значение элемента = $model->item->name ?> было = Yii::$app->formatter->asBoolean($model->value) ?> в комнате = $model->item->widget->room->name ?>
item->type === Item::TYPE_VARIABLE_BOOLEAN_DOOR): ?>
@@ -84,11 +84,11 @@ use app\models\Item;
открыта
закрыта
- в комнате = $model->item->room->name ?>
+ в комнате = $model->item->widget->room->name ?>
- Значение элемента = $model->item->name ?> было = $model->value ?> в комнате = $model->item->room->name ?>
+ Значение элемента = $model->item->name ?> было = $model->value ?> в комнате = $model->item->widget->room->name ?>