note files data
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
use backend\modules\settings\models\AdditionalFields;
|
||||
use mihaildev\elfinder\InputFile;
|
||||
use unclead\multipleinput\MultipleInput;
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\ActiveForm;
|
||||
@ -36,12 +37,21 @@ use yii\widgets\ActiveForm;
|
||||
'options' => ['prompt' => 'Выберите']
|
||||
],
|
||||
[
|
||||
'name' => 'value',
|
||||
'name' => 'value',
|
||||
'title' => 'Значение',
|
||||
'enableError' => true,
|
||||
'type' => InputFile::className(),
|
||||
'options' => [
|
||||
'class' => 'input-priority'
|
||||
]
|
||||
'language' => 'ru',
|
||||
'controller' => 'elfinder',
|
||||
// вставляем название контроллера, по умолчанию равен elfinder
|
||||
// фильтр файлов, можно задать массив фильтров https://github.com/Studio-42/elFinder/wiki/Client-con..
|
||||
'name' => 'fields[value]',
|
||||
'id' => 'fields-value',
|
||||
'options' => ['class' => 'form-control itemImg', 'maxlength' => '255'],
|
||||
'buttonOptions' => ['class' => 'btn btn-primary'],
|
||||
'value' => $model->fields[0]['value'],
|
||||
'buttonName' => 'Выбрать файл',
|
||||
],
|
||||
],
|
||||
[
|
||||
'name' => 'order',
|
||||
|
0
backend/modules/notes/views/notes/index.php
Normal file → Executable file
0
backend/modules/notes/views/notes/index.php
Normal file → Executable file
0
backend/modules/notes/views/notes/update.php
Normal file → Executable file
0
backend/modules/notes/views/notes/update.php
Normal file → Executable file
8
backend/modules/notes/views/notes/view.php
Normal file → Executable file
8
backend/modules/notes/views/notes/view.php
Normal file → Executable file
@ -44,7 +44,13 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
'field.name:text:Поле',
|
||||
[
|
||||
'attribute' => 'value',
|
||||
'label' => 'Значение'
|
||||
'format' => 'raw',
|
||||
'value' => function ($model) {
|
||||
if ($model->type_file == 'file') {
|
||||
return $model->value . ' (' . Html::a('Скачать', $model->value, ['target' => '_blank', 'download' => 'download']) . ')';
|
||||
}
|
||||
return $model->value;
|
||||
}
|
||||
],
|
||||
],
|
||||
]); ?>
|
||||
|
Reference in New Issue
Block a user