function run() { parent::run(); $wid = $this->options['id']; echo Html::activeHiddenInput($this->model, $this->attribute); echo Html::beginTag('div', ['id' => $wid . '-buttons', 'class' => 'input-group btn-group']); $items = PublishBehavior::getPublishedOptions(); $colors = PublishBehavior::getPublishedColors(); foreach ($items as $key => $item) { echo Html::button($item, ['data' => ['value' => $key], 'class' => $key == $this->model->{$this->attribute} ? 'btn btn-' . $colors[$key] . ' active' : 'btn btn-default']); } echo Html::endTag('div'); $js_colors = Json::encode($colors); $js = <<<JS \$('#{$wid}-buttons').find('button').each(function(){ \$(this).on('click',function(){ \$('#{$wid}-buttons').find('button').each(function(){ \$(this).removeClass('btn-danger btn-warning btn-success btn-info active'); \$(this).addClass('btn-default'); }); var color={$js_colors}; \$(this).removeClass('btn-default'); \$(this).addClass('btn-'+color[\$(this).data('value')]+' active'); \$('#{$wid}').val(\$(this).data('value')) }); }); JS; $this->view->registerJs($js); }
use yii\bootstrap\Tabs; $this->title = Yii::t('app', 'Rbac'); $this->params['breadcrumbs'][] = $this->title; $this->beginBlock('buttonGroup'); ?> <div class="btn-toolbar" role="toolbar"> <div class="btn-group"> <?php echo Html::a(Yii::t('app', 'Create Permission'), ['create', 'returnUrl' => \app\backend\components\Helper::getReturnUrl(), 'type' => \yii\rbac\Item::TYPE_PERMISSION], ['class' => 'btn btn-success']); ?> <?php echo Html::a(Yii::t('app', 'Create Role'), ['create', 'returnUrl' => \app\backend\components\Helper::getReturnUrl(), 'type' => \yii\rbac\Item::TYPE_ROLE], ['class' => 'btn btn-success']); ?> </div> <?php echo Html::button(Yii::t('app', 'Delete selected'), ['class' => 'btn btn-danger', 'id' => 'deleteItems']); ?> </div> <?php $this->endBlock(); ?> <div class="user-index"> <?php BackendWidget::begin(['icon' => 'lock', 'title' => $this->title, 'footer' => $this->blocks['buttonGroup']]); ?> <?php echo Tabs::widget(['items' => [['label' => Yii::t('app', 'Permissions'), 'content' => $this->render('_rbacGrid', ['data' => $permissions, 'isRules' => $isRules, 'id' => 'operations']), 'active' => true], ['label' => Yii::t('app', 'Roles'), 'content' => $this->render('_rbacGrid', ['data' => $roles, 'isRules' => $isRules, 'id' => 'roles'])]]]); ?> <?php BackendWidget::end(); ?>
<?php use kartik\helpers\Html; use frontend\widgets\Alert; /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ if (\Yii::$app->session->hasFlash('success')) { $preBody = Alert::widget(); } else { $preBody = NULL; } $btnAuth = Html::button('<i class="fa fa-plus"></i> Autorisierung hinzufügen', ['class' => 'btn btn-warning btn-xs pull-right', 'id' => 'btn-newauth']); $btnLic = Html::button('<i class="fa fa-plus"></i> Lizenz hinzufügen', ['class' => 'btn btn-warning btn-xs pull-right', 'id' => 'btn-newlic']); echo Html::panel(['heading' => " " . $btnLic . $btnAuth, 'preBody' => $preBody, 'body' => $this->render('_usersform', ['model' => $model])], 'default', ['id' => 'detail-panel']);
?> <section id="widget-grid"> <div class="row"> <article class="col-xs-12 col-sm-6 col-md-6 col-lg-6"> <?php BackendWidget::begin(['title' => Yii::t('app', 'Common'), 'icon' => 'pencil', 'footer' => $this->blocks['submit']]); ?> <?php echo $form->field($model, 'name'); ?> <?php echo $form->field($model, 'view', ['addon' => ['append' => ['content' => Html::button(Icon::show('folder-open-o'), ['class' => 'btn btn-primary', 'id' => 'show-tree']), 'asButton' => true]]]); ?> <?php echo $form->field($model, 'category'); ?> <?php echo $form->field($model, 'internal_name'); ?> <?php BackendWidget::end(); ?> </article> <article class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
public function init() { if (is_array($this->copyFrom)) { $id = Html::getInputId($this->model, $this->attribute); $buttonId = $id . '-copyButton'; $this->addon['append'] = ['content' => Html::button(Icon::show('code'), ['class' => 'btn btn-primary', 'id' => $buttonId]), 'asButton' => true]; $encodedFrom = Json::encode($this->copyFrom); $encodedTo = Json::encode('#' . $id); $js = <<<EOT \$("#{$buttonId}").click(function(){ Admin.copyFrom( {$encodedFrom}, {$encodedTo} ); }); EOT; $this->form->getView()->registerJs($js); } elseif (is_array($this->makeSlug)) { $id = Html::getInputId($this->model, $this->attribute); $buttonId = $id . '-slugButton'; $this->addon['append'] = ['content' => Html::button(Icon::show('code'), ['class' => 'btn btn-primary', 'id' => $buttonId]), 'asButton' => true]; $encodedFrom = Json::encode($this->makeSlug); $encodedTo = Json::encode('#' . $id); $js = <<<EOT \$("#{$buttonId}").click(function(){ Admin.makeSlug( {$encodedFrom}, {$encodedTo} ); }); EOT; $this->form->getView()->registerJs($js); } 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']); } }
return StarRating::widget(['name' => 'rating_1']); }], ['attribute' => 'ACTUAL_DATE1', 'filterType' => GridView::FILTER_DATE], ['attribute' => 'ACTUAL_DATE2', 'filterType' => GridView::FILTER_DATE], ['label' => 'Discription', 'attribute' => 'DSCRP', 'mergeHeader' => true, 'value' => function ($model, $key, $index, $widget) { if ($model->DSCRP != '') { return substr($model->DSCRP, 0, 30) . ' ...'; //Author -ptr.nov- limit disply text } else { return ''; } }], ['label' => 'Status', 'attribute' => 'STATUS', 'format' => 'html', 'hAlign' => 'center', 'value' => function ($model) { if ($model->STATUS == 0) { return Html::a('<i class="fa fa-edit"></i> Open', '', ['class' => 'btn btn-success btn-sm', 'title' => 'Open']); } else { if ($model->STATUS == 1) { return Html::a('<i class="fa fa-close"></i> Close', '', ['class' => 'btn btn-danger btn-sm', 'title' => 'Closing']); } } }, 'filter' => ['0' => 'Open', '1' => 'Close']], ['class' => 'yii\\grid\\ActionColumn', 'header' => 'Action']], 'pjax' => true, 'pjaxSettings' => ['options' => ['enablePushState' => false, 'id' => 'gv-pilot']], 'toolbar' => [['content' => Html::button('<i class="glyphicon glyphicon-plus"></i>', ['type' => 'button', '', 'class' => 'btn btn-success', 'onclick' => 'alert("This will launch the book creation form.\\n\\nDisabled for this demo!");']) . ' ' . Html::a('<i class="glyphicon glyphicon-repeat"></i>', ['grid-demo'], ['data-pjax' => 0, 'class' => 'btn btn-default', ''])], '{export}', '{toggleData}'], 'panel' => ['type' => 'info', 'heading' => 'Pilot Project'], 'hover' => true, 'responsive' => true, 'bordered' => true, 'striped' => true, 'autoXlFormat' => true, 'export' => ['fontAwesome' => true, 'showConfirmAlert' => false]]); /* AUTHOR -ptr.nov- Render ID GANTT PILOT PROJECT*/ $dsp = ' <div class="row"> <div class="col-sm-12" id="chart-container">FusionCharts will render here</div> </div> '; /* AUTHOR -ptr.nov- ITEM TABs */ $items = [['label' => '<i class="glyphicon glyphicon-home"></i> Pilot Schedule Data', 'content' => $gv_pilot], ['label' => '<i class="glyphicon glyphicon-home"></i> Pilot Schedule Preview', 'content' => $dsp]]; /* AUTHOR -ptr.nov- TAB Widget*/ echo TabsX::widget(['items' => $items, 'position' => TabsX::POS_ABOVE, 'bordered' => true, 'encodeLabels' => false]); ?>
?> <?php echo $form->field($model, 'status')->dropDownList($model->getStatusValues()); ?> <?php echo $form->field($model, 'created_at')->textInput(['value' => $model->createdAtStr]); ?> <?php echo $form->field($model, 'updated_at')->textInput(['value' => $model->updatedAtStr, 'disabled' => $model->isNewRecord ? false : true]); ?> <?php echo $form->field($model, 'role')->dropDownList($model->getRoleValues()); ?> </div> </div> <?php echo $this->render('_authform', ['form' => $form, 'model' => $model]); ?> <div class="row"> <div class="col-md-12"> <?php echo Html::button('<i class="fa fa-save"></i> Benutzer speichern', ['type' => 'submit', 'class' => 'btn btn-default', 'style' => "width:100%;", 'encodeLabels' => false]); ?> </div> </div> <?php ActiveForm::end(); ?> </div>
'font-size'=>'8pt', 'background-color'=>'rgba(249, 215, 100, 1)', ] ], 'contentOptions'=>[ 'style'=>[ 'text-align'=>'center', 'font-family'=>'tahoma, arial, sans-serif', 'font-size'=>'8pt', //'background-color'=>'rgba(13, 127, 3, 0.1)', ] ], ]; */ $btn_srch = Html::a('<i class="fa fa-search"></i> Search Date', '/master/review-visit/ambil-tanggal', ['data-toggle' => "modal", 'data-target' => "#modal-tgl", 'class' => 'btn btn-info btn-sm']); $btn_srchReviewDetail = Html::button(Yii::t('app', 'Search Date'), ['value' => url::to(['ambil-tanggal']), 'id' => 'modalButtonReviewTgl', 'class' => "btn btn-info btn-sm"]); /*SHOW GRID VIEW LIST*/ $indexReviewDetail = GridView::widget(['id' => 'cust-visit-list', 'dataProvider' => $dataProviderHeader1, 'filterModel' => $searchModelHeader1, 'columns' => $attDinamik, 'pjax' => true, 'pjaxSettings' => ['options' => ['enablePushState' => false, 'id' => 'cust-visit-list']], 'summary' => false, 'panel' => ['heading' => '<div style="float:left;margin-right:10px" class="fa fa-2x fa-bicycle"></div><div><h4 class="modal-title">DAILY REVIEW CUSTOMER CALL</h4></div>' . ' ' . '<div style="float:right; margin-top:-22px;margin-right:0px;">' . $btn_srchReviewDetail . '</div>', 'type' => 'success'], 'toolbar' => ['']]); ?> <?php echo $indexReviewDetail; ?> <?php $this->registerJs("\t\t\n\t\t\$.fn.modal.Constructor.prototype.enforceFocus = function(){};\t\n\t\t\$(document).on('click','#modalButtonReviewTgl', function(ehead){ \t\t\t \n\t\t\t\$('#modal-review-tgl').modal('show')\n\t\t\t.find('#modalContentReviewTgl')\n\t\t\t.load(ehead.target.value);\n\t\t});\t\t \n\t\t\t \n\t", $this::POS_READY); Modal::begin(['id' => 'modal-review-tgl', 'header' => '<div style="float:left;margin-right:10px" class="fa fa-2x fa-search"></div><div><h4 class="modal-title"> SEARCH DATE</h4></div>', 'size' => Modal::SIZE_SMALL, 'headerOptions' => ['style' => 'border-radius:5px; background-color: rgba(90, 171, 255, 0.7)']]); echo "<div id='modalContentReviewTgl'></div>"; Modal::end(); //$("#msline-salesmd-visit").updateFusionCharts({dataSource: 'jsonURL', dataFormat: 'MyNewChart.json’}); ?>
?> </div> </div> </div> <div class="col-md-6 text-center"> <div class="panel panel-default"> <div class="panel-body"> <?php echo Html::label('Which file will use for layout?:'); ?> <?php echo Html::dropDownList('file', null, $fileList, ['class' => 'form-control']); ?> </div> <div class="panel-footer"><?php echo Html::button('Next', ['class' => 'btn btn-success NextButton']); ?> </div> </div> </div> </div> <?php echo Html::input('hidden', 'headerselector', $headerSelector); ?> <?php echo Html::input('hidden', 'contentselector', $contentSelector); ?> <?php echo Html::input('hidden', 'footerselector', $footerSelector); ?> <?php
AdminAsset::register($this); ?> <div class="page-header"> <div class="pull-right"><?php echo AdminMenu::widget(['ui' => 'list', 'user' => null]); ?> </div> <h1><?php echo $this->title; ?> </h1> </div> <div id="batch-status-out"></div> <div style="width:200px;float:right;margin:-10px auto;"> <?php echo Select2::widget(['name' => 'batch-status', 'value' => '', 'data' => $m->getValidStatuses(), 'addon' => ['append' => ['content' => Html::button(Html::icon('saved'), ['class' => 'btn btn-default', 'id' => 'btn-batch-update', 'title' => Yii::t('user', 'Go!')]), 'asButton' => true]], 'options' => ['id' => 'batch-status', 'placeholder' => Yii::t('user', 'Batch update...')]]); ?> </div> <div class="clearfix"></div> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'pjax' => true, 'panel' => false, 'export' => false, 'options' => ['id' => 'user-grid'], 'columns' => [['attribute' => 'id', 'width' => '80px'], ['attribute' => 'username', 'width' => '120px', 'format' => 'raw', 'content' => function ($model) { return $model->getUserLink(); }], 'email:email', ['attribute' => 'status', 'format' => 'raw', 'hAlign' => 'center', 'content' => function ($model) { return $model->getStatusHtml(); }, 'filter' => $m->getPrimaryStatuses(), 'width' => '140px', 'filterType' => GridView::FILTER_SELECT2, 'filterWidgetOptions' => ['options' => ['placeholder' => Yii::t('user', 'Select...')], 'pluginOptions' => ['allowClear' => true]]], ['attribute' => 'status_sec', 'format' => 'raw', 'hAlign' => 'center', 'content' => function ($model) { return $model->getStatusSecHtml(); }, 'filter' => $m->getSecondaryStatuses(), 'width' => '140px', 'filterType' => GridView::FILTER_SELECT2, 'filterWidgetOptions' => ['options' => ['placeholder' => Yii::t('user', 'Select...')], 'pluginOptions' => ['allowClear' => true]]], ['attribute' => 'last_login_ip', 'format' => 'raw', 'hAlign' => 'center', 'width' => '130px', 'value' => function ($model) { return $model->last_login_ip ? '<samp>' . $model->last_login_ip . '</samp>' : null; }], ['attribute' => 'last_login_on', 'format' => ['datetime', $m->datetimeDispFormat], 'hAlign' => 'center', 'filter' => false, 'mergeHeader' => true, 'value' => function ($model) { return Module::displayAttrTime($model, 'last_login_on'); }], ['attribute' => 'created_on', 'hAlign' => 'center', 'format' => 'date', 'label' => Yii::t('user', 'Member Since'), 'filter' => false, 'mergeHeader' => true], ['class' => 'kartik\\grid\\CheckboxColumn', 'checkboxOptions' => function ($model) {
use yii\widgets\ActiveForm; use kartik\detail\DetailView; use yii\helpers\Url; use yii\helpers\ArrayHelper; //use kartik\editable\Editable; use kartik\grid\GridView; use kartik\tabs\TabsX; use kartik\money\MaskMoney; use ptrnov\fusionchart\Chart; use lukisongroup\assets\Profile; Profile::register($this); use lukisongroup\assets\AppAssetDahboardDatamaster; AppAssetDahboardDatamaster::register($this); use ptrnov\fusionchart\ChartAsset; ChartAsset::register($this); $btn_srchData = Html::button(Yii::t('app', 'Search Data'), ['value' => url::to(['ambil-monthly']), 'id' => 'modal-button-monthly-id', 'class' => "btn btn-info btn-sm"]); $mslineCustomerVisit = Chart::Widget(['urlSource' => url::base() . '/dashboard/rpt-esm-chart-salesmd/visit-per-sales?id=56', 'userid' => '*****@*****.**', 'dataArray' => '[]', 'dataField' => '[]', 'type' => 'msline', 'renderid' => 'msline-monthly-salesmd-visit', 'autoRender' => true, 'width' => '100%', 'height' => '500%', 'chartOption' => ['caption' => 'Daily Customers Visits', 'subCaption' => 'Custommer Call, Active Customer, Efictif Customer', 'xaxisName' => 'Parents', 'yaxisName' => 'Total Child ', 'theme' => 'fint', 'is2D' => "0", 'showValues' => "1", 'palettecolors' => "#583e78,#008ee4,#f8bd19,#e44a00,#6baa01,#ff2e2e", 'bgColor' => "#ffffff", 'showBorder' => "0", 'showCanvasBorder' => "0"]]); print_r('asd' . $test); ?> <div class="container-fluid w3-content pale-blue" style="max-width:1400px;max-height:1400px;margin-top:10px;font-family: verdana, arial, sans-serif ;font-size: 8pt"> <!-- The Grid --> <div class="row"> <!-- Left Column --> <div class="col-lg-3"> <!-- Profile --> <div class="w3-card-2 w3-round w3-pale-blue"> <div class="w3-container"> <h4 class="w3-center">My Profile</h4>
// } // }, Modal::begin(['headerOptions' => ['id' => 'modalHeader'], 'id' => 'modal', 'size' => 'modal-sm']); echo "<div id='modalContent'></div>"; Modal::end(); /*modal*/ Modal::begin(['id' => 'modal-view_cus-crm', 'header' => '<div style="float:left;margin-right:10px" class="fa fa-user"></div><div><h5 class="modal-title"><b>VIEW User</b></h5></div>', 'size' => Modal::SIZE_LARGE, 'headerOptions' => ['style' => 'border-radius:5px; background-color: rgba(74, 206, 231, 1)']]); echo "<div id='modalContentcrm'></div>"; Modal::end(); /* * GRIDVIEW USER LIST : author wawan */ $gvUser = GridView::widget(['id' => 'gv-user-list-id', 'dataProvider' => $dataProviderUser, 'filterModel' => $searchModelUser, 'filterRowOptions' => ['style' => 'background-color:rgba(97, 211, 96, 0.3); align:center'], 'rowOptions' => function ($model, $key, $index, $grid) { return ['id' => $model->id, 'onclick' => 'detail(this,' . $model->id . '); return false;']; }, 'columns' => [['class' => 'kartik\\grid\\SerialColumn', 'width' => '10px', 'header' => 'No.', 'hAlign' => 'center', 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '10px', 'font-family' => 'tahoma', 'font-size' => '8pt', 'background-color' => 'rgba(0, 95, 218, 0.3)']], 'contentOptions' => ['style' => ['text-align' => 'center', 'width' => '10px', 'font-family' => 'tahoma', 'font-size' => '8pt']], 'pageSummaryOptions' => ['style' => ['border-right' => '0px']]], ['attribute' => 'username', 'label' => 'User', 'hAlign' => 'left', 'vAlign' => 'middle', 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '100px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt', 'background-color' => 'rgba(97, 211, 96, 0.3)']], 'contentOptions' => ['style' => ['text-align' => 'left', 'width' => '100px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt']]], ['attribute' => 'POSITION_SITE', 'label' => 'Site Login', 'hAlign' => 'left', 'vAlign' => 'middle', 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '100px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt', 'background-color' => 'rgba(97, 211, 96, 0.3)']], 'contentOptions' => ['style' => ['text-align' => 'left', 'width' => '100px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt']]], ['attribute' => 'POSITION_LOGIN', 'label' => 'Position Login', 'hAlign' => 'left', 'vAlign' => 'middle', 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '100px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt', 'background-color' => 'rgba(97, 211, 96, 0.3)']], 'contentOptions' => ['style' => ['text-align' => 'left', 'width' => '100px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt']]], ['class' => 'kartik\\grid\\ActionColumn', 'dropdown' => true, 'template' => '{view}', 'dropdownOptions' => ['class' => 'pull-right dropup'], 'dropdownButton' => ['class' => 'btn btn-default btn-xs'], 'buttons' => ['view' => function ($url, $model, $key) { return Html::button(Yii::t('app', 'View User Crm'), ['value' => url::to(['view-user-crm', 'id' => $model->id]), 'id' => 'modalButtoncrm', 'class' => "btn btn-default btn-xs", 'style' => ['width' => '170px', 'height' => '25px', 'border' => 'none']]); }], 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '150px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt', 'background-color' => 'rgba(97, 211, 96, 0.3)']], 'contentOptions' => ['style' => ['text-align' => 'center', 'width' => '150px', 'height' => '10px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt']]]], 'pjax' => true, 'pjaxSettings' => ['options' => ['enablePushState' => false, 'id' => 'gv-user-list-id']], 'panel' => ['heading' => '<h3 class="panel-title">USER LIST</h3>', 'type' => 'warning', 'before' => Html::a('<i class="glyphicon glyphicon-plus"></i> ' . Yii::t('app', 'Add User ', ['modelClass' => 'Kategori']), '/master/schedule-header/create-user', ['data-toggle' => "modal", 'data-target' => "#modal-create", 'class' => 'btn btn-success']), 'showFooter' => false], 'toolbar' => [], 'hover' => true, 'responsive' => true, 'responsiveWrap' => true, 'bordered' => true, 'striped' => '4px', 'autoXlFormat' => true, 'export' => false]); /* * GRIDVIEW USER LIST : author wawan */ // $info=GridView::widget([ // 'id'=>'gv-user-id', // 'dataProvider' => $dataProvider1, // // 'filterModel' => $searchModelUser, // 'filterRowOptions'=>['style'=>'background-color:rgba(97, 211, 96, 0.3); align:center'], // 'columns' => [ // [ //COL-0 // /* Attribute Serial No */ // 'class'=>'kartik\grid\SerialColumn', // 'width'=>'10px', // 'header'=>'No.',
<?php use kartik\helpers\Html; use yii\helpers\Url; use yii\helpers\Json; use yii\web\Response; use yii\helpers\ArrayHelper; use yii\web\Request; use yii\bootstrap\Modal; use ptrnov\fusionchart\Chart; use ptrnov\fusionchart\ChartAsset; ChartAsset::register($this); $btn_srchChart = Html::button(Yii::t('app', 'Search Date'), ['value' => url::to(['ambil-tanggal-chart']), 'id' => 'modalButtonChartTgl', 'class' => "btn btn-info btn-sm"]); $mslineCustomerVisit = Chart::Widget(['urlSource' => url::base() . '/dashboard/rpt-esm-chart-salesmd/visit', 'userid' => '*****@*****.**', 'dataArray' => '[]', 'dataField' => '[]', 'type' => 'msline', 'renderid' => 'msline-salesmd-visit', 'autoRender' => true, 'width' => '100%', 'height' => '500%', 'chartOption' => ['caption' => 'Daily Customers Visits', 'subCaption' => 'Custommer Call, Active Customer, Efictif Customer', 'xaxisName' => 'Parents', 'yaxisName' => 'Total Child ', 'theme' => 'fint', 'is2D' => "0", 'showValues' => "1", 'palettecolors' => "#583e78,#008ee4,#f8bd19,#e44a00,#6baa01,#ff2e2e", 'bgColor' => "#ffffff", 'showBorder' => "0", 'showCanvasBorder' => "0"]]); $mslineCustomerVisitStock = Chart::Widget(['urlSource' => url::base() . '/dashboard/rpt-esm-chart-salesmd/visit-stock', 'userid' => '*****@*****.**', 'dataArray' => '[]', 'dataField' => '[]', 'type' => 'mscolumn3d', 'renderid' => 'msline-salesmd-visit-stock', 'autoRender' => true, 'width' => '100%', 'height' => '500%', 'chartOption' => ['caption' => 'Daily Customers Visits', 'subCaption' => 'Custommer Call, Active Customer, Efictif Customer', 'xaxisName' => 'Parents', 'yaxisName' => 'Total Child ', 'theme' => 'fint', 'is2D' => "0", 'showValues' => "1", 'palettecolors' => "#583e78,#008ee4,#f8bd19,#e44a00,#6baa01,#ff2e2e", 'bgColor' => "#ffffff", 'showBorder' => "0", 'showCanvasBorder' => "0"]]); $mslineCustomerVisitRequest = Chart::Widget(['urlSource' => url::base() . '/dashboard/rpt-esm-chart-salesmd/visit-request', 'userid' => '*****@*****.**', 'dataArray' => '[]', 'dataField' => '[]', 'type' => 'mscolumn3d', 'renderid' => 'msline-salesmd-visit-request', 'autoRender' => true, 'width' => '100%', 'height' => '500%', 'chartOption' => ['caption' => 'Daily Customers Visits', 'subCaption' => 'Custommer Call, Active Customer, Efictif Customer', 'xaxisName' => 'Parents', 'yaxisName' => 'Total Child ', 'theme' => 'fint', 'is2D' => "0", 'showValues' => "1", 'palettecolors' => "#583e78,#008ee4,#f8bd19,#e44a00,#6baa01,#ff2e2e", 'bgColor' => "#ffffff", 'showBorder' => "0", 'showCanvasBorder' => "0"]]); $mslineCustomerVisitSellout = Chart::Widget(['urlSource' => url::base() . '/dashboard/rpt-esm-chart-salesmd/visit-sellout', 'userid' => '*****@*****.**', 'dataArray' => '[]', 'dataField' => '[]', 'type' => 'mscolumn3d', 'renderid' => 'msline-salesmd-visit-sellout', 'autoRender' => true, 'width' => '100%', 'height' => '500%', 'chartOption' => ['caption' => 'Daily Customers Visits', 'subCaption' => 'Custommer Call, Active Customer, Efictif Customer', 'xaxisName' => 'Parents', 'yaxisName' => 'Total Child ', 'theme' => 'fint', 'is2D' => "0", 'showValues' => "1", 'palettecolors' => "#583e78,#008ee4,#f8bd19,#e44a00,#6baa01,#ff2e2e", 'bgColor' => "#ffffff", 'showBorder' => "0", 'showCanvasBorder' => "0"]]); ?> <div class="container-fluid" style="font-family: verdana, arial, sans-serif ;font-size: 8pt; padding-top:-150px"> <div class="col-xs-12 col-sm-12 col-dm-12 col-lg-12"> <div class="row" style="padding-bottom:10px" > <?php echo $btn_srchChart; ?> </div> </div> <div class="col-xs-12 col-sm-12 col-dm-12 col-lg-12"> <div class="row" >
<?php use kartik\helpers\Html; use yii\grid\GridView; /* @var $this yii\web\View */ $btnTest = Html::button('Dokumente publizieren', ['class' => 'btn btn-warning btn-xs pull-right', 'id' => 'btn-publish']); echo Html::panel(['heading' => 'Summary' . $btnTest, 'headingTitle' => true, 'body' => GridView::widget(['dataProvider' => $model, 'summary' => "<div class='summary'><i class=\"fa fa-cloud-upload\"></i> {begin}-{end} von {totalCount} Dokumente können publiziert werden</div>", 'pager' => ['options' => ['class' => 'pagination pagination-sm']], 'columns' => ['cb' => ['class' => 'yii\\grid\\CheckboxColumn', 'options' => ['style' => 'width:20px;'], 'multiple' => false], 'filename' => ['label' => 'Dateiname', 'attribute' => 'filename', 'value' => 'filenamePlain'], 'Title' => ['label' => 'Titel', 'attribute' => 'Titel'], 'f' => ['label' => 'Bearbeitet durch:', 'attribute' => 'updated_by', 'options' => ['style' => 'width:140px;']], 'updated_at' => ['label' => 'Bearbeitet am:', 'attribute' => 'updated_at', 'value' => 'de_updated_at', 'options' => ['style' => 'width:100px;']], 'status' => ['label' => 'akt. Status', 'attribute' => 'onlineStatus', 'value' => 'onlineStatus_str', 'options' => ['style' => 'width:80px;'], 'contentOptions' => ['style' => 'text-align:center;'], 'format' => 'raw'], ['class' => 'yii\\grid\\ActionColumn', 'content' => 'foo', 'template' => '{edit}', 'filterOptions' => ['style' => 'text-align:right;'], 'contentOptions' => ['style' => 'text-align:right;width:45px;'], 'buttons' => ['edit' => function ($url, $model, $key) { return Html::a("<i class='fa fa-pencil'></i>", $url, ['data-class' => 'edit']); }]]]]), 'footer' => false], 'default', ['style' => 'font-size:12px;', 'id' => 'publish-grid']); // Publish Modal rendern (hidden) ---------------------------------------------- echo $this->render('_publishModal'); // // HereDoc Syntax (nach <<< Name darf kein Zeichen sein) ----------------------- $js = <<<JS \$(document).on('ready pjax:complete',function(){ \tvar html = \$('div.grid-view .summary').html(); \tvar btn = \$('#publish-grid .panel-title button'); \t\$('#publish-grid .panel-title').html(html).append(btn);\t }); \$(document).on('click','#btn-publish',function(){ \t\$('#publish-modal').modal(); }); JS; $this->registerJs($js); // Verkleinern der Filterfelder und ausblenden der Summary --------------------- $css = <<<CSS .summary{ \tdisplay:none;\t } CSS; $this->registerCss($css);
$url = Url::to(['players/' . $action, 'id' => $model->id]); return $url; }, 'template' => '{view} {update}']]]]); $gridId = 'sub-players-home'; echo $this->render('_grid', ['model' => $model, 'dataProvider' => $dataProvider['gamePlayersHome'], 'gridOptions' => ['id' => $gridId, 'panel' => ['heading' => '<h4>Состав матча команды ' . $model->home->name . '</h4>', 'after' => false], 'columns' => [['attribute' => 'players.name', 'label' => 'Имя'], ['attribute' => 'players.surname', 'label' => 'Фамилия'], ['attribute' => 'players.number', 'label' => 'Номер'], ['class' => 'yii\\grid\\ActionColumn', 'urlCreator' => function ($action, $model) { $url = Url::to(['games-players/' . $action, 'id' => $model->id]); return $url; }, 'template' => '{delete-pjax}', 'buttons' => ['delete-pjax' => function ($url, $model) { return Html::a('<span class="glyphicon glyphicon-trash"></span>', false, ['onclick' => 'deletePlayer(' . $model->id . ',\'/admin/games-players/delete-pjax\')', 'style' => 'cursor:pointer', 'title' => 'Удалить', 'data-pjax' => 1]); }]]]]]); ?> </div> <div class="col-md-6"> <?php $gridId = 'players-guest'; echo $this->render('_grid', ['model' => $model, 'dataProvider' => $dataProvider['playersGuest'], 'gridOptions' => ['id' => $gridId, 'panel' => ['heading' => '<h4>Все игроки команды ' . $model->guest->name . '</h4>', 'after' => Html::button(Html::icon('plus') . ' Добавить Игроков к Матчу', ['class' => 'btn btn-success perform-action', 'data-game' => $model->id, 'data-team' => $model->guest_id, 'data-grid-id' => $gridId])], 'columns' => [['class' => 'kartik\\grid\\CheckboxColumn'], 'surname', 'number', ['class' => 'yii\\grid\\ActionColumn', 'urlCreator' => function ($action, $model) { $url = Url::to(['players/' . $action, 'id' => $model->id]); return $url; }, 'template' => '{view} {update}']]]]); $gridId = 'sub-players-guest'; echo $this->render('_grid', ['model' => $model, 'dataProvider' => $dataProvider['gamePlayersGuest'], 'gridOptions' => ['id' => $gridId, 'panel' => ['heading' => '<h4>Состав матча команды ' . $model->guest->name . '</h4>', 'after' => false], 'columns' => [['attribute' => 'players.name', 'label' => 'Имя'], ['attribute' => 'players.surname', 'label' => 'Фамилия'], ['attribute' => 'players.number', 'label' => 'Номер'], ['class' => 'yii\\grid\\ActionColumn', 'urlCreator' => function ($action, $model) { $url = Url::to(['games-players/' . $action, 'id' => $model->id]); return $url; }, 'template' => '{delete-pjax}', 'buttons' => ['delete-pjax' => function ($url, $model) { return Html::a('<span class="glyphicon glyphicon-trash"></span>', false, ['onclick' => 'deletePlayer(' . $model->id . ',\'/admin/games-players/delete-pjax\')', 'style' => 'cursor:pointer', 'title' => 'Удалить', 'data-pjax' => 1]); }]]]]]); ?> </div> </div> <div class="row"> <div class="col-md-6">
</div> </div> <?php \yii\bootstrap\Modal::begin(['id' => 'delete-confirmation', 'footer' => Html::button(Yii::t('app', 'Delete'), ['class' => 'btn btn-danger', 'data-action' => 'confirm', 'data-dismiss' => 'modal']) . Html::button(Yii::t('app', 'Cancel'), ['class' => 'btn btn-default', 'data-dismiss' => 'modal']), 'header' => Yii::t('app', 'Are you sure you want to delete this object?')]); ?> <div class="alert alert-danger"> <i class="fa fa-exclamation-triangle fa-lg"></i> <?php echo Yii::t('app', 'All data will be lost'); ?> </div> <?php \yii\bootstrap\Modal::end(); ?> <?php \yii\bootstrap\Modal::begin(['id' => 'delete-category-confirmation', 'footer' => Html::button(Yii::t('app', 'Delete'), ['class' => 'btn btn-primary', 'data-action' => 'confirm', 'data-dismiss' => 'modal']) . Html::button(Yii::t('app', 'Cancel'), ['class' => 'btn btn-default', 'data-dismiss' => 'modal']), 'header' => Yii::t('app', 'Are you sure you want to delete a selected category?')]); ?> <div class="control-group"> <label class="control-label" for="delete-action"><?php echo Yii::t('app', 'Product deleting rules'); ?> </label> <div> <?php echo Html::dropDownList('delete_mode', \app\modules\shop\models\Category::DELETE_MODE_SINGLE_CATEGORY, \app\modules\shop\models\Category::deleteModesList(), ['class' => 'form-control', 'id' => 'delete-mode']); ?> </div> </div> <?php \yii\bootstrap\Modal::end(); ?>
<?php use kartik\helpers\Html; echo Html::textInput('fields[2426ced136024a631a2a0672a269b700]', '', ['class' => 'form-control', 'placeholder' => Yii::t('frontend', 'Vul hier je e-mailadres in'), 'addon' => ['append' => ['content' => Html::button(Yii::t('frontend', 'Verzenden'), ['class' => 'btn btn-primary']), 'asButton' => true]]]); ?> <?php echo Html::submitButton('Verzenden', ['class' => 'btn btn-primary']); ?> <?php /* <div class="form-group"> <label class="control-label" for="name"><?= Yii::t('frontend', 'Naam') ?></label> <?= Html::textInput('fields[1a2f3e3b4cebe60c0e9659520e7e121a]', '', [ 'class' => 'form-control', 'placeholder' => Yii::t('frontend', 'Naam'), 'id' => 'name', ]); ?> </div> <div class="form-group"> <label class="control-label" for="email"><?= Yii::t('frontend', 'E-mail') ?></label> <?= Html::textInput('fields[2426ced136024a631a2a0672a269b700]', '', [ 'class' => 'form-control', 'placeholder' => Yii::t('frontend', 'E-mail'), 'id' => 'email', ]); ?> </div> */ ?>
<?php use kartik\helpers\Html; use frontend\widgets\Alert; if (\Yii::$app->session->hasFlash('success')) { $preBody = Alert::widget(); } else { $preBody = $this->render('_articlePreview', ['model' => $model]); } $btnTest = Html::button('Artikel Vorschau', ['class' => 'btn btn-info btn-xs pull-right', 'id' => 'btn-preview']); echo Html::panel(['heading' => " " . $btnTest, 'preBody' => $preBody, 'body' => $this->render('_editform', ['model' => $model])], 'default', ['id' => 'detail-panel']); $css = <<<CSS #detail-panel input.form-control{ \theight: 23px;\t } #detail-panel select.input-sm{ \theight: 23px; \tpadding: 3px 3px;\t } #detail-panel .form-group{ \tmargin-bottom:5px; } #detail-panel .panel-body { background-color: #EFEFEF; }\t\t @media (min-width: 992px){ \t#detail-panel .col-md-2 { \t\twidth: 12.5%; \t}\t \t#detail-panel .col-md-10{ \t\twidth: 87.5%;
function tombolKonci($url, $model) { $title = Yii::t('app', 'LOCKED'); $options = ['id' => 'confirm-permission-id', 'data-toggle' => "modal", 'data-target' => "#confirm-permission-alert", 'class' => 'btn btn-info btn-xs', 'style' => ['width' => '100px', 'text-align' => 'center'], 'title' => 'Signature']; $icon = '<span class="glyphicon glyphicon-retweet" style="text-align:center"></span>'; $label = $icon . ' ' . $title; $content = Html::button($label, $options); return $content; }
/** * Gets the default button * * @param string $type the button type * @return string */ protected function getDefaultButton($type, $label, $title, $options) { $btnStyle = empty($this->panel['type']) ? self::TYPE_DEFAULT : $this->panel['type']; $label = ArrayHelper::remove($options, 'label', $label); if (empty($options['class'])) { $options['class'] = 'btn btn-xs btn-' . $btnStyle; } Html::addCssClass($options, 'kv-btn-' . $type); $options = ArrayHelper::merge(['title' => Yii::t('kvdetail', $title)], $options); if ($type !== 'delete' && $type !== 'save') { $options['type'] = 'button'; return Html::button($label, $options); } elseif ($type === 'delete') { $url = ArrayHelper::remove($options, 'url', '#'); $options = ArrayHelper::merge(['data-method' => 'post', 'data-confirm' => Yii::t('kvdetail', 'Are you sure you want to delete this item?')], $options); return Html::a($label, $url, $options); } else { return Html::submitButton($label, $options); } }
$this->title = 'Обновление Сезона: ' . ' ' . $model->name; $this->params['breadcrumbs'][] = ['label' => 'Сезоны', 'url' => ['index']]; $this->params['breadcrumbs'][] = ['label' => $model->name, 'url' => ['view', 'id' => $model->id]]; $this->params['breadcrumbs'][] = 'Обновление'; ?> <div class="seasons-update"> <h1><?php echo Html::encode($this->title); ?> </h1> <?php echo $this->render('_form', ['model' => $model]); $gridId = 'teams'; echo $this->render('_grid', ['model' => $model, 'dataProvider' => $dataProvider['teams'], 'filterModel' => $searchModel['teams'], 'gridOptions' => ['id' => $gridId, 'panel' => ['heading' => '<h4>Все команды</h4>', 'after' => Html::button(Html::icon('plus') . ' Добавить Команды в Сезон', ['class' => 'btn btn-success perform-action', 'data-season' => $model->id, 'data-grid-id' => $gridId])], 'columns' => [['class' => 'kartik\\grid\\CheckboxColumn'], ['label' => 'Логотип', 'format' => 'raw', 'value' => function ($data) { $images = $data->getImages(); if ($images[0]['urlAlias'] != 'placeHolder' && $images[0]->isMain) { $image = $data->getImage(); $sizes = $image->getSizesWhen('x25'); return Html::img($image->getUrl('x25'), ['alt' => 'yii2 - картинка в gridview', 'class' => 'img-responsive', 'width' => $sizes['width'], 'height' => $sizes['height']]); } }], 'name', ['class' => 'yii\\grid\\ActionColumn', 'urlCreator' => function ($action, $model) { $url = Url::to(['teams/' . $action, 'id' => $model->id]); return $url; }, 'template' => '{view} {update}']]]]); $gridId = 'sub-teams'; echo $this->render('_grid', ['model' => $model, 'dataProvider' => $dataProvider['seasonTeams'], 'gridOptions' => ['id' => $gridId, 'panel' => ['heading' => '<h4>Команды Сезона ' . $model->name . '</h4>', 'after' => false], 'columns' => [['attribute' => 'team.name', 'label' => 'Имя'], 'games', 'wins', 'draws', 'lesions', 'spectacles', 'goals_against', 'goals_scored', ['class' => 'yii\\grid\\ActionColumn', 'urlCreator' => function ($action, $model) { $url = Url::to(['season-details/' . $action, 'id' => $model->id]); return $url; }, 'template' => '{update}{delete-pjax}', 'buttons' => ['delete-pjax' => function ($url, $model) {
use kartik\tabs\TabsX; use yii\helpers\Json; use yii\web\Response; use yii\helpers\ArrayHelper; use yii\web\Request; use kartik\daterange\DateRangePicker; use yii\db\ActiveRecord; use yii\data\ArrayDataProvider; 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']); } } $btn_srch = Html::button(Yii::t('app', 'Search Date'), ['value' => url::to(['ambil-tanggal-issue']), 'id' => 'modalButtonDashboardIssueTgl', 'class' => "btn btn-info btn-sm"]); $gridColumns = [['class' => 'kartik\\grid\\SerialColumn', 'contentOptions' => ['class' => 'kartik-sheet-style'], 'width' => '10px', 'header' => 'No.', 'noWrap' => true, 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '10px', 'font-family' => 'verdana, arial, sans-serif', 'font-size' => '9pt', 'background-color' => 'rgba(126, 189, 188, 0.9)']], 'contentOptions' => ['style' => ['text-align' => 'center', 'width' => '10px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt']]], ['attribute' => 'TGL', 'label' => 'TGL', 'hAlign' => 'center', 'vAlign' => 'middle', 'filter' => false, 'noWrap' => true, 'mergeHeader' => true, 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '50px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt', 'background-color' => 'rgba(126, 189, 188, 0.9)']], 'contentOptions' => ['style' => ['text-align' => 'center', 'width' => '50px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt']]], ['attribute' => 'NM_CUSTOMER', 'label' => 'CUSTOMER', 'hAlign' => 'left', 'filterOptions' => ['colspan' => 3], 'vAlign' => 'middle', 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '150px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt', 'background-color' => 'rgba(126, 189, 188, 0.9)']], 'contentOptions' => ['style' => ['text-align' => 'left', 'width' => '150px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt']]], ['attribute' => 'UserNm', 'label' => 'SALES.NM', 'hAlign' => 'left', 'vAlign' => 'top', 'mergeHeader' => true, 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '100px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt', 'background-color' => 'rgba(126, 189, 188, 0.9)']], 'contentOptions' => ['style' => ['text-align' => 'left', 'width' => '100px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt']]], ['attribute' => 'Geonm', 'label' => 'GEO', 'hAlign' => 'left', 'vAlign' => 'top', 'mergeHeader' => true, 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '50px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt', 'background-color' => 'rgba(126, 189, 188, 0.9)']], 'contentOptions' => ['style' => ['text-align' => 'left', 'width' => '50px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt']]], ['attribute' => 'ISI_MESSAGES', 'label' => 'ISSUE NOTE', 'hAlign' => 'left', 'vAlign' => 'middle', 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '400px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt', 'background-color' => 'rgba(126, 189, 188, 0.9)']], 'contentOptions' => ['style' => ['text-align' => 'left', 'width' => '400px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt']]], ['attribute' => 'STATUS', 'options' => ['id' => 'test-ro'], 'label' => 'Status', 'hAlign' => 'center', 'vAlign' => 'middle', 'mergeHeader' => true, 'contentOptions' => ['style' => 'width: 100px'], 'format' => 'html', 'value' => function ($model, $key, $index, $widget) { return statusIssue($model); }, 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '80px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt', 'background-color' => 'rgba(126, 189, 188, 0.9)']], 'contentOptions' => ['style' => ['text-align' => 'center', 'width' => '80px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt']]]]; $issueMemo = GridView::widget(['id' => 'gv-dashboard-issue', 'dataProvider' => $dataProviderIssue, 'filterModel' => $searchModelIssue, 'filterRowOptions' => ['style' => 'background-color:rgba(126, 189, 188, 0.9); align:center'], 'columns' => $gridColumns, 'pjax' => true, 'pjaxSettings' => ['options' => ['enablePushState' => false, 'id' => 'gv-dashboard-issue']], 'panel' => ['heading' => false, 'type' => 'success', 'before' => $btn_srch], 'toolbar' => [''], 'summary' => false]); echo $issueMemo; $this->registerJs("\t\t\r\n \$.fn.modal.Constructor.prototype.enforceFocus = function(){};\t\r\n\t\t\$(document).on('click','#modalButtonDashboardIssueTgl', function(ehead){ \t\t\t \r\n\t\t\t\$('#modal-dashboard-issue-tgl').modal('show')\r\n\t\t\t.find('#modalContentDasboardIssueTgl')\r\n\t\t\t.load(ehead.target.value);\r\n\t\t});\t\t \r\n\t\t\t \r\n\t", $this::POS_READY); Modal::begin(['id' => 'modal-dashboard-issue-tgl', 'header' => '<div style="float:left;margin-right:10px" class="fa fa-2x fa-search"></div><div><h4 class="modal-title"> SEARCH DATE</h4></div>', 'size' => Modal::SIZE_SMALL, 'headerOptions' => ['style' => 'border-radius:5px; background-color: rgba(90, 171, 255, 0.7)']]); echo "<div id='modalContentDasboardIssueTgl'></div>"; Modal::end();
\$('#mod_entity_type_add').on('click',opencentitytypemod); MODALJS; $this->registerJs($modalJS); ?> <div class="entity-form"> <?php $form = ActiveForm::begin(['id' => 'EntityCreateForm', 'action' => Url::to(['/entity/default/create'])]); ?> <div class="row"> <div class="col-md-12"> <?php echo $form->field($model, 'entity_type_id')->widget(Select2::classname(), ['data' => EntityType::pdEntityType(), 'options' => ['placeholder' => 'Entity Type...'], 'addon' => ['prepend' => ['content' => Html::icon('globe')], 'append' => ['content' => Html::button(Html::icon('plus'), ['class' => 'btn btn-default', 'id' => 'mod_entity_type_add', 'title' => 'add new entity', 'data-toggle' => 'tooltip', 'href' => Url::to(['/entity/entity-type/create'])]), 'asButton' => true]], 'pluginOptions' => ['allowClear' => true]]); ?> </div> </div> <div class="row"> <div class="col-md-6"> <?php echo $form->field($model, 'prename')->textInput(['maxlength' => 100]); ?> </div> <div class="col-md-6"> <?php echo $form->field($model, 'name')->textInput(['maxlength' => 140]); ?> </div>
<?php use kartik\helpers\Html; use yii\bootstrap\ActiveForm; /* @var $this yii\web\View */ /* @var $form kartik\helpers\Html */ $form = Html::beginForm(); ?> <div class="modal fade" id="publish-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-dialog"> <?php echo Html::panel(['heading' => '<i class="fa fa-cloud-upload"></i> Daten publizieren', 'headingTitle' => true, 'body' => Html::checkbox('sendNotification', false, ['label' => 'Benachrichtigung an die Benutzer senden?']), 'footer' => " " . Html::button('Abbrechen', ['class' => 'btn btn-default btn-sm', 'data-dismiss' => 'modal']) . " " . Html::button('Daten jetzt publizieren', ['class' => 'btn btn-info btn-sm', 'data-dismiss' => 'modal'])]); ?> </div> </div> <?php Html::endForm();
/** * 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); }
// readonly if ($model->CUST_GRP == $model->CUST_KD) { return true; } else { return false; } }, 'label' => 'Customer.Id', 'hAlign' => 'left', 'vAlign' => 'top', 'filter' => false, 'mergeHeader' => true, 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '120px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt', 'background-color' => 'rgba(255, 154, 48, 1)']], 'contentOptions' => ['style' => ['vertical-align' => 'text-middle', 'text-align' => 'left', 'width' => '120px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt']], 'editableOptions' => ['header' => 'Customers', 'inputType' => \kartik\editable\Editable::INPUT_SELECT2, 'size' => 'md', 'options' => ['data' => $parent, 'pluginOptions' => ['allowClear' => true]]]], ['attribute' => 'CUST_NM', 'label' => 'Customer Name', 'hAlign' => 'left', 'vAlign' => 'middle', 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '250px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt', 'background-color' => 'rgba(255, 154, 48, 1)']], 'contentOptions' => ['style' => ['text-align' => 'left', 'width' => '250px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt']]], ['attribute' => 'cus.CUST_KTG_NM', 'label' => 'Category', 'filter' => $dropType, 'hAlign' => 'left', 'vAlign' => 'middle', 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '100px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt', 'background-color' => 'rgba(255, 154, 48, 1)']], 'contentOptions' => ['style' => ['text-align' => 'left', 'width' => '100px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt']]], ['attribute' => 'custype.CUST_KTG_NM', 'filter' => $dropKtg, 'label' => 'Type', 'hAlign' => 'left', 'vAlign' => 'middle', 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '230px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt', 'background-color' => 'rgba(255, 154, 48, 1)']], 'contentOptions' => ['style' => ['text-align' => 'left', 'width' => '230px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt']]], ['class' => 'kartik\\grid\\EditableColumn', 'attribute' => 'GEO', 'refreshGrid' => true, 'label' => 'Geo', 'hAlign' => 'left', 'vAlign' => 'top', 'filter' => true, 'filterType' => GridView::FILTER_SELECT2, 'filter' => $data_group, 'filterWidgetOptions' => ['pluginOptions' => ['allowClear' => true, 'contentOptions' => ['style' => ['text-align' => 'left', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt']]]], 'filterInputOptions' => ['placeholder' => 'Select'], 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '120px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt', 'background-color' => 'rgba(255, 154, 48, 1)']], 'contentOptions' => ['style' => ['vertical-align' => 'text-middle', 'text-align' => 'center', 'width' => '120px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt']], 'editableOptions' => ['header' => 'GEO', 'inputType' => \kartik\editable\Editable::INPUT_SELECT2, 'size' => 'xs', 'options' => ['data' => $data_group, 'pluginOptions' => ['allowClear' => true]], 'displayValueConfig' => $data_group]], ['class' => 'kartik\\grid\\EditableColumn', 'attribute' => 'LAYER', 'refreshGrid' => true, 'label' => 'Layer', 'hAlign' => 'left', 'vAlign' => 'top', 'filter' => true, 'filterType' => GridView::FILTER_SELECT2, 'filter' => $data_layer, 'filterWidgetOptions' => ['pluginOptions' => ['allowClear' => true, 'contentOptions' => ['style' => ['text-align' => 'left', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt']]]], 'filterInputOptions' => ['placeholder' => 'Select'], 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '120px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt', 'background-color' => 'rgba(255, 154, 48, 1)']], 'contentOptions' => ['style' => ['vertical-align' => 'text-middle', 'text-align' => 'center', 'width' => '120px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt']], 'editableOptions' => ['header' => 'layer', 'inputType' => \kartik\editable\Editable::INPUT_SELECT2, 'size' => 'xs', 'options' => ['data' => $data_layer, 'pluginOptions' => ['allowClear' => true]], 'displayValueConfig' => $data_layer]], ['class' => 'kartik\\grid\\EditableColumn', 'attribute' => 'DC_STATUS', 'refreshGrid' => true, 'hAlign' => 'left', 'vAlign' => 'top', 'filter' => true, 'filterType' => GridView::FILTER_SELECT2, 'filter' => $arraySttDC, 'filterWidgetOptions' => ['pluginOptions' => ['allowClear' => true, 'contentOptions' => ['style' => ['text-align' => 'left', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt']]]], 'filterInputOptions' => ['placeholder' => 'Select'], 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '120px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt', 'background-color' => 'rgba(255, 154, 48, 1)']], 'contentOptions' => ['style' => ['vertical-align' => 'text-middle', 'text-align' => 'center', 'width' => '120px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt']], 'editableOptions' => ['header' => 'INVENTORY', 'inputType' => \kartik\editable\Editable::INPUT_SELECT2, 'size' => 'xs', 'options' => ['data' => $arraySttDC, 'pluginOptions' => ['allowClear' => true]], 'displayValueConfig' => $arraySttDC]], ['attribute' => 'STATUS', 'filter' => $valStt, 'format' => 'raw', 'hAlign' => 'center', 'value' => function ($model) { if ($model->STATUS == 1) { return Html::a('<i class="fa fa-edit"></i> Enable', '', ['class' => 'btn btn-success btn-xs', 'title' => 'Aktif']); } else { if ($model->STATUS == 0) { return Html::a('<i class="fa fa-close"></i> Disable', '', ['class' => 'btn btn-danger btn-xs', 'title' => 'Deactive']); } } }, 'hAlign' => 'left', 'vAlign' => 'middle', 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '80px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt', 'background-color' => 'rgba(255, 154, 48, 1)']], 'contentOptions' => ['style' => ['text-align' => 'center', 'width' => '80px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt']]], ['class' => 'kartik\\grid\\ActionColumn', 'template' => '{view}{edit}', 'header' => 'Action', 'dropdown' => true, 'dropdownOptions' => ['class' => 'pull-right dropup'], 'dropdownButton' => ['class' => 'btn btn-default btn-xs'], 'buttons' => ['view' => function ($url, $model, $key) { return Html::button(Yii::t('app', 'View Customers'), ['value' => url::to(['viewcust', 'id' => $model->CUST_KD]), 'id' => 'modalButtonCustomers', 'class' => "btn btn-default btn-xs", 'style' => ['width' => '170px', 'height' => '25px', 'border' => 'none']]); }, 'edit' => function ($url, $model, $key) { return '<li>' . Html::a('<i class="glyphicon glyphicon-globe"></i>' . Yii::t('app', 'Create Map'), ['create-map', 'id' => $model->CUST_KD], []) . '</li>'; }], 'headerOptions' => ['style' => ['text-align' => 'center', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt', 'background-color' => 'rgba(255, 154, 48, 1)']], 'contentOptions' => ['style' => ['text-align' => 'left', '//width' => '150px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt']]]], 'toolbar' => [''], 'panel' => ['type' => GridView::TYPE_INFO, 'heading' => '<i class="fa fa fa-tags fa-1x"></i> NOO - New Customer', 'before' => Html::a('<i class="glyphicon glyphicon-plus"></i> ' . Yii::t('app', 'Create ', ['modelClass' => 'Customers']), '/master/customers-noo/createcustomers', ['data-toggle' => "modal", 'id' => 'modcus', 'data-target' => "#createcus", 'class' => 'btn btn-success btn-sm']) . ' ' . Html::a('<i class="fa fa-history "></i> ' . Yii::t('app', 'Refresh', ['modelClass' => 'Customers1']), '/master/customers-noo', ['id' => 'refresh-cust-erp', 'data-pjax' => 0, 'class' => 'btn btn-info btn-sm']) . ' ' . Html::a('<i class="fa fa-file-excel-o"></i> ' . Yii::t('app', 'Export All'), '/export/export/export-data', ['id' => 'export-data-erp-customers', 'data-pjax' => 0, 'class' => 'btn btn-info btn-sm']) . ' ' . Html::a('<i class="fa fa-file-excel-o"></i> ' . Yii::t('app', 'Export selected'), '', ['id' => 'exportmodal-erp', 'data-pjax' => 0, 'data-toggle-export-erp' => 'erp-customers-modal', 'class' => 'btn btn-success btn-sm']) . ' ' . Html::a('<i class="fa fa-file-excel-o"></i> ' . Yii::t('app', 'Pilih Export'), '/export/export/pilih-export-data', ['data-toggle' => "modal", 'id' => 'exportmodal-erp-pilih', 'data-target' => "#export-mod", 'class' => 'btn btn-success btn-sm']) . ' ' . Html::a('<i class="fa fa-file-excel-o"></i> ' . Yii::t('app', 'Pilih delete'), '', ['data-toggle-delete-erp' => 'erp-customers-delete', 'id' => 'delete-all-erp', 'data-pjax' => 0, 'class' => 'btn btn-danger btn-sm'])], 'pjax' => true, 'pjaxSettings' => ['options' => ['enablePushState' => false, 'id' => 'gv-cus-erp']], 'summary' => false, 'hover' => true, 'responsive' => true, 'responsiveWrap' => true, 'bordered' => true, 'striped' => '4px', 'autoXlFormat' => true, 'export' => ['fontAwesome' => true, 'showConfirmAlert' => false, 'target' => GridView::TARGET_BLANK]]); ?> <div class="content"> <div class="row" style="padding-left:3px"> <div class="col-sm-12"> <?php echo $tabcustomersData; ?> </div> </div> </div> <?php
use kartik\helpers\Html; use kartik\grid\GridView; use kartik\icons\Icon; use yii\helpers\Url; use frontend\models\MonitoringKacamata; use yii\helpers\ArrayHelper; /* @var $this yii\web\View */ /* @var $searchModel frontend\models\search\MonitoringKacamataSearch */ /* @var $dataProvider yii\data\ActiveDataProvider */ $this->title = 'Monitoring Kacamata'; $this->params['breadcrumbs'][] = $this->title; Icon::Map($this, Icon::FA); ?> <div class="monitoring-kacamata-index"> <h1><?php echo Html::encode($this->title); ?> </h1> <?php //echo $this->render('_search', ['model' => $searchModel]); $gridColumns = [['class' => 'kartik\\grid\\SerialColumn', 'contentOptions' => ['class' => 'kartik-sheet-style'], 'header' => '#', 'width' => '36px', 'headerOptions' => ['class' => 'kartik-sheet-style']], ['attribute' => 'nikkes', 'width' => '15%'], ['attribute' => 'nikkes0', 'value' => 'nikkes0.nama'], ['attribute' => 'hak_kacamata_id', 'value' => function ($model, $key, $index, $widget) { return '<code>' . $model->hakKacamata->hak_kacamata . '</code>'; }, 'filterType' => GridView::FILTER_SELECT2, 'filter' => MonitoringKacamata::getHakKacamataList(), 'filterWidgetOptions' => ['pluginOptions' => ['allowClear' => true]], 'filterInputOptions' => ['placeholder' => 'Hak Kacamata'], 'vAlign' => 'middle', 'format' => 'raw', 'width' => '10%'], ['attribute' => 'tgl_ambil', 'filterType' => GridView::FILTER_DATE, 'filterWidgetOptions' => ['options' => ['placeholder' => 'Enter date ...'], 'type' => \kartik\widgets\DatePicker::TYPE_COMPONENT_APPEND, 'removeButton' => false, 'pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']], 'width' => '20%', 'format' => 'date'], ['class' => 'kartik\\grid\\ActionColumn', 'hidden' => true]]; ?> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => $gridColumns, 'headerRowOptions' => ['class' => 'active'], 'filterRowOptions' => ['class' => 'active'], 'pjax' => true, 'panel' => ['heading' => '<h3 class="panel-title"><i class="glyphicon glyphicon-th-large"></i> Monitoring Kacamata</h3>', 'type' => GridView::TYPE_PRIMARY], 'toolbar' => [['content' => Html::button(Icon::show('plus'), ['type' => 'button', 'title' => 'Add Monitoring Kacamata', 'class' => 'btn btn-success', 'onClick' => 'location.href=window.location.href + "/create"']) . '' . Html::a(Icon::show('repeat'), ['/monitoringkacamata'], ['data-pjax' => 0, 'class' => 'btn btn-default', 'title' => 'Reset'])]], 'hover' => true, 'condensed' => true, 'striped' => false, 'responsive' => true]); ?> </div>
/** * 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}; $btnStyle = empty($this->panel['type']) ? self::TYPE_DEFAULT : $this->panel['type']; $label = ArrayHelper::remove($options, 'label', "<i class='glyphicon glyphicon-{$icon}'></i>"); if (empty($options['class'])) { $options['class'] = 'btn btn-xs btn-' . $btnStyle; } Html::addCssClass($options, 'kv-btn-' . $type); $options = ArrayHelper::merge(['title' => $title], $options); if ($this->tooltips) { $options['data-toggle'] = 'tooltip'; $options['data-container'] = 'body'; } if ($type === 'reset') { return Html::resetButton($label, $options); } elseif ($type === 'save') { return Html::submitButton($label, $options); } elseif ($type === 'delete') { $url = ArrayHelper::remove($options, 'url', '#'); return Html::a($label, $url, $options); } else { $options['type'] = 'button'; return Html::button($label, $options); } }
public function init() { $fields = ['copyFrom' => ['buttonIdSuffix' => '-copyButton', 'buttonIcon' => 'code', 'jsMethodName' => 'Admin.copyFrom'], 'makeSlug' => ['buttonIdSuffix' => '-slugButton', 'buttonIcon' => 'code', 'jsMethodName' => 'Admin.makeSlug'], 'makeKey' => ['buttonIdSuffix' => '-keyButton', 'buttonIcon' => 'code', 'jsMethodName' => 'Admin.makeKey']]; foreach ($fields as $fieldName => $params) { if (true === is_array($this->{$fieldName})) { $id = Html::getInputId($this->model, $this->attribute); $buttonId = $id . $params['buttonIdSuffix']; $this->addon['append'] = ['content' => Html::button(Icon::show($params['buttonIcon']), ['class' => 'btn btn-primary', 'id' => $buttonId]), 'asButton' => true]; $encodedFrom = Json::encode($this->{$fieldName}); $encodedTo = Json::encode('#' . $id); $js = <<<EOT \$("#{$buttonId}").click(function() { {$params['jsMethodName']}({$encodedFrom}, {$encodedTo}); }); EOT; $this->form->getView()->registerJs($js); } } parent::init(); }