Commit db62199400fc5b08c2888ff9b1df71f7a3c4062c

Authored by Administrator
1 parent 7c40e42d

Importers CRUD

backend/controllers/ArtHistoryController.php
... ... @@ -14,6 +14,7 @@ use yii\filters\VerbFilter;
14 14 */
15 15 class ArtHistoryController extends Controller
16 16 {
  17 + public $layout = "/column";
17 18 public function behaviors()
18 19 {
19 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 24 'filterModel' => $searchModel,
25 25 'columns' => [
26 26 ['class' => 'yii\grid\SerialColumn'],
27   -
28   - 'id',
  27 + 'dt',
29 28 'user_id',
  29 + 'accounts.name',
30 30 'art',
31   - 'dt',
32   -
33 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 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 }
... ...