Commit 27802c1194921f6d12dcd06a9f8496abcbbfed17
1 parent
615358fb
Importers CRUD
Showing
14 changed files
with
9 additions
and
4 deletions
Show diff stats
backend/controllers/ArtHistoryController.php
@@ -14,6 +14,7 @@ use yii\filters\VerbFilter; | @@ -14,6 +14,7 @@ use yii\filters\VerbFilter; | ||
14 | */ | 14 | */ |
15 | class ArtHistoryController extends Controller | 15 | class ArtHistoryController extends Controller |
16 | { | 16 | { |
17 | + public $layout = "/column"; | ||
17 | public function behaviors() | 18 | public function behaviors() |
18 | { | 19 | { |
19 | return [ | 20 | return [ |
backend/views/accounts_vin/_form.php renamed to backend/views/accounts-vin/_form.php
backend/views/accounts_vin/_search.php renamed to backend/views/accounts-vin/_search.php
backend/views/accounts_vin/create.php renamed to backend/views/accounts-vin/create.php
backend/views/accounts_vin/index.php renamed to backend/views/accounts-vin/index.php
backend/views/accounts_vin/update.php renamed to backend/views/accounts-vin/update.php
backend/views/accounts_vin/view.php renamed to backend/views/accounts-vin/view.php
backend/views/art_history/_form.php renamed to backend/views/art-history/_form.php
backend/views/art_history/_search.php renamed to backend/views/art-history/_search.php
backend/views/art_history/create.php renamed to backend/views/art-history/create.php
backend/views/art_history/index.php renamed to backend/views/art-history/index.php
@@ -24,12 +24,10 @@ $this->params['breadcrumbs'][] = $this->title; | @@ -24,12 +24,10 @@ $this->params['breadcrumbs'][] = $this->title; | ||
24 | 'filterModel' => $searchModel, | 24 | 'filterModel' => $searchModel, |
25 | 'columns' => [ | 25 | 'columns' => [ |
26 | ['class' => 'yii\grid\SerialColumn'], | 26 | ['class' => 'yii\grid\SerialColumn'], |
27 | - | ||
28 | - 'id', | 27 | + 'dt', |
29 | 'user_id', | 28 | 'user_id', |
29 | + 'accounts.name', | ||
30 | 'art', | 30 | 'art', |
31 | - 'dt', | ||
32 | - | ||
33 | ['class' => 'yii\grid\ActionColumn'], | 31 | ['class' => 'yii\grid\ActionColumn'], |
34 | ], | 32 | ], |
35 | ]); ?> | 33 | ]); ?> |
backend/views/art_history/update.php renamed to backend/views/art-history/update.php
backend/views/art_history/view.php renamed to backend/views/art-history/view.php
common/models/ArtHistory.php
@@ -48,4 +48,10 @@ class ArtHistory extends \yii\db\ActiveRecord | @@ -48,4 +48,10 @@ class ArtHistory extends \yii\db\ActiveRecord | ||
48 | 'dt' => 'Dt', | 48 | 'dt' => 'Dt', |
49 | ]; | 49 | ]; |
50 | } | 50 | } |
51 | + | ||
52 | + | ||
53 | + public function getAccounts() | ||
54 | + { | ||
55 | + return $this->hasOne(Accounts::className(), ['id' => 'user_id']); | ||
56 | + } | ||
51 | } | 57 | } |