public function insert() { /** @var \app\services\GetArticle\ExtractorInterface $extractor */ $extractor = null; switch ($this->provider) { case 'verhosvet': $extractor = new \app\services\GetArticle\Verhosvet($this->url); break; case 'youtube': $extractor = new \app\services\GetArticle\YouTube($this->url); break; } if (is_null($extractor)) { throw new Exception('Не верный extractor'); } $row = $extractor->extract(); $articleObject = Article::insert(['header' => $row['header'], 'content' => $row['content'], 'description' => $row['description'], 'source' => $this->url, 'id_string' => Str::rus2translit($row['header']), 'date_insert' => gmdate('YmdHis'), 'tree_node_id_mask' => (new BitMask($this->tree_node_id_mask))->getMask()]); $this->id = $articleObject->getId(); $image = $row['image']; $imageContent = file_get_contents($image); $imageUrl = parse_url($image); $pathInfo = pathinfo($imageUrl['path']); $pathInfo['extension']; $fields = \cs\Widget\FileUpload2\FileUpload::save(File::content($imageContent), $pathInfo['extension'], ['image', 'Картинка', 0, 'string', 'widget' => [FileUpload::className(), ['options' => ['small' => \app\services\GsssHtml::$formatIcon]]]], $this); $articleObject->update($fields); return true; }
public function getImg($id) { $v = $this->getField('img' . $id, ''); if ($v == '') { throw new Exception('Не установлена картинка img' . $id); } return FileUpload::getOriginal($v); }
public function update($fieldsCols = null) { return parent::update(['beforeUpdate' => function ($fields, \app\models\Form\Blog $model) { if ($fields['description'] == '') { $fields['description'] = GsssHtml::getMiniText($fields['content']); } if ($model->is_add_image) { $fields['content'] = Html::tag('p', Html::img(\cs\Widget\FileUpload2\FileUpload::getOriginal($model->image), ['class' => 'thumbnail', 'style' => 'width:100%;', 'alt' => $fields['header']])) . $fields['content']; } return $fields; }]); }
public function update($fieldsCols = null) { $fields = parent::update(['beforeUpdate' => function ($fields, \app\models\Form\Article $model) { if ($fields['description'] == '') { $fields['description'] = GsssHtml::getMiniText($fields['content']); } }]); $item = \app\models\Article::find($this->id); if ($this->is_add_image) { $content = Html::tag('p', Html::img(\cs\Widget\FileUpload2\FileUpload::getOriginal($item->getImage()), ['class' => 'thumbnail', 'style' => 'width:100%;', 'alt' => $item->getField('header')])) . $item->getField('content'); $item->update(['content' => $content]); } }
public function insert($fieldsCols = null) { $row = parent::insert(['beforeInsert' => function ($fields) { $fields['date_insert'] = time(); $fields['id_string'] = Str::rus2translit($fields['header']); $fields['date'] = gmdate('Y-m-d'); return $fields; }]); $item = new \app\models\Praktice($row); $fields = ['content' => Html::tag('p', Html::img(\cs\Widget\FileUpload2\FileUpload::getOriginal($item->getField('image')), ['class' => 'thumbnail', 'style' => 'width:100%;'])) . $item->getField('content')]; if ($row['description'] == '') { $item = new NewsItem($row); $fields['description'] = GsssHtml::getMiniText($row['content']); } $item->update($fields); return $item; }
use yii\bootstrap\ActiveForm; use yii\captcha\Captcha; $this->title = 'Контакты'; $this->params['breadcrumbs'][] = $this->title; $page = \app\models\Page::find(1); ?> <div class="box"> <h1 class="title"><?php echo $page->getField('header'); ?> </h1> <div class="one-third"> <div class="outer none"><span class="inset"><a href="<?php echo \cs\Widget\FileUpload2\FileUpload::getOriginal($page->getField('image')); ?> " target="_blank"><img src="<?php echo $page->getField('image'); ?> " ></a></span></div> </div> <div class="two-third last"> <?php echo $page->getField('content'); ?> </div> <div class="clear"></div>
public function __construct($config = []) { self::$fields = [['name', 'Название', 1, 'string'], ['v', 'Напряжение', 1, 'integer'], ['kvt', 'Мощность', 1, 'integer'], ['price', 'Цена', 0, 'integer'], ['image', 'Картинка', 0, 'string', 'widget' => [FileUpload::className(), ['options' => ['small' => [370, 370, \cs\Widget\FileUpload2\FileUpload::MODE_THUMBNAIL_CUT]]]]], ['content', 'Описание', 0, 'string', 'widget' => ['cs\\Widget\\HtmlContent\\HtmlContent', []]]]; parent::__construct($config); }
function __construct($fields = []) { static::$fields = [['name', 'Название', 1, 'string'], ['sub_name', 'Название2', 0, 'string'], ['content', 'Подробности', 0, 'string', 'widget' => ['cs\\Widget\\HtmlContent\\HtmlContent', []]], ['link', 'Ссылка', 1, 'url'], ['tree_node_id', 'Раздел', 0, 'integer', 'widget' => ['cs\\Widget\\TreeSelect\\TreeSelect', ['tableName' => 'gs_unions_tree']]], ['description', 'Описание', 0, 'string'], ['group_link_facebook', 'Ссылка на Facebook', 0, 'string'], ['group_link_vkontakte', 'Ссылка на Vkontakte', 0, 'string'], ['group_link_youtube', 'Ссылка на Youtube', 0, 'string'], ['group_link_google', 'Ссылка на Google', 0, 'string'], ['img', 'Картинка', 0, 'string', 'widget' => [FileUpload::className(), ['options' => ['small' => \app\services\GsssHtml::$formatIcon, 'extended' => ['share' => [470 * 2, 245 * 2, FileUpload::MODE_THUMBNAIL_CUT]]]]]]]; parent::__construct($fields); }
private function drawDetailView_processField($field) { if (ArrayHelper::keyExists('widget', $field)) { $className = ArrayHelper::getValue($field, 'widget.0', ''); if ($className != '') { if (method_exists($className, 'onDraw')) { return $className::onDraw($field, $this); } } } if (isset($field['drawDetailView'])) { $method = $field['drawDetailView']; return call_user_func($method, $this, $field); } if (ArrayHelper::keyExists('type', $field)) { $options = []; if (is_array($field['type'])) { $name = $field['type'][0]; if (isset($field['type'][1])) { $options = $field['type'][1]; } } else { $name = $field['type']; } $fieldName = $field[self::POS_DB_NAME]; switch ($name) { case 'place': return \cs\models\Place::initFromModel($this, $fieldName); case 'radioList': $value = $this->{$fieldName}; return $options[$value]; case 'file': return \cs\Widget\FileUpload2\FileUpload::drawDetailView($this, $field); case 'checkbox': $value = $this->{$fieldName}; if (is_null($value)) { return ''; } if ($value == 0) { return 'Нет'; } if ($value == 1) { return 'Да'; } } } if (isset($field[self::POS_RULE])) { if ($field[self::POS_RULE] != '') { $dbName = $field[self::POS_DB_NAME]; switch ($field[self::POS_RULE]) { case 'string': return $this->{$dbName}; case 'url': return Html::a($this->{$dbName}, $this->{$dbName}); case 'integer': return $this->{$dbName}; case 'date': return $this->{$dbName}; } } } }
function __construct($fields = []) { static::$fields = [['header', 'Название', 1, 'string'], ['description', 'Описание краткое', 0, 'string'], ['content', 'Полное описание', 0, 'string', 'widget' => ['cs\\Widget\\HtmlContent\\HtmlContent', []]], ['parent_id', 'Родительская ветка', 0, 'integer'], ['image', 'Картинка', 0, 'string', 'widget' => [FileUpload::className(), ['options' => ['small' => \app\services\GsssHtml::$formatIcon]]]]]; parent::__construct($fields); }
</p> <?php } ?> <?php } ?> <hr> <?php echo \app\services\Page::linkToSite($item->getField('link')); ?> <?php echo $this->render('../blocks/share', ['image' => \cs\Widget\FileUpload2\FileUpload::getOriginal(\yii\helpers\Url::to($item->getField('img'), true), false), 'url' => \yii\helpers\Url::current([], true), 'title' => $item->getField('name'), 'description' => trim(\cs\services\Str::sub(strip_tags($item->getField('description')), 0, 200))]); //\cs\services\VarDumper::dump($category); ?> <?php if ($item->hasShop() && \yii\helpers\ArrayHelper::getValue(Yii::$app->params, 'isShop', 0) == 1) { ?> <a class="btn btn-primary" href="<?php echo \yii\helpers\Url::to(['union_shop/index', 'id' => $item->getId(), 'category' => $category->getField('id_string')]); ?> ">Магазин</a> <?php } ?> </div>
function __construct($fields = []) { static::$fields = [['title', 'Название', 1, 'string'], ['file', 'Файл', 1, 'default', 'widget' => [FileUpload::className(), ['options' => ['small' => [200, 200, \cs\Widget\FileUpload2\FileUpload::MODE_THUMBNAIL_CUT]]]]]]; parent::__construct($fields); }
<img src="<?php echo $item['image']; ?> " width="100%" class="thumbnail"> </a> </div> <div class="col-lg-8"> <p><?php echo $item['description']; ?> </p> <hr> <p><?php echo Yii::$app->formatter->asDecimal($item['price']); ?> </p> <button class="btn btn-default btn-lg buttonAdd" style="100%">Добавить</button> </div> </div> <?php } ?> <hr> <?php echo $this->render('../blocks/share', ['image' => \cs\Widget\FileUpload2\FileUpload::getOriginal(Url::to($union->getImage(), true), false), 'url' => Url::current([], true), 'title' => $union->getName() . '. Магазин', 'description' => 'ff']); ?> </div> </div>
<?php echo $item->getField('content'); ?> </div> <!-- End Post --> </div> <div class="sidebar box"> <div class="sidebox widget"> <a href="/"><img src="/images/home1.png" width="20"/><br><br></a> <h3 class="widget-title"> Поиск</h3> <form class="searchform" method="get" action="/search"> <input type="text" name="term" value="Введите слово ..." onFocus="this.value=''" onBlur="this.value='Введите слово ...'"/> </form> </div> </div> <div class="clear"></div> <div class="intro"> </div> <?php echo $this->render('../blocks/share', ['url' => \yii\helpers\Url::current([], true), 'image' => \cs\Widget\FileUpload2\FileUpload::getOriginal($item->getImage()), 'title' => $this->title, 'description' => \app\services\GsssHtml::getMiniText($item->getField('content'))]);
function __construct($fields = []) { static::$fields = [['html', 'HTML', 0, 'string'], ['img1', 'Картинка 1', 0, 'string', [], '1900x1080 JPG', 'widget' => [FileUpload::className(), ['options' => ['small' => [200, 200]]]]], ['img2', 'Картинка 2', 0, 'string', [], '1900x1080 JPG', 'widget' => [FileUpload::className(), ['options' => ['small' => [200, 200]]]]], ['img3', 'Картинка 3', 0, 'string', [], '1900x1080 JPG', 'widget' => [FileUpload::className(), ['options' => ['small' => [200, 200]]]]]]; parent::__construct($fields); }
function __construct($fields = []) { static::$fields = [['name_first', 'Имя', 1, 'string'], ['name_last', 'Фамилия', 0, 'string'], ['avatar', 'Картинка', 0, 'string', 'widget' => [FileUpload::className(), ['options' => ['small' => \app\services\GsssHtml::$formatIcon]]]]]; parent::__construct($fields); }
<h1 class="page-header"><?php echo $this->title; ?> </h1> </div> <div class="col-lg-12"> <div class="col-lg-4 col-lg-offset-4"> <p class="text-center"> <img class="thumbnail" src="<?php echo $item->getField('image'); ?> " width="100%" alt=""> </p> </div> </div> <div class="col-lg-12"> <div class="col-lg-10 col-lg-offset-1"> <?php echo $item->getField('content'); ?> <hr> <?php echo $this->render('../blocks/share', ['image' => $item->getField('image') != '' ? Url::to(\cs\Widget\FileUpload2\FileUpload::getOriginal($item->getField('image')), true) : '', 'url' => Url::current([], true), 'title' => $item->getField('name'), 'description' => trim(\cs\services\Str::sub(strip_tags($item->getField('content')), 0, 200))]); ?> </div> </div> </div>
echo $product->getImage(); ?> "> </div> <div class="col-lg-8"> <p><?php echo $product->getField('content'); ?> </p> <hr> <p>Цена: <?php echo Yii::$app->formatter->asDecimal($product->getField('price'), 0); ?> руб</p> <hr> <p><button class="btn btn-default" id="addToCart" data-id="<?php echo $product->getId(); ?> ">В корзину</button></p> <hr> <?php echo $this->render('../blocks/share', ['image' => \cs\Widget\FileUpload2\FileUpload::getOriginal(Url::to($product->getImage(), true), false), 'url' => Url::current([], true), 'title' => $product->getField('name'), 'description' => 'ff']); ?> </div> </div>
/** * Добавить послание из GetArticle * * @param \app\services\GetArticle\ExtractorInterface $extractor * * @return static * @throws \yii\base\Exception */ public static function insertExtractorInterface($extractor) { $row = $extractor->extract(); if (is_null($row['header'])) { throw new Exception('Нет заголовка'); } if ($row['header'] == '') { throw new Exception('Нет заголовка'); } if (is_null($row['description'])) { throw new Exception('Нет описания'); } if ($row['description'] == '') { throw new Exception('Нет описания'); } $fields = ['header' => $row['header'], 'content' => $row['content'], 'description' => $row['description'], 'source' => $extractor->getUrl(), 'id_string' => Str::rus2translit($row['header']), 'date_insert' => gmdate('YmdHis'), 'date' => gmdate('Ymd'), 'img' => '']; $articleObject = self::insert($fields); $model = new \app\models\Form\Chenneling(); $model->id = $articleObject->getId(); $image = $row['image']; if ($image) { try { $imageContent = file_get_contents($image); $imageUrl = parse_url($image); $pathInfo = pathinfo($imageUrl['path']); $pathInfo['extension']; $fields = FileUpload::save(File::content($imageContent), $pathInfo['extension'], ['img', 'Картинка', 0, 'string', 'widget' => [FileUpload::className(), ['options' => ['small' => \app\services\GsssHtml::$formatIcon]]]], $model); $articleObject->update($fields); } catch (\Exception $e) { } } return $articleObject; }
function __construct($fields = []) { static::$fields = [['name', 'Название', 1, 'string'], ['content', 'Описание', 0, 'string', 'widget' => ['cs\\Widget\\HtmlContent\\HtmlContent', []]], ['description', 'Описание краткое', 0, 'string'], ['tickets_counter', 'Кол-во билетов в продукте', 0, 'integer'], ['price', 'Цена', 0, 'integer'], ['image', 'Картинка', 0, 'string', 'widget' => [FileUpload::className(), ['options' => ['small' => \app\services\GsssHtml::$formatIcon]]]]]; parent::__construct($fields); }
function __construct($fields = []) { static::$fields = [['name', 'Название', 0, 'string'], ['content', 'Описание', 0, 'string', 'widget' => ['cs\\Widget\\HtmlContent\\HtmlContent', []]], ['description', 'Описание краткое', 0, 'string'], ['image', 'Картинка', 0, 'string', 'widget' => [FileUpload::className(), ['options' => ['small' => \app\services\GsssHtml::$formatIcon]]]], ['tree_node_id_mask', 'Категории', 0, 'cs\\Widget\\CheckBoxListMask\\Validator', 'widget' => ['cs\\Widget\\CheckBoxListMask\\CheckBoxListMask', ['rows' => (new Query())->select(['id', 'name'])->from('bog_pictures_tree')->all()]]]]; parent::__construct($fields); }
function __construct($fields = []) { static::$fields = [['header', 'Название', 1, 'string'], ['content', 'Описание', 0, 'string', 'widget' => ['cs\\Widget\\HtmlContent\\HtmlContent', []]], ['description', 'Описание краткое', 0, 'string'], ['date', 'Дата', 0, 'default', 'widget' => ['cs\\Widget\\DatePicker\\DatePicker', ['dateFormat' => 'php:d.m.Y']]], ['video', 'Youtube ролик', 0, 'url', [], 'в формате https://www.youtube.com/embed/jQCfBYYO0XI'], ['image', 'Картинка', 0, 'string', 'widget' => [FileUpload::className(), ['options' => ['small' => \app\services\GsssHtml::$formatIcon, 'original' => [1010, 500, \cs\Widget\FileUpload2\FileUpload::MODE_THUMBNAIL_CUT]]]]]]; parent::__construct($fields); }
<?php if ($item['source'] != '') { ?> <?php echo Html::a('Ссылка на источник »', $item['source'], ['class' => 'btn btn-primary', 'target' => '_blank']); ?> <?php } ?> <?php } $image = $item['image']; ?> <?php echo $this->render('../blocks/share', ['image' => \cs\Widget\FileUpload2\FileUpload::getOriginal(Url::to($item['image'], true), false), 'url' => Url::current([], true), 'title' => $item['header'], 'description' => trim(Str::sub(strip_tags($item['content']), 0, 200))]); ?> <?php //= \app\modules\Comment\Service::render(\app\modules\Comment\Model::TYPE_ARTICLE, $item['id']); ?> </div> <div class="col-lg-4"> <?php if (\yii\helpers\ArrayHelper::getValue(Yii::$app->params, 'isMarketing', 0) == 1 && date('Y-m-d') < '2015-10-30') { ?> <?php echo $this->render('../blocks/reklama'); ?> <?php
protected static function getFields() { return [['avatar', 'Аватар', 0, 'file', ['mimeTypes' => 'image/jpeg, image/png'], 'widget' => [\cs\Widget\FileUpload2\FileUpload::className(), ['options' => ['small' => [300, 300, FileUpload::MODE_THUMBNAIL_OUTBOUND], 'original' => [3000, 3000], 'quality' => 80, 'folder' => 'users', 'serverName' => 'http://' . \cs\models\Client::getServerName()]]]], ['name_first', 'Имя', 1, 'string', ['min' => 1, 'max' => 100]], ['name_last', 'Фамилия', 1, 'string', ['min' => 1, 'max' => 100]], ['name_middle', 'Отчество', 1, 'string', ['min' => 1, 'max' => 100]], ['gender', 'Пол', 1, 'integer', 'type' => ['RadioList', ['list' => \cs\models\Client::$genderList, 'nullString' => 'Ничего не выбрано']]], ['phone', 'Телефон', 1, 'string', ['min' => 1, 'max' => 100], 'widget' => [\yii\widgets\MaskedInput::className(), ['mask' => '+7(999) 999-99-99']]], ['place', 'Место взятия кредита', 0, 'type' => 'place'], ['date_birth', 'Дата рождения', 1, 'date', ['format' => 'php:d.m.Y', 'min' => '01.01.1970', 'max' => 'now'], 'Формат дд.мм.гггг'], ['file_passport', 'Паспорт', 0, 'file', ['mimeTypes' => 'image/jpeg, image/png'], 'widget' => [\cs\Widget\FileUploadMany\FileUploadMany::className(), ['tableName' => 'cs_users']]], ['file_passport_ser', 'Паспорт. Серия', 1, 'string', ['min' => 1, 'max' => 4], 'widget' => [\yii\widgets\MaskedInput::className(), ['mask' => '9999']]], ['file_passport_number', 'Паспорт. Номер', 1, 'string', ['min' => 1, 'max' => 6], 'widget' => [\yii\widgets\MaskedInput::className(), ['mask' => '999999']]], ['file_passport_vidan_kem', 'Паспорт. Кем выдан?', 1, 'string', ['min' => 1, 'max' => 255]], ['file_passport_vidan_kogda', 'Паспорт. Когда выдан?', 1, 'date', ['format' => 'php:d.m.Y', 'min' => '01.01.1970', 'max' => 'now'], 'Формат дд.мм.гггг'], ['file_passport_registration_address', 'Паспорт. Адрес регистрации', 1, 'string', ['min' => 1, 'max' => 255]], ['file_passport_registration_date', 'Паспорт. Дата регистрации', 1, 'date', ['format' => 'php:d.m.Y', 'min' => '01.01.1970', 'max' => 'now'], 'Формат дд.мм.гггг'], ['s_file_2ndfl', 'Справка 2НДФЛ', 0, 'file', ['mimeTypes' => 'image/jpeg, image/png'], 'widget' => [\cs\Widget\FileUploadMany\FileUploadMany::className(), ['tableName' => 'cs_users']]], ['s_file_second_identy', 'Второй документ, удостоверяющий личность', 0, 'file', ['mimeTypes' => 'image/jpeg, image/png'], 'widget' => [\cs\Widget\FileUploadMany\FileUploadMany::className(), ['tableName' => 'cs_users']]], ['s_file_confirmation_payment', 'Документы, подтверждающие наличие первоначального взноса', 0, 'file', ['mimeTypes' => 'image/jpeg, image/png'], 'widget' => [\cs\Widget\FileUploadMany\FileUploadMany::className(), ['tableName' => 'cs_users']]], ['i_is_mat_kap', 'Есть материнский капитал?', 0, 'integer', 'type' => ['RadioList', ['list' => \cs\services\DataSets::$booleanList, 'nullString' => 'Ничего не выбрано']]], ['lives_place', 'Место проживания', 0, 'widget' => [Place::className(), []]], ['lives_place_address', 'Адрес', 0, 'string', ['max' => 255], 'Укажите только улицу'], ['lives_place_house', 'Дом', 0, 'integer'], ['snils_fotos', 'Фото снилса', 0, 'integer', 'widget' => [FileUploadMany::className(), []]], ['lives_place_korp', 'Корпус', 0, 'integer'], ['lives_place_kv', 'Квартира', 0, 'integer'], ['lives_is_same_as_file_passport_registration', 'Место жительсва совпвдает с местом прописки?', 1, 'integer', 'widget' => [RadioList::className(), ['list' => DataSets::$booleanList]]], ['file_passport_registration_place', 'Место регистрации', 0, 'integer', 'widget' => [Place::className()]], ['file_passport_registration_house', 'Квартира', 0, 'integer'], ['file_passport_registration_korp', 'Квартира', 0, 'integer'], ['file_passport_registration_kv', 'Квартира', 0, 'integer'], ['s_is_change_famaly_name', 'Меняли фамилию?', 0, 'integer', 'type' => ['RadioList', ['list' => \cs\services\DataSets::$booleanList]]], ['s_prevision_famaly_name', 'Прошлая фамилия', 0, 'string', ['min' => 1, 'max' => 45]], ['s_prevision_famaly_date', 'Прошлая фамилия. Дата смены', 0, 'date', ['format' => 'php:d.m.Y', 'min' => '01.01.1970', 'max' => 'now'], 'Формат дд.мм.гггг'], ['s_education', 'Образование', 0, 'string', ['min' => 1, 'max' => 255]], ['s_is_sud', 'Есть судимость?', 0, 'integer', 'type' => ['RadioList', ['list' => \cs\services\DataSets::$booleanList, 'nullString' => 'Ничего не выбрано']]], ['s_is_sud_neisp_resh', 'Наличие неисполненных решений судебных органов?', 0, 'integer', 'type' => ['RadioList', ['list' => \cs\services\DataSets::$booleanList, 'nullString' => 'Ничего не выбрано']]], ['s_is_sud_sud_isk', 'Наличие против Вас судебных исков?', 0, 'integer', 'type' => ['RadioList', ['list' => \cs\services\DataSets::$booleanList, 'nullString' => 'Ничего не выбрано']]], ['s_is_work_now', 'Работаете?', 1, 'integer', 'type' => ['RadioList', ['list' => \cs\services\DataSets::$booleanList, 'nullString' => 'Ничего не выбрано']]], ['s_work_now_name', 'Сведения о работе. - имя организации', 0, 'string', ['min' => 1, 'max' => 255]], ['s_work_now_kol_sotr', 'Сведения о работе. - количество сотрудников', 0, 'integer'], ['s_alt_income', 'Альтернативный источник дохода', 0, 'string', ['min' => 1, 'max' => 45]], ['s_is_childrens', 'Есть дети?', 0, 'integer', 'type' => ['RadioList', ['list' => \cs\services\DataSets::$booleanList, 'nullString' => 'Ничего не выбрано']]], ['s_is_guarantee', 'Есть залог?', 0, 'integer', 'type' => ['RadioList', ['list' => \cs\services\DataSets::$booleanList, 'nullString' => 'Ничего не выбрано']]], ['s_snils', 'СНИЛС', 0, 'string', ['min' => 1, 'max' => 45], 'widget' => [\yii\widgets\MaskedInput::className(), ['mask' => '999-999-999-99']]], ['s_auto', 'Транспортные средства', 0, 'string', ['min' => 1, 'max' => 255]], ['i_co_borrowers', 'Созаемщики', 0, 'string', [], '(ФИО, тел)', 'type' => ['textarea', ['rows' => 10]]], ['i_rodnie_list', 'Данные родственников', 0, 'string', [], '(ФИО, тел)', 'type' => ['textarea', ['rows' => 10]]], ['stage_last', 'Стаж на последнем месте работы', 0, 'integer', [], '(в мес)'], ['s_stage_all', 'Стаж весь', 0, 'string', ['min' => 1, 'max' => 45], '(в годах)'], ['status', 'Статус', 0, 'integer', 'type' => ['RadioList', ['list' => \cs\models\Client::$statusList, 'nullString' => 'Ничего не выбрано']]], ['s_marital_status', 'Семейное положение', 1, 'integer', 'type' => ['RadioList', ['list' => \cs\models\Client::$maritalStatusList, 'nullString' => 'Ничего не выбрано']]], ['s_home_type', 'проживание', 0, 'integer', 'type' => ['RadioList', ['list' => \cs\models\Client::$homeTypeList, 'nullString' => 'Ничего не выбрано']]], ['s_expense', 'Расходы', 0, 'string', ['min' => 1, 'max' => 45]], ['i_info_imush', 'Сведения об имуществе', 0, 'string', ['min' => 1, 'max' => 255], 'type' => ['textarea', ['rows' => 10]]]]; }
function __construct($fields = []) { static::$fields = [['name', 'Название', 1, 'string'], ['start_date', 'Старт. Дата', 1, 'widget' => ['cs\\Widget\\DatePicker\\DatePicker', ['dateFormat' => 'php:d.m.Y']]], ['start_time', 'Старт. Время', 0, 'string', [], 'формат чч:мм'], ['end_date', 'Старт. J', 1, 'widget' => ['cs\\Widget\\DatePicker\\DatePicker', ['dateFormat' => 'php:d.m.Y']]], ['end_time', 'Старт. Окончание', 0, 'string', [], 'формат чч:мм'], ['content', 'Описание', 0, 'string', 'widget' => ['cs\\Widget\\HtmlContent\\HtmlContent', []]], ['link', 'Ссылка', 0, 'url'], ['date', 'Дата', 1, 'string'], ['image', 'Картинка', 0, 'string', 'widget' => [FileUpload::className(), ['options' => ['small' => \app\services\GsssHtml::$formatIcon]]]]]; parent::__construct($fields); }
function __construct($fields = []) { static::$fields = [['name_first', 'Имя', 0, 'string'], ['name_last', 'Фамилия', 0, 'string'], ['name_middle', 'Отчество', 0, 'string'], ['content', 'Описание', 0, 'string', 'widget' => ['cs\\Widget\\HtmlContent\\HtmlContent', []]], ['description', 'Описание краткое', 0, 'string'], ['image', 'Картинка', 0, 'string', 'widget' => [FileUpload::className(), ['options' => ['small' => \app\services\GsssHtml::$formatIcon]]]], ['date_born', 'Дата прихода', 0, 'cs\\Widget\\DatePicker\\Validator', 'widget' => ['cs\\Widget\\DatePicker\\DatePicker', []]], ['date_death', 'Дата ухода', 0, 'cs\\Widget\\DatePicker\\Validator', 'widget' => ['cs\\Widget\\DatePicker\\DatePicker', []]]]; parent::__construct($fields); }
<p class="text-center">Принцип работы тренажера Birdly®</p> <p class="text-center"><img src="/images/controller/site/media/11990631_10208204145722207_6888214533972897372_n.jpg" class="img-center" style="border-radius: 10px; width:100%;"></p> <p class="text-center">Изображения</p> <?php \app\assets\SlideShow\Asset::register($this); ?> <div class="row"> <?php foreach (\app\models\Picture::query()->all() as $foto) { ?> <div class="col-sm-2"> <a href="<?php echo \cs\Widget\FileUpload2\FileUpload::getOriginal($foto['image']); ?> " rel="lightbox[example]" class="highslide" onclick="return hs.expand(this)"> <img src="<?php echo $foto['image']; ?> " alt="<?php echo $foto['name']; ?> " width="100%" style="margin-bottom: 20px;"> </a> </div> <?php } ?> </div>
<?php if ($item['source'] != '') { ?> <?php echo Html::a('Ссылка на источник »', $item['source'], ['class' => 'btn btn-primary', 'target' => '_blank']); ?> <?php } ?> <?php } $image = $item['img'] . ''; ?> <?php echo $this->render('../blocks/share', ['image' => $image != '' ? \cs\Widget\FileUpload2\FileUpload::getOriginal(Url::to($item['img'], true), false) : '', 'url' => Url::current([], true), 'title' => $item['header'], 'description' => $item['description']]); ?> <?php echo $this->render('../blocks/yandexMoney2'); ?> <!-- Комментарии --> <!-- --><?php //= \app\modules\Comment\Service::render(\app\modules\Comment\Model::TYPE_CHENNELING, $item['id']); ?> </div> <div class="col-lg-4"> <?php if (\yii\helpers\ArrayHelper::getValue(Yii::$app->params, 'isMarketing', 0) == 1 && date('Y-m-d') < '2015-10-30') { ?>
function __construct($fields = []) { static::$fields = [['name_first', 'Имя', 1, 'string'], ['mission', 'Миссия', 0, 'string'], ['name_last', 'Фамилия', 0, 'string'], ['gender', 'Пол', 0, 'integer'], ['avatar', 'Картинка', 0, 'string', 'widget' => [FileUpload::className(), ['options' => ['small' => \app\services\GsssHtml::$formatIcon]]]], ['birth_date', 'Дата рождения', 0, 'cs\\Widget\\DatePicker\\Validator', 'widget' => [\cs\Widget\DatePicker\DatePicker::className(), ['dateFormat' => 'php:d.m.Y']]]]; parent::__construct($fields); }
function __construct($fields = []) { static::$fields = [['header', 'Название', 1, 'string'], ['content', 'Описание', 0, 'string', 'widget' => ['cs\\Widget\\HtmlContent\\HtmlContent', []]], ['image', 'Картинка', 0, 'string', [], '288х443', 'widget' => [FileUpload::className(), ['options' => ['small' => [288, 443, \cs\Widget\FileUpload2\FileUpload::MODE_THUMBNAIL_CUT]]]]]]; parent::__construct($fields); }