public function run() { $this->genButton = Html::a(Icon::show('edit') . Yii::t('app', 'Generate'), '#', ['class' => 'btn btn-success', 'id' => 'btn-generate']); $parent_id = $this->model->main_category_id; $owner_id = $this->model->id; $this->addButton = Html::a(Icon::show('plus') . Yii::t('app', 'Add'), Url::toRoute(['/shop/backend-product/edit', 'parent_id' => $parent_id, 'owner_id' => $owner_id, 'returnUrl' => \app\backend\components\Helper::getReturnUrl()]), ['class' => 'btn btn-success', 'id' => 'btn-add']); if (!empty($this->footer)) { $this->footer = Html::tag('div', $this->addButton . ' ' . $this->genButton, ['class' => 'widget-footer']); } $this->object = Object::getForClass(get_class($this->model)); $rest_pg = (new Query())->select('id, name')->from(PropertyGroup::tableName())->where(['object_id' => $this->object->id])->orderBy('sort_order')->all(); $this->property_groups_to_add = []; foreach ($rest_pg as $row) { $this->property_groups_to_add[$row['id']] = $row['name']; } $optionGenerate = Json::decode($this->model->option_generate); if (null === PropertyGroup::findOne($optionGenerate['group'])) { $this->model->option_generate = $optionGenerate = null; } $groupModel = null; if (isset($optionGenerate['group'])) { $groupModel = PropertyGroup::findOne($optionGenerate['group']); $properties = Property::getForGroupId($optionGenerate['group']); } else { $group_ids = array_keys($this->property_groups_to_add); $group_id = array_shift($group_ids); $groupModel = PropertyGroup::findOne($group_id); $properties = Property::getForGroupId($group_id); } if (is_null($groupModel)) { $groupModel = new PropertyGroup(); } return $this->render($this->viewFile, ['model' => $this->model, 'form' => $this->form, 'groups' => $this->property_groups_to_add, 'groupModel' => $groupModel, 'properties' => $properties, 'optionGenerate' => $optionGenerate, 'footer' => $this->footer]); }
/** * @inheritdoc */ protected function renderDataCellContent($model, $key, $index) { $value = $this->getDataCellValue($model, $key, $index); $text = $this->grid->formatter->format($value, $this->format); $url = $this->createUrl($model, $key, $index); $options = $this->targetBlank ? ['target' => '_blank'] : []; return $value === null ? $this->grid->emptyCell : Html::a($text, $url, $options); }
public static function preNext() { $offset = max(0, \yii::$app->request->get('filter_offset', 0)); $limit = \yii::$app->request->get('filter_limit', 100); $q = \yii::$app->request->queryParams; $panel = '<div class="btn-group" role="group">' . Html::a("上一页", array_merge($q, [\yii::$app->controller->action->id, 'filter_limit' => $limit, 'filter_offset' => $offset - $limit > 0 ? $offset - $limit : 0]), ['class' => 'btn btn-default']) . Html::a("下一页", array_merge($q, [\yii::$app->controller->action->id, 'filter_limit' => $limit, 'filter_offset' => $offset + $limit]), ['class' => 'btn btn-default']) . '</div>'; return $panel; }
function sttPembukuan($model) { if ($model->STATUS == 0) { /*open*/ return Html::a('<i class="glyphicon glyphicon-ok"></i> proses', '#', ['class' => 'btn btn-success btn-xs', 'style' => ['width' => '100px'], 'title' => 'process']); } elseif ($model->STATUS == 1) { /*closing*/ return Html::a('<i class="fa fa-remove fa-md"></i> Closing', '#', ['class' => 'btn btn-danger btn-xs', 'style' => ['width' => '25px'], 'title' => 'Closing']); } }
function status($model) { if ($model->STT_DEFAULT == 0) { return Html::a('<i class="glyphicon glyphicon-retweet"></i> Non Aktif', '#', ['class' => 'btn btn-warning btn-xs', 'style' => ['width' => '100px'], 'title' => 'Detail']); } elseif ($model->STT_DEFAULT == 1) { return Html::a('<i class="glyphicon glyphicon-ok"></i> Aktif', '#', ['class' => 'btn btn-success btn-xs', 'style' => ['width' => '100px'], 'title' => 'Detail']); } else { return Html::a('<i class="glyphicon glyphicon-question-sign"></i> Unknown', '#', ['class' => 'btn btn-danger btn-xs', 'style' => ['width' => '100px'], 'title' => 'Detail']); } }
function tombolEditketerangan($model) { $title = Yii::t('app', ''); $options = ['id' => 'edit-keterangan', 'data-toggle' => "modal", 'data-target' => "#keterangan", 'class' => 'btn btn-info btn-xs']; $icon = '<span class="glyphicon glyphicon-save"></span>'; $label = $icon . ' ' . $title; $url = Url::toRoute(['/widget/berita/set-keterangan', 'id' => $model->KD_BERITA]); $content = Html::a($label, $url, $options); return $content; }
function statusRadius($model) { if ($model->sttKoordinat == 1) { return Html::a('<i class="glyphicon glyphicon-ok"></i> Suitable', '#', ['class' => 'btn btn-success btn-xs', 'style' => ['width' => '100px'], 'title' => 'Detail']); } elseif ($model->sttKoordinat == 2) { return Html::a('<i class="glyphicon glyphicon-time"></i> Deviate', '#', ['class' => 'btn btn-warning btn-xs', 'style' => ['width' => '100px'], 'title' => 'Detail']); } elseif ($model->sttKoordinat == 3) { return Html::a('<i class="glyphicon glyphicon-thumbs-down"></i> Missing', '#', ['class' => 'btn btn-danger btn-xs', 'style' => ['width' => '100px'], 'title' => 'Detail']); } }
function toExportExcel() { $title = Yii::t('app', 'Excel'); $options = ['id' => 'export-excel', 'class' => 'btn btn-default btn-sm']; $icon = '<span class="glyphicon glyphicon-search"></span>'; $label = $icon . ' ' . $title; $url = Url::toRoute(['#']); $content = Html::a($label, $url, $options); return $content; }
function tombolInvest() { $title = Yii::t('app', 'Account Investment'); $options = ['id' => 'account-invest', 'data-toggle' => "modal", 'data-target' => "#check-barang-umum", 'class' => 'btn btn-info btn-sm']; $icon = '<span class="glyphicon glyphicon-search"></span>'; $label = $icon . ' ' . $title; $url = Url::toRoute(['#']); $content = Html::a($label, $url, $options); return $content; }
function tombolInvestInput($id) { $title = Yii::t('app', 'Investment input'); $options = ['id' => 'input-invest', 'data-toggle' => "modal", 'data-target' => "#input-invest-actual", 'class' => 'btn btn-info btn-sm']; $icon = '<span class="glyphicon glyphicon-search"></span>'; $label = $icon . ' ' . $title; $url = Url::toRoute(['/purchasing/data-term/actual-review-add', 'id' => $id]); $content = Html::a($label, $url, $options); return $content; }
function kembali() { $title = Yii::t('app', ''); $options = ['id' => 'berita-reply-id', 'class' => 'btn-xs', 'title' => 'Back']; $icon = '<span class="fa fa-rotate-left fa-xs"> Back</span>'; $label = $icon . ' ' . $title; //$label = 'Reply'; $url = Url::toRoute('/widget/chat'); $content = Html::a($label, $url, $options); return $content; }
/** * Performance Employee * @author ptrnov <*****@*****.**> * @since 1.1 */ function tombolMap() { $title1 = Yii::t('app', 'Map'); $options1 = ['id' => 'performance']; $icon1 = '<span class="fa fa-graduation-cap fa-md"></span>'; $label1 = $icon1 . ' ' . $title1; $url1 = Url::toRoute(['/master/customers/esm-map']); //,'kd'=>$kd]); $content = Html::a($label1, $url1, $options1); return $content; }
function tombolCreate() { $title1 = Yii::t('app', 'Create'); $options1 = ['id' => 'modl', 'data-toggle' => "modal", 'data-target' => "#form2", 'class' => 'btn btn-success btn-sm']; $icon1 = '<i class="glyphicon glyphicon-plus"></i>'; $label1 = $icon1 . ' ' . $title1; $url1 = Url::toRoute(['/mastercrm/kota-customers-crm/createkota']); //,'kd'=>$kd]); $content = Html::a($label1, $url1, $options1); return $content; }
/** * Logoff * @author ptrnov <*****@*****.**> * @since 1.1 */ function tombolLentera() { $title1 = Yii::t('app', ' . . . read-more'); $options1 = ['id' => 'lentera', 'data-target' => "#dashboard-lentera", 'style' => 'color:rgba(255, 255, 19, 1)']; //$icon1 = '<span class="fa fa-power-off fa-lg"></span>'; $label1 = $title1; //$icon1 . ' ' . $title1; $url1 = Url::toRoute(['/sistem/user-profile/lentera']); //,'kd'=>$kd]); $content = Html::a($label1, $url1, $options1); return $content; }
function statusTerm($model) { if ($model['STATUS'] == 0) { /*New*/ return Html::a('<i class="fa fa-square-o fa-md"></i> New', '#', ['class' => 'btn btn-info btn-xs', 'style' => ['width' => '100px'], 'title' => 'New']); } elseif ($model['STATUS'] == 1) { /*Approved*/ return Html::a('<i class="fa fa-check-square-o fa-md"></i>Approved', '#', ['class' => 'btn btn-success btn-xs', 'style' => ['width' => '100px'], 'title' => 'Approved']); } elseif ($model['STATUS'] == 3) { /*REJECT*/ return Html::a('<i class="fa fa-remove fa-md"></i>Reject ', '#', ['class' => 'btn btn-danger btn-xs', 'style' => ['width' => '100px'], 'title' => 'Reject']); } }
function statusIssue($model) { if ($model->STATUS == 1) { /*REVIEW*/ return Html::a('<i class="fa fa-square-o fa-md"></i> REVIEW', '#', ['class' => 'btn btn-info btn-xs', 'style' => ['width' => '100px'], 'title' => 'Review']); } elseif ($model->STATUS == 2) { /*PROCESS*/ return Html::a('<i class="fa fa-check-square-o fa-md"></i> PROCESS', '#', ['class' => 'btn btn-success btn-xs', 'style' => ['width' => '100px'], 'title' => 'Process']); } elseif ($model->STATUS == 3) { /*CLODED*/ return Html::a('<i class="glyphicon glyphicon-remove"></i> CLOSED', '#', ['class' => 'btn btn-danger btn-xs', 'style' => ['width' => '100px'], 'title' => 'Closed']); } }
public function init() { if (!isset($this->resetLinkOptions['title'])) { $this->resetLinkOptions['title'] = Yii::t('user', 'Click here to reset your lost password.'); } Module::validateConfig($this->_module); $this->attributes += ['username' => ['type' => Form::INPUT_TEXT], 'password' => ['type' => Form::INPUT_PASSWORD], 'rememberMe' => ['type' => Form::INPUT_CHECKBOX]]; $resetLink = Html::a(Yii::t('user', 'Forgot password?'), Url::to($this->_module->actionSettings[Module::ACTION_RECOVERY]), $this->resetLinkOptions); if (!isset($this->buttons)) { $this->buttons = $resetLink . ' {submit}'; } $this->submitButtonOptions += ['label' => Yii::t('user', 'Login'), 'icon' => 'log-in', 'class' => 'btn btn-primary']; parent::init(); }
function statusIssue($model) { if ($model->STATUS == 1) { /*REVIEW*/ // return Html::a('<i class="fa fa-square-o fa-md"></i> REVIEW','#',['class'=>'btn btn-info btn-xs', 'style'=>['width'=>'100px'],'title'=>'Review']); return Html::button(Yii::t('app', 'Review'), ['value' => url::to(['link-berita', 'id' => $model->ID]), 'id' => 'modal-btn-issue', 'class' => "btn btn-info btn-xs", 'style' => ['width' => '100px']]); } elseif ($model->STATUS == 2) { /*PROCESS*/ return Html::a('<i class="fa fa-check-square-o fa-md"></i> OPEN', url::toRoute(['/widget/berita/detail-berita-open', 'id' => $model->ID_ISSUE_REF]), ['class' => 'btn btn-success btn-xs', 'style' => ['width' => '100px'], 'title' => 'Process']); } elseif ($model->STATUS == 3) { /*CLODED*/ return Html::a('<i class="glyphicon glyphicon-remove"></i> CLOSED', url::toRoute(['/widget/berita/detail-berita-open', 'id' => $model->ID_ISSUE_REF]), ['class' => 'btn btn-danger btn-xs', 'style' => ['width' => '100px'], 'title' => 'Closed']); } }
public function run() { $months = [0 => 'Январь', 1 => 'Февраль', 2 => 'Март', 3 => 'Апрель', 4 => 'Май', 5 => 'Июнь', 6 => 'Июль', 7 => 'Август', 8 => 'Сентябрь', 9 => 'Октябрь', 10 => 'Ноябрь', 11 => 'Декабрь']; $time = time(); $request = \Yii::$app->request; $time = $request->get('time', $time); $month = date('n', $time); $year = date('Y', $time); echo '<div class="b-calendar b-calendar--along">'; echo '<h4 class="text-center">'; echo Html::a(Html::icon('triangle-left'), '?time=' . strtotime('-1 month', $time), ['class' => 'pull-left']); echo $months[$month - 1] . ' ' . $year; echo Html::a(Html::icon('triangle-right'), '?time=' . strtotime('+1 month', $time), ['class' => 'pull-right']); echo '</h4>'; echo $this->draw_calendar($month, 2016); echo '</div>'; }
public function run() { if ($imageUrl = $this->model->getFileUrl($this->attribute)) { ?> <div class="file-input"> <div class="file-preview"> <div class="file-preview-thumbnails"> <div class="file-preview-frame"> <?php echo Html::img($imageUrl, ['class' => 'file-preview-image', 'alt' => \Yii::t('gromver.platform', 'File not found.')]); ?> </div> </div> <div class="clearfix"></div> </div> </div> <?php } if ($imageUrl == null) { // to show FileInput only for new upload echo KartikFileInput::widget(['model' => $this->model, 'attribute' => $this->attribute, 'options' => $this->options, 'pluginOptions' => $this->pluginOptions]); } else { FileInputAsset::register($this->getView()); ?> <div class="file-input"> <div class="input-group"> <div class="form-control file-caption "> <span class="glyphicon glyphicon-file"></span> <span class="file-caption-name"><?php echo $this->model->getFileName($this->attribute); ?> </span> </div> <div class="input-group-btn"> <?php echo Html::a('Remove Image', [$this->deleteAction, 'pk' => $this->model->getPrimaryKey(), 'attribute' => $this->attribute], ['class' => 'btn btn-danger', 'data-method' => 'post']); ?> </div> </div> </div> <?php } }
protected function initDefaultButtons() { if (!isset($this->buttons['view'])) { $this->buttons['view'] = function ($url, $model, $key) { $options = array_merge(['title' => Yii::t('yii', 'View'), 'aria-label' => Yii::t('yii', 'View'), 'data-pjax' => '0'], $this->buttonOptions); return Html::a('<i class="material-icons">visibility</i>', $url, $options); }; } if (!isset($this->buttons['update'])) { $this->buttons['update'] = function ($url, $model, $key) { $options = array_merge(['title' => Yii::t('yii', 'Update'), 'aria-label' => Yii::t('yii', 'Update'), 'data-pjax' => '0'], $this->buttonOptions); return Html::a('<i class="material-icons">mode_edit</i>', $url, $options); }; } if (!isset($this->buttons['delete'])) { $this->buttons['delete'] = function ($url, $model, $key) { $options = array_merge(['title' => Yii::t('yii', 'Delete'), 'aria-label' => Yii::t('yii', 'Delete'), 'data-confirm' => Yii::t('yii', 'Are you sure you want to delete this item?'), 'data-method' => 'post', 'data-pjax' => '0'], $this->buttonOptions); return Html::a('<i class="material-icons">delete</i>', $url, $options); }; } }
public function run() { $rb = Yii::$app->user->can(Rbac::PERMISSION_ADMIN_PANEL); $model = new $this->model(); $points = $model::find()->all(); if (count($points) > 0) { $geoObject = ['type' => 'FeatureCollection']; foreach ($points as $point) { if ($rb) { $delete = '<hr>' . Html::a('<i class="material-icons">create</i> Редактировать', ['/admin/default/map-edit', 'id' => $point->id]) . ' ' . Html::a('<i class="material-icons">delete</i> Удалить', ['/admin/default/map-delete', 'id' => $point->id]); } else { $delete = ''; } $geoObject['features'][] = ['type' => 'Feature', 'id' => $point->id, 'geometry' => ['type' => 'Point', 'coordinates' => explode(',', $point->point)], 'properties' => ['balloonContent' => $point->body . $delete, 'iconContent' => $point->title], 'options' => ['id' => $point->id, 'preset' => $point->preset]]; } } else { $geoObject = false; } $view = $this->view; $view->registerJs("var geoObj = " . Json::encode($geoObject) . ";", $view::POS_HEAD); MapInputAsset::register($view); return Html::tag('div', '', ['id' => 'map', 'style' => "height:{$this->height}px"]); }
* @var $form \yii\widgets\ActiveForm * @var $label string * @var $model \app\properties\AbstractModel * @var $multiple boolean * @var $property_id integer * @var $property_key string * @var $this \app\properties\handlers\Handler * @var $values array */ use app\models\Property; use kartik\helpers\Html; use yii\helpers\Url; ?> <dl> <?php if (count($values->values) == 0) { return; } $property = Property::findById($property_id); echo Html::tag('dt', $property->name); foreach ($values->values as $val) { if (isset($val['value'])) { if ($model->getOwnerModel()->className() === \app\modules\shop\models\Order::className()) { echo Html::tag('dd', Html::a($val['value'], 'http://' . Yii::$app->getModule('core')->serverName . Url::to(['/shop/backend-order/download-file', 'key' => $val['key'], 'orderId' => $values->object_model_id]))); } else { echo Html::tag('dd', Html::a($val['value'], 'http://' . Yii::$app->getModule('core')->serverName . Url::to(['/backend/form/download', 'key' => $val['key'], 'submissionId' => $values->object_model_id]))); } } } ?> </dl>
?> <?php if ($model->api0->name !== 'core') { ?> <p> <?php echo Html::a(Html::icon('plus', ['data' => ['toggle' => 'tooltip', 'placement' => 'right'], 'title' => 'Create Property']), ['properties/create', 'id' => $model->id], ['class' => 'btn btn-success']); ?> </p> <h4>New Properties</h4> <?php echo GridView::widget(['tableOptions' => ['class' => 'text-center'], 'headerRowOptions' => ['class' => 'text-center'], 'dataProvider' => $dataProviderExceptBasic, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['attribute' => 'name', 'hAlign' => GridView::ALIGN_CENTER, 'vAlign' => GridView::ALIGN_MIDDLE], ['attribute' => 'description', 'hAlign' => GridView::ALIGN_CENTER, 'vAlign' => GridView::ALIGN_MIDDLE], ['attribute' => 'type', 'hAlign' => GridView::ALIGN_CENTER, 'vAlign' => GridView::ALIGN_MIDDLE], ['attribute' => 'createdBy.username', 'value' => function ($model, $key, $index, $widget) { return Html::a($model->createdBy->username, ['/profile/view', 'id' => $model->createdBy->id]); }, 'format' => 'raw', 'hAlign' => GridView::ALIGN_CENTER, 'vAlign' => GridView::ALIGN_MIDDLE], ['attribute' => 'created_at', 'format' => 'date', 'hAlign' => GridView::ALIGN_CENTER, 'vAlign' => GridView::ALIGN_MIDDLE], ['class' => 'kartik\\grid\\ActionColumn', 'controller' => 'properties']]]); ?> <?php echo $this->render('_formMethods', ['model' => $model, 'methodDropdownList' => $methodDropdownList, 'cbsDropdownList' => $cbsDropdownList]); ?> <!-- --><?php // $this->render('_formCBS', [ // 'model' => $model, // 'cbsDropdownList' => $cbsDropdownList // ]) ?> <?php }
/** * Logoff * @author ptrnov <*****@*****.**> * @since 1.1 */ function tombolLogoff() { $title1 = Yii::t('app', 'Logout'); $options1 = ['id' => 'logout', 'data-target' => "#profile-logout"]; $icon1 = '<span class="fa fa-power-off fa-lg"></span>'; $label1 = $icon1 . ' ' . $title1; $url1 = Url::toRoute(['/sistem/user-profile/logoff']); //,'kd'=>$kd]); $content = Html::a($label1, $url1, $options1); return $content; }
/** * Gets the default button * * @param string $type the button type * @param string $icon the glyphicon icon suffix name * @param string $title the title to display on hover * * @return string */ protected function getDefaultButton($type, $icon, $title) { $buttonOptions = $type . 'Options'; $options = $this->{$buttonOptions}; $label = ArrayHelper::remove($options, 'label', "<i class='glyphicon glyphicon-{$icon}'></i>"); if (empty($options['class'])) { $options['class'] = 'kv-action-btn'; } Html::addCssClass($options, 'kv-btn-' . $type); $options = ArrayHelper::merge(['title' => $title], $options); if ($this->tooltips) { $options['data-toggle'] = 'tooltip'; $options['data-container'] = 'body'; } switch ($type) { case 'reset': return Html::resetButton($label, $options); case 'save': return Html::submitButton($label, $options); case 'delete': $url = ArrayHelper::remove($options, 'url', '#'); return Html::a($label, $url, $options); } $options['type'] = 'button'; return Html::button($label, $options); }
use kartik\helpers\Html; use kartik\grid\GridView; /* @var $this yii\web\View */ /* @var $searchModel app\models\ObjectsSearch */ /* @var $dataProvider yii\data\ActiveDataProvider */ $this->title = 'Objects'; $this->params['breadcrumbs'][] = $this->title; ?> <div class="objects-index"> <h1><?php echo Html::encode($this->title); ?> </h1> <?php // echo $this->render('_search', ['model' => $searchModel]); ?> <?php echo GridView::widget(['tableOptions' => ['class' => 'text-center'], 'headerRowOptions' => ['class' => 'text-center'], 'rowOptions' => ['class' => 'text-center'], 'dataProvider' => $dataProvider, 'columns' => [['class' => 'kartik\\grid\\SerialColumn'], ['attribute' => 'name', 'value' => function ($model, $key, $index, $widget) { return Html::a($model->name, ['view', 'id' => $model->id]); }, 'format' => 'raw', 'hAlign' => GridView::ALIGN_CENTER, 'vAlign' => GridView::ALIGN_MIDDLE], ['attribute' => 'description', 'hAlign' => GridView::ALIGN_CENTER, 'vAlign' => GridView::ALIGN_MIDDLE], ['attribute' => 'api0.name', 'hAlign' => GridView::ALIGN_CENTER, 'vAlign' => GridView::ALIGN_MIDDLE], ['attribute' => 'inherited0.name', 'hAlign' => GridView::ALIGN_CENTER, 'vAlign' => GridView::ALIGN_MIDDLE], ['attribute' => 'privacy', 'hAlign' => GridView::ALIGN_CENTER, 'vAlign' => GridView::ALIGN_MIDDLE], ['attribute' => 'createdBy.username', 'value' => function ($model, $key, $index, $widget) { return Html::a($model->createdBy->username, ['/profile/view', 'id' => $model->createdBy->id]); }, 'format' => 'raw', 'hAlign' => GridView::ALIGN_CENTER, 'vAlign' => GridView::ALIGN_MIDDLE], ['attribute' => 'created_at', 'format' => 'date', 'hAlign' => GridView::ALIGN_CENTER, 'vAlign' => GridView::ALIGN_MIDDLE], ['attribute' => '', 'label' => 'Votes', 'value' => function ($model, $key, $index, $widget) { return Html::a($model->votes_up, ['objects/voteup', 'id' => $model->id, 'redirect' => 'index'], ['class' => 'like glyphicon glyphicon-thumbs-up nounderline', 'data' => ['toggle' => 'tooltip', 'placement' => 'right'], 'title' => 'Vote me Up']) . ' / ' . Html::a($model->votes_down, ['objects/votedown', 'id' => $model->id, 'redirect' => 'index'], ['class' => 'unlike glyphicon glyphicon-thumbs-down nounderline', 'data' => ['toggle' => 'tooltip', 'placement' => 'right'], 'title' => 'Vote me Down']); }, 'format' => 'raw', 'hAlign' => GridView::ALIGN_CENTER, 'vAlign' => GridView::ALIGN_MIDDLE], ['class' => 'kartik\\grid\\ActionColumn']]]); ?> </div>
<?php /* * GRID BERITA ACARA * @author ptrnov [piter@lukison.com] * @since 1.2 */ $actionClass = 'btn btn-info btn-xs'; $attDinamik = []; /*GRIDVIEW ARRAY FIELD HEAD*/ $headColomnBT = [['ID' => 0, 'ATTR' => ['FIELD' => 'KD_BERITA', 'SIZE' => '10px', 'label' => 'KD_BERITA', 'align' => 'left', 'warna' => '97, 211, 96, 0.3']], ['ID' => 1, 'ATTR' => ['FIELD' => 'JUDUL', 'SIZE' => '10px', 'label' => 'SUBJECT', 'align' => 'left', 'warna' => '97, 211, 96, 0.3']], ['ID' => 2, 'ATTR' => ['FIELD' => 'KD_REF', 'SIZE' => '10px', 'label' => 'Kode Referensi', 'align' => 'left', 'warna' => '97, 211, 96, 0.3']], ['ID' => 3, 'ATTR' => ['FIELD' => 'CREATE_AT', 'SIZE' => '10px', 'label' => 'Tanggal', 'align' => 'left', 'warna' => '97, 211, 96, 0.3']], ['ID' => 4, 'ATTR' => ['FIELD' => 'corphistory', 'SIZE' => '10px', 'label' => 'CORP', 'align' => 'left', 'warna' => '97, 211, 96, 0.3']], ['ID' => 5, 'ATTR' => ['FIELD' => 'depthistory', 'SIZE' => '10px', 'label' => 'DEPT', 'align' => 'left', 'warna' => '97, 211, 96, 0.3']]]; $gvHeadColomnBT = ArrayHelper::map($headColomnBT, 'ID', 'ATTR'); /*GRIDVIEW ARRAY ACTION*/ $attDinamik[] = ['class' => 'kartik\\grid\\ActionColumn', 'dropdown' => true, 'template' => '{view}', 'dropdownOptions' => ['class' => 'pull-left dropdown', 'style' => ['disable' => true]], 'dropdownButton' => ['class' => $actionClass], 'buttons' => ['view' => function ($url, $model, $key) { return '<li>' . Html::a('<span class="fa fa-random fa-dm"></span>' . Yii::t('app', 'view'), ['/widget/berita/detail-berita', 'KD_BERITA' => $model->KD_BERITA], ['id' => 'berita-acara-view-id-history']) . '</li>' . PHP_EOL; }], 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '10px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt', 'background-color' => 'rgba(97, 211, 96, 0.3)']], 'contentOptions' => ['style' => ['text-align' => 'center', 'width' => '10px', 'height' => '10px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt']]]; /*GRIDVIEW ARRAY ROWS*/ foreach ($gvHeadColomnBT as $key => $value[]) { if ($value[$key]['FIELD'] == 'corphistory') { $attDinamik[] = ['attribute' => $value[$key]['FIELD'], 'label' => $value[$key]['label'], 'filterType' => GridView::FILTER_SELECT2, 'filter' => $selectCorp, 'filterWidgetOptions' => ['pluginOptions' => ['allowClear' => true]], 'filterInputOptions' => ['placeholder' => 'select kd corp'], 'hAlign' => 'right', 'vAlign' => 'middle', 'noWrap' => true, 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => $value[$key]['FIELD'], 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt', 'background-color' => 'rgba(' . $value[$key]['warna'] . ')']], 'contentOptions' => ['style' => ['text-align' => $value[$key]['align'], 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt']], 'width' => '12px']; } elseif ($value[$key]['FIELD'] == 'depthistory') { $attDinamik[] = ['attribute' => $value[$key]['FIELD'], 'label' => $value[$key]['label'], 'filterType' => GridView::FILTER_SELECT2, 'filter' => $selectdept, 'filterWidgetOptions' => ['pluginOptions' => ['allowClear' => true]], 'filterInputOptions' => ['placeholder' => 'select departemen'], 'hAlign' => 'right', 'vAlign' => 'middle', 'noWrap' => true, 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => $value[$key]['FIELD'], 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt', 'background-color' => 'rgba(' . $value[$key]['warna'] . ')']], 'contentOptions' => ['style' => ['text-align' => $value[$key]['align'], 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt']], 'width' => '12px']; } elseif ($value[$key]['FIELD'] == 'CREATE_AT') { $attDinamik[] = ['attribute' => $value[$key]['FIELD'], 'label' => $value[$key]['label'], 'value' => function ($model) { /* * max String Disply * @author ptrnov <*****@*****.**> */ return $model->CREATED_ATCREATED_BY; }, 'filterType' => GridView::FILTER_DATETIME, 'filterWidgetOptions' => ['pluginOptions' => ['autoclose' => true, 'todayHighlight' => true]], 'hAlign' => 'right', 'vAlign' => 'middle', 'noWrap' => true, 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => $value[$key]['FIELD'], 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt', 'background-color' => 'rgba(' . $value[$key]['warna'] . ')']], 'contentOptions' => ['style' => ['text-align' => $value[$key]['align'], 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt']], 'width' => '12px'];
\t // alert('Coordinates: ' + jsEvent.pageX + ',' + jsEvent.pageY); \t\t//alert('View: ' + view.name); \t\t// change the border color just for fun \t\t\$(this).css('border-color', 'red'); \t} EOF; /* * VIEW SCHEDULE ACTUAL * @author ptrnov [ptr.nov@gmail.com] * @since 1.2 */ $calenderActual = yii2fullcalendar\yii2fullcalendar::widget(['id' => 'scdl-actual', 'options' => ['lang' => 'id'], 'ajaxEvents' => Url::to(['/mastercrm/draft-plan/jsoncalendar-actual']), 'clientOptions' => ['selectable' => true, 'selectHelper' => true, 'droppable' => true, 'editable' => true, 'firstDay' => '0', 'selectHelper' => true, 'eventClick' => new JsExpression($JSEventClick)]]); $btn_exportActual = Html::a('<i class="fa fa-file-excel-o"></i> Export Excel', '/mastercrm/draft-plan/export-modal?flag=0', ['data-toggle' => "modal", 'data-target' => "#modal-export-actual", 'class' => 'btn btn-info btn-sm']); $btn_set_outcase = Html::a('<i class="fa fa-magic"></i> SET OUT CASE', '/mastercrm/draft-plan/set-out-valid', ['id' => 'set-out-case-id', 'data-toggle' => "modal", 'data-target' => "#modal-Case", 'class' => 'btn btn-warning btn-sm']); $btn_sync = Html::a('<i class="fa fa-exchange"></i> Syncronize a month', '/mastercrm/draft-plan/set-sync', ['id' => 'sync-approved', 'data-toggle' => "modal", 'data-target' => "#modal-sync", 'class' => 'btn btn-danger btn-sm']); $info = "<div id =actual><table class='table'><thead>\r\n <tr>\r\n <th>#</th>\r\n <th>TGL</th>\r\n <th>CUSTOMERS</th>\r\n <th>LAYER</th>\r\n <th>STATUS</th>\r\n </tr>\r\n </thead> <tbody>\r\n </tbody>\r\n </table></div>"; $viewDetailactual = Html::panel(['heading' => '<div style="width:160px">DETAIl GROUP ACTUAL </div>' . ' ' . '<div style="float:right; margin-top:-22px;margin-right:-12px;">' . $btn_set_outcase . '</div>', 'body' => $info], Html::TYPE_DANGER); $vwScdlActual = Html::panel(['heading' => '<div style="width:160px">' . $btn_exportActual . '</div>' . ' ' . '<div style="float:right; margin-top:-32px;margin-right:0px;">' . $btn_sync . '</div>', 'body' => $ptr_spinerActual . $calenderActual], Html::TYPE_SUCCESS); ?> <div class="row"> <div class="col-sm-7 col-md-7 col-lg-7" style="font-family: verdana, arial, sans-serif ;font-size: 8pt"> <?php echo $vwScdlActual; ?> </div> <div class="col-sm-5 col-md-5 col-lg-5"> <?php echo $viewDetailactual; ?> </div>
<?php /* @var $this yii\web\View */ /* @var $model app\modules\shop\models\CategoryGroup */ use app\backend\widgets\BackendWidget; use kartik\helpers\Html; use kartik\icons\Icon; use kartik\widgets\ActiveForm; $this->title = $model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'); $this->params['breadcrumbs'] = [['label' => Yii::t('app', 'Categories groups'), 'url' => ['index']], $this->params['breadcrumbs'][] = $this->title]; ?> <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6"> <?php $form = ActiveForm::begin(); ?> <?php BackendWidget::begin(['icon' => 'tag', 'title' => Yii::t('app', 'Categories groups'), 'footer' => Html::a(Icon::show('arrow-circle-left') . Yii::t('app', 'Back'), Yii::$app->request->get('returnUrl', ['index', 'id' => $model->id]), ['class' => 'btn btn-danger']) . ' ' . ($model->isNewRecord ? Html::submitButton(Icon::show('save') . Yii::t('app', 'Save & Go next'), ['class' => 'btn btn-success', 'name' => 'action', 'value' => 'next']) : '') . ' ' . Html::submitButton(Icon::show('save') . Yii::t('app', 'Save & Go back'), ['class' => 'btn btn-warning', 'name' => 'action', 'value' => 'back']) . ' ' . Html::submitButton(Icon::show('save') . Yii::t('app', 'Save'), ['class' => 'btn btn-primary', 'name' => 'action', 'value' => 'save'])]); ?> <?php echo $form->field($model, 'name')->textInput(['maxlength' => 255]); ?> <?php BackendWidget::end(); ?> <?php ActiveForm::end(); ?> </div>