当前位置: 首页>>代码示例>>PHP>>正文


PHP GridView::widget方法代码示例

本文整理汇总了PHP中kartik\grid\GridView::widget方法的典型用法代码示例。如果您正苦于以下问题:PHP GridView::widget方法的具体用法?PHP GridView::widget怎么用?PHP GridView::widget使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在kartik\grid\GridView的用法示例。


在下文中一共展示了GridView::widget方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: run

 public function run()
 {
     $ret_val = '';
     if (isset($this->header) && is_string($this->header) && !is_bool($this->header)) {
         $ret_val = Html::tag('h2', $this->header);
     }
     switch ($this->displayAs) {
         case 'grid':
             $this->items = is_array($this->items) ? $this->items : [$this->items];
             $this->widgetOptions = array_merge(['summary' => false, 'layout' => '{items}', 'showHeader' => $this->header, 'dataProvider' => new \yii\data\ArrayDataProvider(['allModels' => $this->items]), 'columns' => $this->attributes], $this->widgetOptions);
             $ret_val .= \kartik\grid\GridView::widget($this->widgetOptions);
             break;
         case 'list':
             $this->widgetOptions = array_merge(['itemOptions' => ['tag' => false], 'summary' => false, 'dataProvider' => new \yii\data\ArrayDataProvider(['allModels' => $this->items]), 'itemView' => function ($model, $key, $index, $widget) {
                 return $this->renderListItem($model, $key, $index, $widget);
             }], $this->widgetOptions);
             $ret_val .= \yii\widgets\ListView::widget($this->widgetOptions);
             break;
         case 'csv':
             $ret_val = [];
             foreach ($this->items as $index => $item) {
                 $ret_val[] = $this->renderCsvItem($item, $index);
             }
             $ret_val = Html::tag('div', implode(', ', $ret_val));
             break;
         case 'tags':
             foreach ($this->items as $index => $item) {
                 $ret_val .= $this->renderTagItem($item, $index);
             }
             $ret_val = Html::tag('div', $ret_val);
             break;
         default:
             $this->widgetOptions['class'] = isset($this->widgetOptions['class']) ? $this->widgetOptions['class'] : 'table';
             $this->widgetOptions = array_merge(['model' => $this->items, 'attributes' => $this->attributes, 'options' => ['class' => 'table']], $this->widgetOptions);
             $ret_val .= \yii\widgets\DetailView::widget($this->widgetOptions);
             break;
     }
     return $ret_val;
 }
开发者ID:nhatvuvan,项目名称:yii2-widgets,代码行数:39,代码来源:MetaInfo.php

示例2:

<?php

use yii\helpers\Html;
use kartik\grid\GridView;
use common\models\Scholar;
use yii\helpers\ArrayHelper;
/* @var $this yii\web\View */
/* @var $searchModel common\models\TuitionSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$gridColumn = [['class' => 'kartik\\grid\\SerialColumn'], ['attribute' => 'scholar_scholar_id'], ['attribute' => 'firstName', 'value' => 'scholarScholar.scholar_first_name'], ['attribute' => 'middleName', 'value' => 'scholarScholar.scholar_middle_name'], ['attribute' => 'lastName', 'value' => 'scholarScholar.scholar_last_name'], ['attribute' => 'tuition_term'], ['attribute' => 'tuition_enrollment_date'], ['attribute' => 'tuition_amount', 'pageSummary' => true], ['attribute' => 'tuition_paid_status'], ['class' => 'kartik\\grid\\ActionColumn']];
$this->title = 'Tuitions';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="tuition-index">

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'pjax' => true, 'pjaxSettings' => ['neverTimeout' => true], 'columns' => $gridColumn, 'toolbar' => [['content' => Html::a('Create Tuition', ['groupcreate'], ['class' => 'btn btn-success'])], '{toggleData}'], 'showPageSummary' => true]);
?>

</div>
开发者ID:seans888,项目名称:SMF-Project,代码行数:20,代码来源:index.php

示例3: actionTitularidad

 public function actionTitularidad($id_uf)
 {
     $UfModel = Uf::findOne($id_uf);
     if (!empty($UfModel->ultUfTitularidad->id)) {
         $query = UfTitularidadPersonas::find()->joinWith('persona')->where(['uf_titularidad_id' => $UfModel->ultUfTitularidad->id]);
         $dataProvider = new ActiveDataProvider(['query' => $query, 'sort' => ['defaultOrder' => ['tipo' => SORT_DESC], 'enableMultiSort' => true]]);
         $response = GridView::widget(['dataProvider' => $dataProvider, 'condensed' => true, 'layout' => '{items}', 'panel' => ['type' => GridView::TYPE_INFO, 'heading' => 'Titularidad actual sobre U.F.' . $id_uf, 'footer' => false, 'before' => false, 'after' => false], 'panelHeadingTemplate' => '{heading}', 'resizableColumns' => false, 'columns' => [['attribute' => 'tipo', 'value' => function ($model) {
             return UfTitularidadPersonas::getTipos($model->tipo);
         }], 'id_persona', 'persona.apellido', 'persona.nombre', 'persona.nombre2', 'persona.tipoDoc.desc_tipo_doc_abr', 'persona.nro_doc']]);
     } else {
         $response = '';
     }
     \Yii::$app->response->format = 'json';
     return $response;
 }
开发者ID:ibergonzi,项目名称:country,代码行数:15,代码来源:UfController.php

示例4: function

$this->params['breadcrumbs'][] = ['label' => 'ทีมหมอครอบครัว', 'url' => ['kukks/index']];
$this->params['breadcrumbs'][] = 'จำนวน อสม.ต่อหลังคาเรือน';
?>


<a href="#" id="btn_sql">ชุดคำสั่ง</a>
<div id="sql" style="display: none"><?php 
echo $sql;
?>
</div>
<?php 
if (isset($dataProvider)) {
    $dev = \yii\helpers\Html::a('คุณสุพัฒนา ปิงเมือง', 'https://fb.com/kukks205', ['target' => '_blank']);
}
//echo yii\grid\GridView::widget([
echo \kartik\grid\GridView::widget(['dataProvider' => $dataProvider, 'responsive' => TRUE, 'hover' => true, 'floatHeader' => true, 'panel' => ['before' => '', 'type' => \kartik\grid\GridView::TYPE_SUCCESS, 'after' => 'โดย ' . $dev]]);
?>

<?php 
$script = <<<JS
\$('#btn_sql').on('click', function(e) {
    
   \$('#sql').toggle();
});
JS;
$this->registerJs($script);
?>



开发者ID:hdushku,项目名称:dhdc,代码行数:27,代码来源:report3.php

示例5: function

?>

	<?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 
}
开发者ID:openi-ict,项目名称:api-builder,代码行数:31,代码来源:view.php

示例6: function

use kartik\export\ExportMenu;
use kartik\grid\GridView;
use kartik\grid\DataColumn;
use yii\helpers\Html;
use dosamigos\datepicker\DatePicker;
use app\models\Faq;
use yii\helpers\Url;
$this->title = 'Faq';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="faq-index">

    <h1><?php 
echo Html::encode($this->title);
?>
</h1>

    <p>
        <?php 
echo Html::a('Создать Faq', ['create'], ['class' => 'btn btn-success']);
?>
    </p>

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'pjax' => true, 'export' => ['fontAwesome' => true], 'panel' => ['type' => GridView::TYPE_PRIMARY], 'columns' => [['class' => 'kartik\\grid\\SerialColumn'], 'title', 'status' => ['class' => DataColumn::className(), 'attribute' => 'status', 'filter' => Html::activeDropDownList($searchModel, 'status', Faq::$status, ['class' => 'form-control']), 'value' => function ($dataProvider) {
    return Faq::$status[$dataProvider->status];
}], ['class' => 'kartik\\grid\\ActionColumn', 'template' => '{update} {delete}{link}']], 'responsive' => true, 'hover' => true, 'toolbar' => ['{export}', '{toggleData}'], 'containerOptions' => ['style' => 'overflow: auto'], 'headerRowOptions' => ['class' => 'kartik-sheet-style'], 'filterRowOptions' => ['class' => 'kartik-sheet-style']]);
?>

</div>
开发者ID:efabrikov,项目名称:chomu,代码行数:30,代码来源:index.php

示例7: function

                </div>
            </div>

        </div>
        <?php 
$form->end();
?>

<?php 
?>

        <?php 
echo \kartik\grid\GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $model, 'columns' => [['class' => SerialColumn::className()], ['class' => \kartik\grid\CheckboxColumn::className()], 'user_id', 'user_name', 'email', ['class' => CheckboxColumn::className(), 'class' => DataColumn::className(), 'attribute' => 'is_validated', 'format' => 'html', 'value' => function ($model) {
    return $this->render('list_item.php', ['model' => $model, 'action' => 'is_validated']);
}], 'user_money', 'frozen_money', 'rank_points', 'pay_points', 'reg_time', ['class' => DataColumn::className(), 'format' => 'html', 'attribute' => Yii::$app->params['lang']['handler'], 'value' => function ($model) {
    return $this->render('list_item.php', ['model' => $model, 'action' => 'handler']);
}]]]);
?>




    </div>



</div>


开发者ID:xiaohongyang,项目名称:yii_shop,代码行数:27,代码来源:list.php

示例8: function

        }, 'options' => ['class' => 'col-xs-11'], 'attribute' => 'fpoints', 'pageSummary' => function ($summary, $data, $widget) {
            return "<div class = 'row'>" . "<div class = 'col-xs-10'>" . "<p class = 'pull-left'>Всего очков в туре:</p>" . "</div>" . "<div class = 'col-xs-2'>" . "<p class = 'pull-left'>{$summary}</p>" . "</div>" . "</div>";
        }, 'hAlign' => 'right', 'vAlign' => 'middle']]]);
        ?>

    <?php 
    } else {
        ?>
        <?php 
        $form = ActiveForm::begin(['action' => ['site/forecast-save']]);
        ?>
        <?php 
        echo GridView::widget(['dataProvider' => $tourGames[$tour], 'responsive' => false, 'hover' => true, 'showPageSummary' => true, 'responsiveWrap' => false, 'export' => false, 'bordered' => false, 'showHeader' => false, 'caption' => "Тур {$tour}", 'summary' => '', 'columns' => [['content' => function ($model) {
            return '<strong>' . date('d.m.y H:i', $model['date_time_game']) . '</strong>';
        }, 'options' => ['class' => 'col-xs-1'], 'contentOptions' => ['class' => 'reduceDateFont'], 'hAlign' => 'center', 'vAlign' => 'middle'], ['content' => function ($model) use($form) {
            return isset($model['score_home']) ? "<row>" . "<div class = 'text-right col-xs-5'>" . $model['idTeamHome']['idTeam']['team_name'] . " " . "</div>" . "<div class = 'text-center col-xs-2'>" . "<strong>" . $model['score_home'] . " - " . $model['score_guest'] . "</strong>" . "</div>" . "<div class = 'text-left col-xs-5'>" . " " . $model['idTeamGuest']['idTeam']['team_name'] . "</div>" . "</row>" . "<div class='clearfix visible-xs-block'></div>" . "<row>" . "<div class = 'col-xs-2 col-xs-offset-5 text-center'>" . Html::tag('div', isset($model['f_id']) ? $model['fscore_home'] . ' - ' . $model['fscore_guest'] : " - ", ['class' => !isset($model['f_id']) ? '' : ($model['fpoints'] == 0 ? 'bg-danger' : ($model['fpoints'] == 1 ? 'bg-info' : ($model['fpoints'] == 3 ? 'bg-success' : ($model['fpoints'] == 2 ? 'bg-warning' : ''))))]) . "</div>" . "<div class = 'col-xs-2 col-xs-offset-3 text-right'>" . Html::tag('span', isset($model['f_id']) ? "Очки: " . $model['fpoints'] : '', []) . "</div>" . "</row>" : "<row>" . "<div class = 'text-right col-xs-5'>" . $model['idTeamHome']['idTeam']['team_name'] . " " . "</div>" . "<div class = 'text-center col-xs-2'>" . ' - ' . "</div>" . "<div class = 'text-left col-xs-5'>" . " " . $model['idTeamGuest']['idTeam']['team_name'] . "</div>" . "</row>" . "<row>" . "<div class = 'col-xs-12 text-center'>" . Html::input('number', "forecasts[{$model['id_game']}][fscore_home]", isset($model['f_id']) ? $model['fscore_home'] : '', ['class' => 'forecast', 'form' => $form->getID(), 'maxlength' => 2, 'disabled' => $model['date_time_game'] - time() < 60 * 60 ? true : false]) . Html::input('number', "forecasts[{$model['id_game']}][fscore_guest]", isset($model['f_id']) ? $model['fscore_guest'] : '', ['class' => 'forecast', 'maxlength' => 2, 'form' => $form->getID(), 'disabled' => $model['date_time_game'] - time() < 60 * 60 ? true : false]) . "</div>" . "</row>";
        }, 'options' => ['class' => 'col-xs-11'], 'attribute' => 'fpoints', 'pageSummary' => function ($summary, $data, $widget) {
            return "<div class = 'row'>" . "<div class = 'col-xs-11'>" . "<p class = 'pull-left'>Всего очков в туре:</p>" . "</div>" . "<div class = 'col-xs-1'>" . "<p class = 'pull-left'>{$summary}</p>" . "</div>" . "</div>";
        }, 'vAlign' => 'middle']]]);
        ?>
        <p class = 'pull-right'><?php 
        echo Html::submitButton('Сохранить', ['class' => 'btn btn-success', 'form' => $form->getId()]);
        ?>
</p>
        <?php 
        ActiveForm::end();
        ?>

    <?php 
    }
    ?>
开发者ID:Andrewkha,项目名称:sportforecast,代码行数:31,代码来源:_gamesUser.php

示例9:

$dateColumn = ['attribute' => 'FDATE', 'value' => 'FDATE', 'filterType' => GridView::FILTER_DATE, 'filterWidgetOptions' => ['type' => DatePicker::TYPE_INPUT, 'pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd', 'endDate' => "+0D"]], 'format' => 'html'];
$dateColumnDisabled = ['attribute' => 'FDATE', 'value' => 'FDATE', 'format' => 'html', 'filterInputOptions' => ['disabled' => true, 'class' => 'form-control']];
/* @var $this yii\web\View */
/* @var $balanceSearchModel app\models\search\BalanceSearch */
/* @var $balanceDataProvider yii\data\ActiveDataProvider */
/* @var $coordinatesSearchModel app\models\search\CoordinatesSearch */
/* @var $coordinatesDataProvider yii\data\ActiveDataProvider */
/* @var $gadataextSearchModel app\models\search\GadataextSearch */
/* @var $gadataextDataProvider yii\data\ActiveDataProvider */
?>
<div class="device-parameters-index grid-margin">
    
    <?php 
echo GridView::widget(['dataProvider' => $gadataextDataProvider, 'filterModel' => $gadataextSearchModel, 'columns' => [['attribute' => 'GAID', 'filter' => Gadataext::getGaids(), 'width' => '120px', 'filterInputOptions' => ['disabled' => true, 'class' => 'form-control']], $dateColumn, 'KO2', 'KCO', 'KNO', 'K11', 'KCO2', 'KCH4', 'KSO2'], 'resizableColumns' => false, 'pjax' => true, 'pjaxSettings' => ['options' => ['id' => 'gadataext-pjax-container']], 'panel' => ['type' => GridView::TYPE_PRIMARY, 'heading' => '<h3 class="panel-title"><i class="fa fa-table fa-fw"></i> Коэффициенты</h3>', 'footer' => false], 'beforeHeader' => ['{pager}'], 'panelBeforeTemplate' => '<div>{pager}</div>']);
?>

    <div class="row">
        <div class="col-md-6">
            <?php 
echo GridView::widget(['dataProvider' => $balanceDataProvider, 'filterModel' => $balanceSearchModel, 'columns' => [['attribute' => 'GAID', 'filter' => Balance::getGaids(), 'width' => '120px', 'filterInputOptions' => ['disabled' => true, 'class' => 'form-control']], $dateColumnDisabled, ['attribute' => 'BAL', 'filterInputOptions' => ['disabled' => true, 'class' => 'form-control']]], 'resizableColumns' => false, 'pjax' => true, 'pjaxSettings' => ['options' => ['id' => 'balance-pjax-container']], 'panel' => ['type' => GridView::TYPE_PRIMARY, 'heading' => '<h3 class="panel-title"><i class="fa fa-table fa-fw"></i> Баланс</h3>', 'footer' => false], 'beforeHeader' => ['{pager}'], 'panelBeforeTemplate' => '<div>{pager}</div>']);
?>
        </div>
        <div class="col-md-6">
            <?php 
echo GridView::widget(['dataProvider' => $coordinatesDataProvider, 'filterModel' => $coordinatesSearchModel, 'columns' => [['attribute' => 'GAID', 'filter' => Coordinates::getGaids(), 'width' => '120px', 'filterInputOptions' => ['disabled' => true, 'class' => 'form-control']], $dateColumnDisabled, ['attribute' => 'longitude', 'filterInputOptions' => ['disabled' => true, 'class' => 'form-control']], ['attribute' => 'latitude', 'filterInputOptions' => ['disabled' => true, 'class' => 'form-control']]], 'resizableColumns' => false, 'pjax' => true, 'pjaxSettings' => ['options' => ['id' => 'coordinates-pjax-container']], 'panel' => ['type' => GridView::TYPE_PRIMARY, 'heading' => '<h3 class="panel-title"><i class="fa fa-table fa-fw"></i> Координаты</h3>', 'footer' => false], 'beforeHeader' => ['{pager}'], 'panelBeforeTemplate' => '<div>{pager}</div>']);
?>
        </div>
    </div>

</div>
开发者ID:Araused,项目名称:GaServer,代码行数:30,代码来源:device-parameters.php

示例10: function

$actionCol = ['class' => 'kartik\\grid\\ActionColumn', 'template' => '{flight}', 'buttons' => ['flight' => function ($url, $model) {
    return Html::a('<span class="glyphicon glyphicon-calendar"></span>', $url, ['title' => Yii::t('igolf', 'Make Flights')]);
}], 'urlCreator' => function ($action, $model, $key, $index) {
    if (in_array($action, array('flight'))) {
        return Url::to(['flight/competition', 'id' => $model->id]);
    }
}];
?>
<div class="competition-index">

    <h1><?php 
echo Html::encode($this->title);
?>
</h1>

    <p>
        <?php 
echo Html::a(Yii::t('igolf', 'Create {modelClass}', ['modelClass' => 'Competition']), ['create'], ['class' => 'btn btn-success']);
?>
    </p>

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'kartik\\grid\\SerialColumn'], ['label' => Yii::t('igolf', 'Part of'), 'value' => function ($model, $key, $index, $widget) {
    return $model->name . ' (' . Yii::t('igolf', $model->competition_type) . ')';
}], 'description', ['label' => Yii::t('igolf', 'Part of'), 'value' => function ($model, $key, $index, $widget) {
    return $model->parent ? $model->parent->name . ' (' . Yii::t('igolf', $model->parent->competition_type) . ')' : '-';
}], 'registration_end', $actionCol]]);
?>

</div>
开发者ID:kleitz,项目名称:golfleague,代码行数:30,代码来源:competitions.php

示例11:

<?php

use yii\helpers\Html;
use kartik\grid\GridView;
use kartik\export\ExportMenu;
/* @var $this yii\web\View */
/* @var $searchModel common\models\IncentiveSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Incentives';
$this->params['breadcrumbs'][] = $this->title;
// echo $this->render('_search', ['model' => $searchModel]);
$exportedValues = [['class' => 'kartik\\grid\\SerialColumn'], ['attribute' => 'deduction_date'], ['attribute' => 'deduction_amount'], ['attribute' => 'deduction_remark'], ['class' => 'kartik\\grid\\ActionColumn']];
$export = ExportMenu::widget(['dataProvider' => $dataProvider, 'columns' => $exportedValues, 'noExportColumns' => [0, 3], 'columnSelectorOptions' => ['label' => 'Columns', 'class' => 'btn btn-danger'], 'target' => '_blank', 'fontAwesome' => true, 'dropdownOptions' => ['label' => 'Export', 'class' => 'btn btn-success']]);
?>
				
<div class="incentive-index">

	<?php 
?>

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'pjax' => true, 'pjaxSettings' => ['neverTimeout' => true], 'columns' => $exportedValues]);
?>

</div>
开发者ID:seans888,项目名称:SMF-Project,代码行数:25,代码来源:_dropdown.php

示例12: function

use yii\bootstrap\ActiveForm;
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;
/*[4] GRID VIEW IMAGE SHOW */
$visitImage = GridView::widget(['id' => 'img-list', 'rowOptions' => function ($model, $key, $index, $grid) {
    return ['id' => $model['ID'], 'onclick' => '						
						$(document).ready(function(){
							var mtgl="' . $model["TGL"] . '";
							var muser_id="' . $model["USER_ID"] . '";
							//alert(user_id);
								$.fn.modal.Constructor.prototype.enforceFocus = function(){};
								// e.preventDefault(); 		
								$("#modal-view").modal("show")
								.find("#modalContent")
								.load("/mastercrm/review-visit/disply-image?tgl=' . $model["TGL"] . '&user_id=' . $model["USER_ID"] . '");
						}); 			
					'];
}, 'dataProvider' => $dataProviderHeader2, 'columns' => [['class' => 'kartik\\grid\\SerialColumn', 'width' => '10px', 'header' => 'No.', 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '10px', 'font-family' => 'verdana, arial, sans-serif', 'font-size' => '9pt', 'background-color' => 'rgba(249,215,100,1)']], 'contentOptions' => ['style' => ['text-align' => 'center', 'width' => '10px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt']]], ['attribute' => 'IMG_DECODE_START', 'format' => 'raw', 'label' => 'Image Start', 'value' => function ($model) {
    $base64 = 'data:image/jpg;charset=utf-8;base64,' . $model['IMG_DECODE_START'];
    return $model['IMG_DECODE_START'] != '' ? Html::img($base64, ['width' => '120', 'height' => '120']) : Html::img($model['noImage'], ['width' => '120', 'height' => '120']);
}, 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '10px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt', 'background-color' => 'rgba(74, 206, 231, 1)']], 'contentOptions' => ['style' => ['text-align' => 'center', 'width' => '10px', 'height' => '10px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt']]], ['attribute' => 'IMG_DECODE_END', 'format' => 'raw', 'label' => 'Image End', 'value' => function ($model) {
    $base64 = 'data:image/jpg;charset=utf-8;base64,' . $model['IMG_DECODE_END'];
    return $model['IMG_DECODE_END'] != '' ? Html::img($base64, ['width' => '120', 'height' => '120']) : Html::img($model['noImage'], ['width' => '120', 'height' => '120']);
}, 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '10px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt', 'background-color' => 'rgba(74, 206, 231, 1)']], 'contentOptions' => ['style' => ['text-align' => 'center', 'width' => '10px', 'height' => '10px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt']]]], 'toolbar' => [''], 'panel' => ['heading' => "<i class='fa fa-file-image-o fa-1x'></i> LIST IMAGES", 'type' => 'danger', 'footer' => false]]);
echo $visitImage;
开发者ID:adem-team,项目名称:advanced,代码行数:31,代码来源:_expand1Image.php

示例13: function

        return Html::a('<i class="glyphicon glyphicon-thumbs-down"></i> REJECT', '#', ['class' => 'btn btn-danger 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']);
    }
}
$Combo_Dept = ArrayHelper::map(Dept::find()->orderBy('SORT')->asArray()->all(), 'DEP_NM', 'DEP_NM');
?>
<div style="padding:10px;">
	
	<?php 
echo GridView::widget(['id' => 'ro-grd-index', 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'kartik\\grid\\SerialColumn', 'contentOptions' => ['class' => 'kartik-sheet-style'], 'width' => '20px', 'header' => 'No.', 'headerOptions' => ['class' => 'kartik-sheet-style']], ['attribute' => 'KD_SA', 'hAlign' => 'left', 'vAlign' => 'middle', 'group' => true], ['label' => 'Tanggal Pembuatan', 'attribute' => 'CREATED_AT', 'hAlign' => 'left', 'vAlign' => 'middle', 'group' => true, 'filterType' => \kartik\grid\GridView::FILTER_DATE_RANGE, 'filterWidgetOptions' => ['attribute' => 'parentro.CREATED_AT', 'presetDropdown' => TRUE, 'convertFormat' => true, 'pluginOptions' => ['id' => 'tglro', 'format' => 'Y/m/d', 'separator' => 'TO', 'opens' => 'left']]], ['label' => 'Pengajuan', 'group' => true, 'attribute' => 'EMP_NM', 'hAlign' => 'left', 'vAlign' => 'middle'], ['label' => 'Department', 'group' => true, 'attribute' => 'dept.DEP_NM', 'hAlign' => 'left', 'vAlign' => 'middle', 'filter' => $Combo_Dept], ['class' => 'kartik\\grid\\ActionColumn', 'dropdown' => true, 'template' => '{view}{tambahEdit}{delete}{approved}', 'dropdownOptions' => ['class' => 'pull-right dropup'], 'buttons' => ['view' => function ($url, $model) {
    return tombolView($url, $model);
}, 'tambahEdit' => function ($url, $model) {
    return tombolEdit($url, $model);
}, 'delete' => function ($url, $model) {
    return tombolDelete($url, $model);
}, 'approved' => function ($url, $model) {
    return tombolApproval($url, $model);
}]], ['label' => 'Notification', 'mergeHeader' => true, 'format' => 'raw', 'hAlign' => 'center', 'value' => function ($model) {
    return statusProcessRo($model);
}]], 'pjax' => true, 'pjaxSettings' => ['options' => ['enablePushState' => false, 'id' => 'sa-grd-index']], 'hover' => true, 'responsive' => true, 'responsiveWrap' => true, 'bordered' => true, 'striped' => '4px', 'autoXlFormat' => true, 'export' => false, 'toolbar' => [['content' => tombolCreate() . tombolBarang() . tombolKategori()], '{toggleData}'], 'panel' => ['type' => GridView::TYPE_INFO, 'heading' => "List Sales Order"]]);
?>


	<?php 
$this->registerJs("\r\n\t\t\t\$.fn.modal.Constructor.prototype.enforceFocus = function() {};\t\r\n\t\t\t\$('#new-sa').on('show.bs.modal', function (event) {\r\n\t\t\t\tvar button = \$(event.relatedTarget)\r\n\t\t\t\tvar modal = \$(this)\r\n\t\t\t\tvar title = button.data('title') \r\n\t\t\t\tvar href = button.attr('href') \r\n\t\t\t\tmodal.find('.modal-title').html(title)\r\n\t\t\t\tmodal.find('.modal-body').html('<i class=\"fa fa-spinner fa-spin\"></i>')\r\n\t\t\t\t\$.post(href)\r\n\t\t\t\t\t.done(function( data ) {\r\n\t\t\t\t\t\tmodal.find('.modal-body').html(data)\t\t\t\t\t\r\n\t\t\t\t\t});\r\n\t\t\t\t}),\t\t\t\r\n\t\t", $this::POS_READY);
Modal::begin(['id' => 'new-sa', 'header' => '<div style="float:left;margin-right:10px" class="fa fa-2x fa-book"></div><div><h4 class="modal-title">Entry Sales Order</h4></div>', 'size' => 'modal-md', 'headerOptions' => ['style' => 'border-radius:5px; background-color: rgba(131, 160, 245, 0.5)']]);
Modal::end();
$this->registerJs("\r\n\t\t\t\$.fn.modal.Constructor.prototype.enforceFocus = function() {};\t\r\n\t\t\t\$('#add-sa').on('show.bs.modal', function (event) {\r\n\t\t\t\tvar button = \$(event.relatedTarget)\r\n\t\t\t\tvar modal = \$(this)\r\n\t\t\t\tvar title = button.data('title') \r\n\t\t\t\tvar href = button.attr('href') \r\n\t\t\t\tmodal.find('.modal-title').html(title)\r\n\t\t\t\tmodal.find('.modal-body').html('<i class=\"fa fa-spinner fa-spin\"></i>')\r\n\t\t\t\t\$.post(href)\r\n\t\t\t\t\t.done(function( data ) {\r\n\t\t\t\t\t\tmodal.find('.modal-body').html(data)\t\t\t\t\t\r\n\t\t\t\t\t});\r\n\t\t\t\t}),\t\t\t\r\n\t\t", $this::POS_READY);
Modal::begin(['id' => 'add-sa', 'header' => '<h4 class="modal-title">Entry Sales Order</h4>', 'size' => 'modal-lg', 'headerOptions' => ['style' => 'border-radius:5px; background-color:rgba(230, 251, 225, 1);']]);
Modal::end();
开发者ID:adem-team,项目名称:advanced,代码行数:31,代码来源:index.php

示例14: function

use yii\data\ActiveDataProvider;
use kartik\grid\GridView;
use yii\helpers\Html;
use yii\web\View;
use yii\widgets\Breadcrumbs;
use yarcode\i18n\models\SourceMessageSearch;
use yarcode\i18n\backend\Module;
$this->title = Module::t('Translations');
echo Breadcrumbs::widget(['links' => [$this->title]]);
?>
<div class="message-index">

    <h3><?php 
echo Html::encode($this->title);
?>
</h3>
    <?php 
echo yii\bootstrap\Nav::widget(['items' => $menuItems, 'options' => ['class' => 'nav-tabs']]);
?>

    <?php 
echo GridView::widget(['filterModel' => $searchModel, 'dataProvider' => $dataProvider, 'columns' => [['attribute' => 'source', 'format' => 'raw', 'value' => function ($model, $index, $widget) {
    return Html::a($model->sourceMessage->message, ['update', 'id' => $model->sourceMessage->id], ['data' => ['pjax' => 0]]);
}], ['class' => kartik\grid\EditableColumn::className(), 'attribute' => 'translation', 'editableOptions' => ['size' => 'md', 'placement' => \kartik\popover\PopoverX::ALIGN_TOP, 'inputType' => \kartik\editable\Editable::INPUT_TEXTAREA, 'formOptions' => ['action' => \yii\helpers\Url::to(['save-translate'])], 'pluginEvents' => ["editableSuccess" => "function(val) {\n                            var id = val.currentTarget.id;\n                            var row = \$('#'+id).closest('tr');\n                            row.next().find('.kv-editable-link').trigger('click').parent().find('.kv-editable-input').focus();\n                        }"]]], ['attribute' => 'category', 'value' => function ($data) {
    return $data->sourceMessage->category;
}], ['attribute' => 'translationStatus', 'value' => function ($data) {
    return empty($data->translation) ? \Yii::t('app', 'no') : '';
}, 'filter' => ['yes' => \Yii::t('app', 'yes'), 'no' => \Yii::t('app', 'no')], 'contentOptions' => ['class' => 'text-center']], ['class' => 'kartik\\grid\\ActionColumn', 'template' => '{delete}']]]);
?>
</div>
开发者ID:yarcode,项目名称:yii2-i18n-yarcode,代码行数:30,代码来源:index.php

示例15: function

 */
$this->title = 'Reminders';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="reminders-index">
    <div class="page-header">
            <h1><?php 
echo Html::encode($this->title);
?>
</h1>
    </div>
    <?php 
// echo $this->render('_search', ['model' => $searchModel]);
?>

    <p>
        <?php 
/* echo Html::a('Create Reminders', ['create'], ['class' => 'btn btn-success'])*/
?>
    </p>

    <?php 
Pjax::begin();
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'id', 'event_id', 'title', 'offset', 'time:datetime', ['class' => 'yii\\grid\\ActionColumn', 'buttons' => ['update' => function ($url, $model) {
    return Html::a('<span class="glyphicon glyphicon-pencil"></span>', Yii::$app->urlManager->createUrl(['reminders/view', 'id' => $model->id, 'edit' => 't']), ['title' => Yii::t('yii', 'Edit')]);
}]]], 'responsive' => true, 'hover' => true, 'condensed' => true, 'floatHeader' => true, 'panel' => ['heading' => '<h3 class="panel-title"><i class="glyphicon glyphicon-th-list"></i> ' . Html::encode($this->title) . ' </h3>', 'type' => 'info', 'before' => Html::a('<i class="glyphicon glyphicon-plus"></i> Add', ['create'], ['class' => 'btn btn-success']), 'after' => Html::a('<i class="glyphicon glyphicon-repeat"></i> Reset List', ['index'], ['class' => 'btn btn-info']), 'showFooter' => false]]);
Pjax::end();
?>

</div>
开发者ID:tqsq2005,项目名称:Yii2adv,代码行数:30,代码来源:index.php


注:本文中的kartik\grid\GridView::widget方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。