drop unnecessary tables and module
This commit is contained in:
@ -1,46 +0,0 @@
|
||||
<?php
|
||||
|
||||
use backend\modules\document\models\Document;
|
||||
use common\models\DocumentField;
|
||||
use kartik\select2\Select2;
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\ActiveForm;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model backend\modules\document\models\DocumentFieldValue */
|
||||
/* @var $form yii\widgets\ActiveForm */
|
||||
?>
|
||||
|
||||
<div class="document-field-value-form">
|
||||
|
||||
<?php $form = ActiveForm::begin(); ?>
|
||||
|
||||
<?= $form->field($model, 'document_id')->widget(Select2::className(),
|
||||
[
|
||||
'data' => Document::find()->select(['title', 'id'])
|
||||
->indexBy('id')->column(),
|
||||
'options' => ['placeholder' => 'Выберите документ','class' => 'form-control'],
|
||||
'pluginOptions' => [
|
||||
'allowClear' => true
|
||||
],
|
||||
]) ?>
|
||||
|
||||
<?= $form->field($model, 'field_id')->widget(Select2::className(),
|
||||
[
|
||||
'data' => DocumentField::find()->select(['title', 'id'])
|
||||
->indexBy('id')->column(),
|
||||
'options' => ['placeholder' => 'Выберите поле','class' => 'form-control'],
|
||||
'pluginOptions' => [
|
||||
'allowClear' => true
|
||||
],
|
||||
]) ?>
|
||||
|
||||
<?= $form->field($model, 'value')->textInput(['maxlength' => true]) ?>
|
||||
|
||||
<div class="form-group">
|
||||
<?= Html::submitButton('Сохранить', ['class' => 'btn btn-success']) ?>
|
||||
</div>
|
||||
|
||||
<?php ActiveForm::end(); ?>
|
||||
|
||||
</div>
|
@ -1,38 +0,0 @@
|
||||
<?php
|
||||
|
||||
use backend\modules\document\models\Document;
|
||||
use common\models\DocumentField;
|
||||
use kartik\select2\Select2;
|
||||
use yii\helpers\ArrayHelper;
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\ActiveForm;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $documentFieldValues backend\modules\document\models\DocumentFieldValue[] */
|
||||
/* @var $form yii\widgets\ActiveForm */
|
||||
?>
|
||||
|
||||
<div class="document-field-value-form">
|
||||
|
||||
<h2>
|
||||
Заполнение полей документа: <?php echo(ArrayHelper::getValue($documentFieldValues[0], 'document.title')); ?>
|
||||
</h2>
|
||||
|
||||
<?php $form = ActiveForm::begin(); ?>
|
||||
|
||||
<?php foreach ($documentFieldValues as $index => $documentFieldValue) { ?>
|
||||
|
||||
<?= $form->field($documentFieldValue, "[$index]value")
|
||||
->textInput(['maxlength' => true])
|
||||
->label(ArrayHelper::getValue($documentFieldValue,'field.title')
|
||||
) ?>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<div class="form-group">
|
||||
<?= Html::submitButton('Сохранить', ['class' => 'btn btn-success']) ?>
|
||||
</div>
|
||||
|
||||
<?php ActiveForm::end(); ?>
|
||||
|
||||
</div>
|
@ -1,33 +0,0 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\ActiveForm;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model backend\modules\document\models\DocumentFieldValueSearch */
|
||||
/* @var $form yii\widgets\ActiveForm */
|
||||
?>
|
||||
|
||||
<div class="document-field-value-search">
|
||||
|
||||
<?php $form = ActiveForm::begin([
|
||||
'action' => ['index'],
|
||||
'method' => 'get',
|
||||
]); ?>
|
||||
|
||||
<?= $form->field($model, 'id') ?>
|
||||
|
||||
<?= $form->field($model, 'field_id') ?>
|
||||
|
||||
<?= $form->field($model, 'document_id') ?>
|
||||
|
||||
<?= $form->field($model, 'value') ?>
|
||||
|
||||
<div class="form-group">
|
||||
<?= Html::submitButton('Search', ['class' => 'btn btn-primary']) ?>
|
||||
<?= Html::resetButton('Reset', ['class' => 'btn btn-default']) ?>
|
||||
</div>
|
||||
|
||||
<?php ActiveForm::end(); ?>
|
||||
|
||||
</div>
|
@ -1,18 +0,0 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model backend\modules\document\models\DocumentFieldValue */
|
||||
|
||||
$this->title = 'Заполнить значение поля документа';
|
||||
$this->params['breadcrumbs'][] = ['label' => 'Document Field Values', 'url' => ['index']];
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
?>
|
||||
<div class="document-field-value-create">
|
||||
|
||||
<?= $this->render('_form', [
|
||||
'model' => $model,
|
||||
]) ?>
|
||||
|
||||
</div>
|
@ -1,43 +0,0 @@
|
||||
<?php
|
||||
|
||||
|
||||
use backend\modules\document\models\Document;
|
||||
use common\models\DocumentField;
|
||||
use yii\helpers\Html;
|
||||
use yii\grid\GridView;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $searchModel backend\modules\document\models\DocumentFieldValueSearch */
|
||||
/* @var $dataProvider yii\data\ActiveDataProvider */
|
||||
|
||||
$this->title = 'Значение полей документа';
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
?>
|
||||
<div class="document-field-value-index">
|
||||
|
||||
<p>
|
||||
<?= Html::a('Установить значение значение ', ['create'], ['class' => 'btn btn-success']) ?>
|
||||
</p>
|
||||
|
||||
<?= GridView::widget([
|
||||
'dataProvider' => $dataProvider,
|
||||
'filterModel' => $searchModel,
|
||||
'columns' => [
|
||||
['class' => 'yii\grid\SerialColumn'],
|
||||
|
||||
[
|
||||
'attribute' => 'field_id',
|
||||
'filter' => DocumentField::find()->select(['title', 'id'])->indexBy('id')->column(),
|
||||
'value' => 'field.title'
|
||||
],
|
||||
[
|
||||
'attribute' => 'document_id',
|
||||
'filter' => Document::find()->select(['title', 'id'])->indexBy('id')->column(),
|
||||
'value' => 'document.title'
|
||||
],
|
||||
'attribute' => 'value',
|
||||
|
||||
['class' => 'yii\grid\ActionColumn'],
|
||||
],
|
||||
]); ?>
|
||||
</div>
|
@ -1,20 +0,0 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model backend\modules\document\models\DocumentFieldValue */
|
||||
|
||||
$this->title = 'Изменение значения поля документа';
|
||||
$this->params['breadcrumbs'][] = ['label' => 'Document Field Values', 'url' => ['index']];
|
||||
$this->params['breadcrumbs'][] = ['label' => $model->id, 'url' => ['view', 'id' => $model->id]];
|
||||
$this->params['breadcrumbs'][] = 'Update';
|
||||
?>
|
||||
<div class="document-field-value-update">
|
||||
|
||||
|
||||
<?= $this->render('_form', [
|
||||
'model' => $model,
|
||||
]) ?>
|
||||
|
||||
</div>
|
@ -1,47 +0,0 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\ArrayHelper;
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\DetailView;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model backend\modules\document\models\DocumentFieldValue */
|
||||
|
||||
$this->title = $model->value;
|
||||
$this->params['breadcrumbs'][] = ['label' => 'Document Field Values', 'url' => ['index']];
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
\yii\web\YiiAsset::register($this);
|
||||
?>
|
||||
<div class="document-field-value-view">
|
||||
|
||||
|
||||
<p>
|
||||
<?= Html::a('Список', ['index', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
|
||||
<?= Html::a('Изменить', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
|
||||
<?= Html::a('Удалить', ['delete', 'id' => $model->id], [
|
||||
'class' => 'btn btn-danger',
|
||||
'data' => [
|
||||
'confirm' => 'Are you sure you want to delete this item?',
|
||||
'method' => 'post',
|
||||
],
|
||||
]) ?>
|
||||
</p>
|
||||
|
||||
<?= DetailView::widget([
|
||||
'model' => $model,
|
||||
'attributes' => [
|
||||
'id',
|
||||
[
|
||||
'attribute' => 'field_id',
|
||||
'value' => ArrayHelper::getValue($model, 'field.title')
|
||||
],
|
||||
[
|
||||
'attribute' => 'document_id',
|
||||
'value' => ArrayHelper::getValue($model, 'document.title')
|
||||
],
|
||||
'value',
|
||||
],
|
||||
|
||||
]) ?>
|
||||
|
||||
</div>
|
Reference in New Issue
Block a user