Exemplo n.º 1
3
?>
</h1>
    <?php 
// echo $this->render('_search', ['model' => $searchModel]);
?>

    <p>
        <?php 
echo Html::a('<i class="glyphicon glyphicon-plus"></i> เพิ่มข้อมูล', ['create'], ['class' => 'btn btn-success']);
?>
    </p>

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'kartik\\grid\\ExpandRowColumn', 'value' => function ($model, $key, $index, $column) {
    return GridView::ROW_COLLAPSED;
}, 'detail' => function ($model, $key, $index, $column) {
    $searchModel = new CalitemsSearch();
    $searchModel->cal_id = $model->id;
    $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
    return Yii::$app->controller->renderPartial('_calitem', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
}], ['attribute' => 'caldate', 'width' => '280px', 'value' => 'caldate', 'format' => ['date', 'php:Y-m-d'], 'headerOptions' => ["style" => "width:300px;"], 'filter' => DateRangePicker::widget(['model' => $searchModel, 'attribute' => 'caldate', 'useWithAddon' => true, 'convertFormat' => true, 'language' => 'th', 'hideInput' => 1, 'pluginOptions' => ['locale' => ['format' => 'Y-m-d', 'separator' => '&'], 'opens' => 'right']])], 'by', 'remark', ['class' => 'yii\\grid\\ActionColumn']]]);
?>

</div>
<?php 
$script = <<<JS
\$(document).ready(function() {
    setInterval(function(){ \$("#refreshButton").click(); }, 3000);
});
JS;
$this->registerJs($script);
Exemplo n.º 2
2
<div class="<?php 
echo $gridId;
?>
">
    <div class="box box-default">
        <div class="box-header">
            <div class="pull-right">
                <?php 
echo Html::a('<i class="fa fa-plus"></i>', ['create'], ['class' => 'btn btn-primary btn-sm', 'title' => Pay::t('pay-admin', 'Create')]);
?>
                <?php 
echo Html::a('<i class="fa fa-trash"></i>', ['batch-delete'], ['class' => 'btn btn-danger btn-sm', 'id' => 'batch-delete', 'title' => Pay::t('pay-admin', 'Delete selected')]);
?>
            </div>
        </div>
        <div class="box-body">
            <?php 
// echo $this->render('_search', ['model' => $searchModel]);
?>

            <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'id' => $gridId, 'export' => false, 'filterModel' => $searchModel, 'columns' => [['class' => CheckboxColumn::classname()], ['attribute' => 'create_at', 'format' => 'datetime', 'filterOptions' => ['class' => 'date-range-grid'], 'filter' => DateRangePicker::widget(['model' => $searchModel, 'attribute' => 'create_at', 'convertFormat' => true, 'presetDropdown' => true, 'options' => ['class' => 'form-control'], 'pluginOptions' => ['format' => 'Y-m-d H:i:s', 'dateLimit' => ['months' => 6], 'opens' => 'right']])], ['attribute' => 'userFullName', 'value' => function ($model) {
    return $model->userFullName;
}], ['attribute' => 'ticket_id', 'value' => function ($model) {
    return $model->ticket->title;
}, 'filter' => Html::activeDropDownList($searchModel, 'ticket_id', $ticketsArray, ['class' => 'form-control', 'prompt' => ''])], 'current_cost', 'cash', 'bonus_cash', 'comment', ['template' => '{view} {delete}', 'class' => 'yii\\grid\\ActionColumn', 'buttonOptions' => ['class' => 'btn btn-default btn-xs'], 'headerOptions' => ['style' => 'width:55px;'], 'header' => Pay::t('pay-admin', 'Actions')]]]);
?>
        </div>
    </div>
</div>
Exemplo n.º 3
0
    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'rowOptions' => function ($model, $key, $index, $grid) {
    $class = '';
    switch ($model->level) {
        case \yii\log\Logger::LEVEL_INFO:
            $class = 'info';
            break;
        case \yii\log\Logger::LEVEL_WARNING:
            $class = 'warning';
            break;
        case \yii\log\Logger::LEVEL_ERROR:
            $class = 'danger';
            break;
    }
    return ['class' => $class];
}, 'columns' => [['attribute' => 'log_time', 'filter' => \kartik\daterange\DateRangePicker::widget(['model' => $searchModel, 'attribute' => 'dateRange', 'presetDropdown' => true, 'hideInput' => true, 'pluginOptions' => ['locale' => ['format' => 'DD.MM.YYYY HH:mm']]]), 'format' => 'raw', 'value' => function ($model) use($formatter) {
    return '<small>' . $formatter->asDate(intval($model->log_time)) . '</small>' . $formatter->asTime(intval($model->log_time));
}, 'options' => ['style' => 'width: 200px']], ['visible' => false, 'attribute' => 'level', 'filter' => [\yii\log\Logger::LEVEL_INFO => 'INFO', \yii\log\Logger::LEVEL_WARNING => 'WARNING', \yii\log\Logger::LEVEL_ERROR => 'ERROR', \yii\log\Logger::LEVEL_TRACE => 'TRACE', \yii\log\Logger::LEVEL_PROFILE => 'PROFILE'], 'value' => function ($model) {
    switch ($model->level) {
        case \yii\log\Logger::LEVEL_INFO:
            return 'info';
        case \yii\log\Logger::LEVEL_WARNING:
            return 'warning';
        case \yii\log\Logger::LEVEL_ERROR:
            return 'error';
    }
}], ['attribute' => 'category', 'options' => ['style' => 'width: 1%']], ['attribute' => 'message', 'format' => 'html', 'value' => function ($model) {
    return nl2br($model->message);
}]]]);
?>
    <?php 
Exemplo n.º 4
0
<div class="reports_user">
    <div class="box box-default" >
        <div class="box-header">
            <h3 class="box-title">Filter Reports</h3>
        </div>
        <div class="box-body">
            <?php 
echo Html::beginForm(['reports/products'], 'post', ['class' => '']);
?>
            <div class="col-sm-6">
                <div class="form-group">
                    <label for="date_range" class="control-label">Date Range</label>
                    <div class="">
                        <div class="input-group drp-container">
                            <?php 
echo DateRangePicker::widget(['name' => 'date_range', 'value' => isset($posted_data['date_range']) ? $posted_data['date_range'] : Yii::$app->formatter->asDate('now', 'php:d-M-y') . ' to ' . Yii::$app->formatter->asDate('now', 'php:d-M-y'), 'convertFormat' => true, 'options' => ['id' => 'date_range'], 'pluginOptions' => ['format' => 'd-M-y', 'separator' => ' to ']]);
?>
                        </div>
                    </div>
                </div>

            </div>
            <div class="col-sm-6">
                <div class="form-group">
                    <label for="player_select" class="control-label">Select Cashier</label>
                    <div class="">
                        <?php 
echo Html::dropDownList('player_select', isset($posted_data['player_select']) ? $posted_data['player_select'] : null, ['0' => 'All'] + ArrayHelper::map(UserAccounts::find()->all(), 'id', 'name'), ['class' => 'form-control', 'id' => 'player_select']);
?>
                    </div>
                </div>
Exemplo n.º 5
0
<div class="reports_user">
    <div class="box box-default" >
        <div class="box-header">
            <h3 class="box-title">Filter Reports</h3>
        </div>
        <div class="box-body">
            <?php 
echo Html::beginForm(['reports/user'], 'post', ['class' => '']);
?>
            <div class="col-sm-5">
                <div class="form-group">
                    <label for="inputEmail3" class="control-label">Date Range</label>
                    <div class="">
                        <div class="input-group drp-container">
                            <?php 
echo DateRangePicker::widget(['name' => 'date_range', 'value' => Yii::$app->request->post('date_range') ? Yii::$app->request->post('date_range') : Yii::$app->formatter->asDate('now', 'php:d-M-y') . ' to ' . Yii::$app->formatter->asDate('now', 'php:d-M-y'), 'convertFormat' => true, 'pluginOptions' => ['format' => 'd-M-y', 'separator' => ' to ']]);
?>
                        </div>
                    </div>
                </div>

            </div>
            <div class="col-sm-6">
                <div class="form-group">
                    <label for="inputEmail3" class="control-label">Select User</label>
                    <div class="">
                        <?php 
echo Html::dropDownList('player_select', null, [0 => 'All'] + ArrayHelper::map(UserAccounts::find()->all(), 'id', 'name'), ['class' => 'form-control']);
?>
                    </div>
                </div>
Exemplo n.º 6
0
<?php

use kartik\helpers\Html;
use kartik\grid\GridView;
/* @var $this yii\web\View */
/* @var $searchModel app\modules\sms\models\SentSmsSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = Yii::t('app', 'Sent Sms');
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="sent-sms-index">

    <?php 
// echo $this->render('_search', ['model' => $searchModel]);
?>



    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'PhoneNumber', 'SmsContent', ['attribute' => 'SmsTime', 'filter' => \kartik\daterange\DateRangePicker::widget(['attribute' => "SmsTime", 'model' => $searchModel, 'convertFormat' => true, 'pluginOptions' => ['locale' => ['separator' => ' 至 ', 'format' => 'Y-m-d'], 'format' => 'dd-M-yyyy', 'opens' => 'left']]), 'format' => 'html'], 'SmsUser', ['attribute' => 'Status', 'filter' => \app\modules\sms\models\SentSms::$statusEnum, 'filterWidgetOptions' => ['pluginOptions' => ['allowClear' => true]], 'value' => 'viewStatus', 'format' => 'raw'], 'SentSetIndex'], 'pjax' => false, 'headerRowOptions' => ['class' => 'kartik-sheet-style'], 'filterRowOptions' => ['class' => 'kartik-sheet-style'], 'autoXlFormat' => true, 'export' => ['fontAwesome' => true, 'showConfirmAlert' => false, 'target' => GridView::TARGET_BLANK], 'exportConfig' => [GridView::EXCEL => 'excel'], 'condensed' => true, 'hover' => true, 'panel' => ['heading' => '', 'type' => GridView::TYPE_SUCCESS, 'before' => "", 'after' => false]]);
?>

</div>
Exemplo n.º 7
0
 */
$this->title = Yii::t('user', 'Manage users');
$this->params['breadcrumbs'][] = $this->title;
$gridColumns = [['attribute' => 'group.Name', 'filter' => \common\models\cf\PersonsGroupRecord::find()->select(['Name'])->indexBy('Name')->column(), 'options' => ['style' => 'width: 1%'], 'group' => true], ['attribute' => 'accountLevelID', 'header' => 'Уровень', 'filter' => \common\models\cf\LevelsRecord::find()->select(['Name'])->indexBy('ID')->column(), 'value' => function ($model) {
    if ($model->account && $model->account->level) {
        return $model->account->level->Name;
    } else {
        return '';
    }
}, 'options' => ['style' => 'width: 1%'], 'group' => true], ['attribute' => 'ID', 'format' => 'raw', 'value' => function ($model) {
    return $model->id . ':' . $model->account->id;
}, 'options' => ['style' => 'width: 1%']], ['attribute' => 'card.HardID', 'header' => '№ карты', 'format' => 'raw', 'value' => function ($model) {
    return $model->card ? $model->card->id . ': ' . $model->card->HardID : 'без карты';
}, 'options' => ['style' => 'width: 1%']], ['attribute' => 'searchName', 'header' => 'Имя', 'format' => 'raw', 'value' => function ($model) {
    return $model->fullName;
}], ['attribute' => 'childrenCount'], ['attribute' => 'IsRegularClient', 'visible' => $searchModel->hasAttribute('IsRegularClient'), 'class' => \common\components\BooleanFilterColumn::className()], 'Phone1', 'account.Money:currency', 'account.Spend:currency', ['attribute' => 'ServiceCard', 'class' => \common\components\BooleanFilterColumn::className()], ['attribute' => 'Deleted', 'class' => \common\components\BooleanFilterColumn::className()], ['attribute' => 'RegisterDate', 'format' => 'dateTime', 'filter' => \kartik\daterange\DateRangePicker::widget(['model' => $searchModel, 'attribute' => 'RegisterDate', 'presetDropdown' => true, 'hideInput' => true, 'pluginOptions' => ['locale' => ['format' => 'DD.MM.YYYY HH:mm']]])], ['header' => Yii::t('user', 'Block status'), 'stateAttribute' => 'Blocked', 'class' => \common\components\DisableActionColumn::className(), 'template' => '{disable}<br>{statistic} {update} {delete} ', 'buttons' => ['statistic' => function ($url, $model, $key) {
    $options = ['class' => 'btn btn-default btn-xs', 'title' => Yii::t('app', 'User\'s statistic'), 'aria-label' => Yii::t('app', 'User\'s statistic')];
    return Html::a('<span class="glyphicon glyphicon-stats"></span>', \yii\helpers\Url::to(['/finances/person', 'id' => $model->ID]), $options);
}, 'delete' => function ($url, $model, $key) {
    $options = ['title' => Yii::t('yii', 'Delete'), 'aria-label' => Yii::t('yii', 'Delete'), 'data-confirm' => Yii::t('app', 'Are you sure you want to totally delete this user?'), 'data-method' => 'post', 'data-pjax' => '0', 'class' => 'btn btn-default btn-xs btn-danger'];
    return Html::a('<span class="glyphicon glyphicon-trash"></span>', $url, $options);
}], 'buttonOptions' => ['class' => 'btn btn-default btn-xs'], 'options' => ['style' => 'width: 145px'], 'contentOptions' => ['style' => 'text-align: center']]];
echo ExportMenu::widget(['dataProvider' => $dataProvider, 'columns' => $gridColumns, 'target' => '_self', 'selectedColumns' => [0, 3, 4, 9], 'disabledColumns' => [1, 2], 'fontAwesome' => true, 'showConfirmAlert' => false, 'dropdownOptions' => ['label' => 'Экспортровать всех', 'class' => 'btn btn-primary'], 'exportConfig' => [ExportMenu::FORMAT_CSV => false, ExportMenu::FORMAT_PDF => false], 'deleteAfterSave' => true]) . "<hr>\n";
?>

<?php 
Pjax::begin();
?>

<?php 
echo KartikGridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'export' => ['target' => \kartik\grid\GridView::TARGET_SELF, 'fontAwesome' => true, 'showConfirmAlert' => false, 'deleteAfterSave' => true], 'rowOptions' => function ($model, $key, $index, $grid) {
Exemplo n.º 8
0
    <div class="box box-default">
        <div class="box-header">
            <div class="pull-right">
                <?php 
echo Html::a('<i class="glyphicon glyphicon-plus"></i>', ['create'], ['class' => 'btn btn-primary btn-sm', 'title' => Module::t('eugenekei-news', 'Create')]);
?>
                <?php 
echo Html::a('<i class="glyphicon glyphicon-trash"></i>', ['batch-delete'], ['class' => 'btn btn-danger btn-sm', 'id' => 'batch-delete', 'title' => Module::t('eugenekei-news', 'Delete selected')]);
?>
            </div>
        </div>
        <div class="box-body">

            <?php 
// echo $this->render('_search', ['model' => $searchModel]);
?>

            <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'id' => $gridId, 'options' => ['class' => 'table-responsive'], 'filterModel' => $searchModel, 'columns' => [['class' => CheckboxColumn::classname()], 'title', ['attribute' => 'status', 'value' => function ($model) {
    return $model->getStatusArray()[$model->status];
}, 'filter' => Html::activeDropDownList($searchModel, 'status', $statusArray, ['class' => 'form-control', 'prompt' => ''])], ['attribute' => 'created_at', 'format' => 'datetime', 'filter' => DateRangePicker::widget(['model' => $searchModel, 'attribute' => 'created_at', 'convertFormat' => true, 'presetDropdown' => true, 'options' => ['class' => 'form-control'], 'pluginOptions' => ['format' => 'Y-m-d H:i:s', 'dateLimit' => ['months' => 6], 'opens' => 'left']])], ['attribute' => 'user_id', 'value' => function ($model) {
    $authorModel = Yii::$app->controller->module->authorModel;
    $authorNameField = Yii::$app->controller->module->authorNameField;
    return $model->{$authorModel}->{$authorNameField};
}], ['class' => 'yii\\grid\\ActionColumn', 'buttonOptions' => ['class' => 'btn btn-default btn-xs'], 'headerOptions' => ['style' => 'width:95px;'], 'header' => Module::t('eugenekei-news', 'Actions')]]]);
?>

        </div>
    </div>
</div>
Exemplo n.º 9
0
?>
            </div>
        </div>
        <div class="box-body">

            <?php 
// echo $this->render('_search', ['model' => $searchModel]);
?>

            <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'id' => $gridId, 'options' => ['class' => 'table-responsive'], 'filterModel' => $searchModel, 'rowOptions' => function ($model) {
    $array = [];
    if ($model->profile->balance < 0) {
        $array['class'] = 'danger';
        return $array;
    }
}, 'columns' => [['class' => CheckboxColumn::classname()], ['label' => false, 'format' => 'image', 'value' => 'profile.fullAvatarUrl', 'contentOptions' => ['class' => 'grid-avatar']], 'profile.surname', 'profile.name', 'profile.middle_name', ['attribute' => 'status', 'value' => function ($data) {
    return $data->statusArray[$data->status];
}, 'filter' => Html::activeDropDownList($searchModel, 'status', $statusArray, ['class' => 'form-control', 'prompt' => ''])], ['attribute' => 'created_at', 'format' => 'datetime', 'filterOptions' => ['class' => 'date-range-grid'], 'filter' => DateRangePicker::widget(['model' => $searchModel, 'attribute' => 'created_at', 'convertFormat' => true, 'presetDropdown' => true, 'options' => ['class' => 'form-control'], 'pluginOptions' => ['format' => 'Y-m-d H:i:s', 'dateLimit' => ['months' => 6], 'opens' => 'left']])], ['class' => 'yii\\grid\\ActionColumn', 'buttonOptions' => ['class' => 'btn btn-default btn-xs'], 'headerOptions' => ['style' => 'width:155px;'], 'header' => Module::t('user-admin', 'Actions'), 'template' => '{pay} {history} {view} {update} {delete}', 'buttons' => ['pay' => function ($url, $model) {
    $customurl = Yii::$app->getUrlManager()->createUrl(['/pay/default/create/', 'user_id' => $model->id]);
    return Yii::$app->user->can('/pay/*') ? \yii\helpers\Html::a('<span class="fa fa-money"></span>', $customurl, ['title' => Module::t('user-admin', 'Pay'), 'data-pjax' => '0', 'class' => 'btn btn-default btn-xs']) : '';
}, 'history' => function ($url, $model) {
    $customurl = Yii::$app->getUrlManager()->createUrl(['/pay/default/index/', 'PaySearch' => ['user_id' => $model->id]]);
    return Yii::$app->user->can('/pay/*') ? \yii\helpers\Html::a('<span class="fa fa-history"></span>', $customurl, ['title' => Module::t('user-admin', 'Payment history'), 'data-pjax' => '0', 'class' => 'btn btn-default btn-xs']) : '';
}]]]]);
?>

        </div>
    </div>
</div>
Exemplo n.º 10
0
<div class="faer-index">

    <h1><?php 
echo Html::encode($this->title);
?>
</h1>
    <?php 
echo $this->render('_search3', ['model' => $searchModel]);
?>

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'responsive' => true, 'resizableColumns' => true, 'panel' => ['before' => ''], 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'faer_no', ['attribute' => 'nit_ejecuto', 'value' => function ($data) {
    return $data->nitEjecuto->razon_social;
}, 'filter' => \kartik\select2\Select2::widget(['name' => 'nit_ejecuto', 'data' => ArrayHelper::map(\app\models\OperadorRed::find()->all(), 'nit', 'razon_social'), 'options' => ['placeholder' => ''], 'pluginOptions' => ['allowClear' => true]])], ['attribute' => 'fecha_radicacion', 'value' => function ($data) {
    return $data->fecha_radicacion;
}, 'filter' => DateRangePicker::widget(['model' => $searchModel, 'attribute' => 'fecha_radicacion', 'convertFormat' => true, 'pluginOptions' => ['timePicker' => false, 'format' => 'Y-m-d']])], 'proyecto', ['attribute' => 'Dpto', 'value' => function ($data) {
    if (count($data->detalleProyectos) > 0) {
        return app\models\Divipola::findOne(['id_dpto' => $data->detalleProyectos[0]->id_departamento])->dpto;
    } else {
        return "";
    }
}, 'filter' => \kartik\select2\Select2::widget(['name' => 'dpto', 'data' => ArrayHelper::map(\app\models\Divipola::find()->all(), 'id_dpto', 'dpto'), 'options' => ['placeholder' => ''], 'pluginOptions' => ['allowClear' => true]])], ['attribute' => 'Total Beneficiarios', 'contentOptions' => ['style' => 'text-align: right;'], 'value' => function ($data, $acum) use(&$global_acum_beneficiarios) {
    if (count($data->detalleProyectos) > 0) {
        foreach ($data->detalleProyectos as $d) {
            $acum += $d->usuarios_nuevos;
        }
        $global_acum_beneficiarios += $acum;
        return $global_acum_beneficiarios;
    } else {
        return $global_acum_beneficiarios;
    }
Exemplo n.º 11
0
    <h1><?php 
echo Html::encode($this->title);
?>
</h1>
    <?php 
// echo $this->render('_search', ['model' => $searchModel]);
?>

    <p>
     
         <?php 
echo Html::button('Create LHPSP', ['value' => Url::to(['tmaster/create']), 'class' => 'btn btn-success', 'id' => 'modalButton']);
?>
    </p>
    
<?php 
Modal::begin(['header' => '<h4>LHPSP</h4>', 'id' => 'modal', 'size' => 'modal-lg']);
echo "<div id='modalContent'></div>";
Modal::end();
?>
 
    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'nolphsp', ['attribute' => 'tgllhpsp', 'value' => 'tgllhpsp', 'format' => 'raw', 'filter' => DateRangePicker::widget(['model' => $searchModel, 'attribute' => 'tgllhpsp', 'convertFormat' => true, 'pluginOptions' => ['timePicker' => true, 'timePickerIncrement' => 30, 'separator' => ' TO ', 'format' => 'Y-m-d '], 'pluginEvents' => ["apply.daterangepicker" => "function() {apply_filter('tgllhpsp')}"]])], ['attribute' => 'idkapal', 'value' => 'idkapal0.kapal_nama'], 'voy', ['class' => 'yii\\grid\\ActionColumn', 'template' => '{cetak}', 'buttons' => ['cetak' => function ($url, $model) {
    return Html::a('CETAK LHPSP', ['cetak-word', 'id' => $model->id], ['class' => 'btn btn-warning']);
}]], ['class' => 'yii\\grid\\ActionColumn']]]);
?>

</div>

Exemplo n.º 12
0
             $("#kelasMahasiswa").replaceWith("<p id =kelasMahasiswa>"+data[0].kelas + "</p>");
             $("#semesterMahasiswa").replaceWith("<p id =semesterMahasiswa>"+data[0].semester + "</p>");
             $("#waliMahasiswa").replaceWith("<p id =waliMahasiswa>"+data[0].wali + "</p>");
             $(".matakuliahIzin").replaceWith("<div class=matakuliahIzin style=\\" display:none\\"> </div>");
             $("#Krad").attr("checked" , false);$("#Srad").attr("checked" , false);

             $(".matakuliahIzin").append("<label class=\\"control-label\\" for=FormIzin[matakuliahList][]> Matakuliah Yang Tidak Di Ikuti</label> <br/> <br/>");
            $.each( data[0].matakuliah, function( key, value ) {
            $(".matakuliahIzin").append("<input  id=ck"+value.matakuliah.split(" ")[0] +" type=checkbox value ="+value.matakuliah+" name=FormIzin[matakuliahList][] class=mtkuliah ><label class=\\"control-label\\" for= "+value.matakuliah+" >"+value.matakuliah+"</label> </input>");
                        }); 

    });

}']]);
echo '<label class="control-label">Waktu Izin</label>';
echo DateRangePicker::widget(['model' => $model, 'attribute' => 'tanggal', 'convertFormat' => true, 'pluginOptions' => ['timePicker' => true, 'hideInput' => true, 'separator' => ' s/d ', 'timePickerIncrement' => 10, 'format' => 'Y-m-d H:i']]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 1, 'attributes' => ['alasan_ijin' => ['label' => 'Alasan', 'type' => Form::INPUT_TEXTAREA, 'options' => ['placeholder' => 'Max 30 Characters', 'maxlength' => 30]]]]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 2, 'attributes' => ['lampiran' => ['label' => 'Nama Lampiran', 'type' => Form::INPUT_TEXT], 'file_lampiran' => ['label' => 'Bukti Lampiran', 'type' => Form::INPUT_FILE]]]);
?>


    <div class="panel panel-info" id="dataMahasiswa" >
        <!-- Default panel contents -->
        <div class="panel-heading">Data Mahasiswa</div>

        <!-- Table -->
        <table class="table">

            <tr><td>Nama</td> <td>:</td> <td><p id="namaMahasiswa">Nama Mahasiswa</p></td></tr>

            <tr><td>NIM</td> <td>:</td> <td><p id="nimMahasiswa">Nama Mahasiswa</p></td></tr>
Exemplo n.º 13
0
    <h2><?php 
echo Html::encode($this->title);
?>
</h2>

    <p>
        <?php 
echo Html::a(Yii::t('content-manager', 'Add new content block'), ['create'], ['class' => 'btn btn-success']);
?>
    </p>

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'pager' => ['firstPageLabel' => true, 'lastPageLabel' => true], 'rowOptions' => function ($model, $key, $index, $grid) {
    return ['id' => $model['id'], 'style' => 'text-align: center;'];
}, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'key', 'name', ['attribute' => 'status', 'format' => 'html', 'value' => function ($data) {
    if ($data->status === Content::STATUS_BLOCKED) {
        return Html::tag('span', $data->StatusName, ['class' => 'label label-danger']);
    }
    if ($data->status === Content::STATUS_ACTIVE) {
        return Html::tag('span', $data->StatusName, ['class' => 'label label-success']);
    }
    return $data->StatusName;
}, 'filter' => Content::getStatuses()], ['attribute' => 'created_at', 'format' => ['date', 'php:d.m.Y H:i:s'], 'filter' => DateRangePicker::widget(['useWithAddon' => true, 'presetDropdown' => true, 'hideInput' => true, 'model' => $searchModel, 'attribute' => 'createdRange', 'convertFormat' => true, 'pluginOptions' => ['timePicker' => true, 'timePickerIncrement' => 1, 'format' => 'U', 'opens' => 'left'], 'containerTemplate' => '<span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i>
                        </span><span class="form-control text-right"><span class="pull-left">
                        <span class="range-value" style="display: none;">{value}</span></span><b class="caret"></b>
                        {input}</span>']), 'options' => ['class' => 'col-sm-1']], ['class' => 'yii\\grid\\ActionColumn']]]);
?>

</div>
Exemplo n.º 14
0
use kartik\helpers\Html;
use kartik\grid\GridView;
/* @var $this yii\web\View */
/* @var $searchModel app\modules\sms\models\SentSmsSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = "发送统计";
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="sent-sms-index">

    <?php 
// echo $this->render('_search', ['model' => $searchModel]);
?>



    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['attribute' => 'SmsTime', 'filter' => \kartik\daterange\DateRangePicker::widget(['attribute' => "SmsTime", 'model' => $searchModel, 'convertFormat' => true, 'pluginOptions' => ['locale' => ['separator' => ' 至 ', 'format' => 'Y-m-d'], 'format' => 'dd-M-yyyy', 'opens' => 'left']]), 'format' => 'html', 'header' => '日期', 'headerOptions' => ['width' => 210], 'value' => function ($data) {
    return $data['date'];
}], ['header' => '发送成功数', 'value' => function ($data) {
    return $data['succeed'];
}], ['header' => '发送失败数', 'value' => function ($data) {
    return $data['all'] - $data['succeed'];
}], ['header' => '发送总数', 'value' => function ($data) {
    return $data['all'];
}]], 'pjax' => false, 'headerRowOptions' => ['class' => 'kartik-sheet-style'], 'filterRowOptions' => ['class' => 'kartik-sheet-style'], 'autoXlFormat' => true, 'export' => ['fontAwesome' => true, 'showConfirmAlert' => false, 'target' => GridView::TARGET_BLANK], 'exportConfig' => [GridView::EXCEL => 'excel'], 'condensed' => true, 'hover' => true, 'panel' => ['heading' => '', 'type' => GridView::TYPE_SUCCESS, 'before' => "", 'after' => false]]);
?>

</div>
Exemplo n.º 15
0
echo AlertBlock::widget(['type' => AlertBlock::TYPE_ALERT, 'useSessionFlash' => true]);
?>
 <p>
        <?php 
echo Html::a('<i class="fa fa-plus"></i> ' . Yii::t('app', 'Buat Tugas'), ['create'], ['class' => 'btn btn-md btn-success']);
?>

</p>

<div class="row">
    <div class="col-lg-6">
    <form method="post">
    <div class="form-group">
    <div class="input-group drp-container">
      <?php 
echo DateRangePicker::widget(['name' => 'Laporan[tgl_laporan]', 'convertFormat' => true, 'useWithAddon' => true, 'pluginOptions' => ['format' => 'd M Y', 'separator' => ' - ', 'open' => 'left']]);
?>
      <input type="hidden" name="<?php 
echo Yii::$app->request->csrfParam;
?>
"
      value="<?php 
echo Yii::$app->request->csrfToken;
?>
" />
      <span class="input-group-btn">
        <button type="submit" class="btn btn-primary btn-md"><i class="fa fa-upload"></i> Export</button>
      </span>
    </div>
    </div>
    </form>
Exemplo n.º 16
0
                <?php 
    if ($searchModel->status == \stronglab\checkout\models\Orders::STATUS_WAITING_DELIVERY) {
        ?>
                / Сумма доставки:
                <b><?php 
        echo number_format($summary->delivery_sum, 0, '.', '&nbsp;') . '</b>&nbsp;руб.';
        ?>
                    <?php 
    }
    ?>
                    <br/><br/>
                    <?php 
}
?>
                    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['attribute' => 'id', 'value' => function ($model) {
    return Html::a('#' . $model->id, ['view', 'id' => $model->id]);
}, 'format' => 'raw', 'options' => ['style' => 'width: 55px;']], ['attribute' => 'created', 'format' => ['date', 'php:d.m.Y H:i'], 'filter' => DateRangePicker::widget(['model' => $searchModel, 'attribute' => 'created_range', 'pluginOptions' => ['timePicker' => true, 'timePicker24Hour' => true, 'timePickerIncrement' => 10, 'locale' => ['format' => 'DD.MM.YYYY HH:mm']]])], 'name', 'address', ['label' => 'N', 'value' => 'productsCount'], ['label' => 'Сумма заказа', 'value' => function ($model) {
    return number_format($model->sum, 0, '.', '&nbsp;') . '&nbsp;руб.';
}, 'format' => 'raw'], ['attribute' => 'sumWithDelivery', 'value' => function ($model) {
    return !is_null($model->sumWithDelivery) ? number_format($model->sumWithDelivery, 0, '.', '&nbsp;') . '&nbsp;руб.' : null;
}, 'format' => 'raw'], ['attribute' => 'delivery', 'value' => function ($model) {
    return $model->getDeliveryText();
}, 'filter' => \stronglab\checkout\models\Orders::getDeliveryENum(false)], ['attribute' => 'status', 'value' => function ($model) {
    return $model->textStatus;
}, 'filter' => \stronglab\checkout\models\Orders::$statuses], ['attribute' => 'comment', 'value' => function ($model) {
    return StringHelper::truncate($model->comment, 150);
}]]]);
?>
</div>
Exemplo n.º 17
0
use yii\helpers\Html;
use kartik\grid\GridView;
use kartik\daterange\DateRangePicker;
/* @var $this yii\web\View */
/* @var $searchModel frontend\models\EventsSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
// $device_name
$this->title = '[' . $device_name . ']  Журнал событий';
$this->params['breadcrumbs'][] = ['label' => 'Мониторинг', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
$isFa = '';
$defaultExportConfig = [GridView::HTML => ['label' => 'HTML', 'icon' => $isFa ? 'file-text' : 'floppy-saved', 'iconOptions' => ['class' => 'text-info'], 'showHeader' => true, 'showPageSummary' => true, 'showFooter' => true, 'showCaption' => true, 'filename' => 'grid-export', 'alertMsg' => 'The HTML export file will be generated for download.', 'options' => ['title' => 'Hyper Text Markup Language'], 'mime' => 'text/html', 'config' => ['cssFile' => 'http://netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css']], GridView::CSV => ['label' => 'CSV', 'iconOptions' => ['class' => 'text-primary'], 'showHeader' => true, 'showPageSummary' => true, 'showFooter' => true, 'showCaption' => true, 'filename' => 'grid-export', 'alertMsg' => 'The CSV export file will be generated for download.', 'options' => ['title' => 'Comma Separated Values'], 'mime' => 'application/csv', 'config' => ['colDelimiter' => ",", 'rowDelimiter' => "\r\n"]], GridView::TEXT => ['label' => 'Text', 'icon' => $isFa ? 'file-text-o' : 'floppy-save', 'iconOptions' => ['class' => 'text-muted'], 'showHeader' => true, 'showPageSummary' => true, 'showFooter' => true, 'showCaption' => true, 'filename' => 'grid-export', 'alertMsg' => 'The TEXT export file will be generated for download.', 'options' => ['title' => 'Tab Delimited Text'], 'mime' => 'text/plain', 'config' => ['colDelimiter' => "\t", 'rowDelimiter' => "\r\n"]], GridView::EXCEL => ['label' => 'Excel', 'icon' => $isFa ? 'file-excel-o' : 'floppy-remove', 'iconOptions' => ['class' => 'text-success'], 'showHeader' => true, 'showPageSummary' => true, 'showFooter' => true, 'showCaption' => true, 'filename' => 'grid-export', 'alertMsg' => 'The EXCEL export file will be generated for download.', 'options' => ['title' => 'Microsoft Excel 95+'], 'mime' => 'application/vnd.ms-excel', 'config' => ['worksheet' => 'ExportWorksheet', 'cssFile' => '']]];
//--------------------------------------------------------------------------------------------
//https://github.com/kartik-v/yii2-date-range
$gridColumns = [['class' => '\\kartik\\grid\\SerialColumn'], ['class' => 'kartik\\grid\\DataColumn', 'attribute' => 'myDT', 'label' => 'Дата время (Устройства)', 'vAlign' => 'middle', 'width' => '3px'], ['class' => 'kartik\\grid\\DataColumn', 'attribute' => 'myDTI', 'label' => 'Дата время получения пакета', 'width' => '2px', 'hAlign' => 'center', 'filterOptions' => ['class' => 'date-range-grid'], 'filter' => DateRangePicker::widget(['model' => $searchModel, 'attribute' => 'dti', 'convertFormat' => true, 'presetDropdown' => true, 'options' => ['class' => 'form-control'], 'pluginOptions' => ['format' => 'Y-m-d', 'separator' => ' TO ', 'dateLimit' => ['months' => 6], 'opens' => 'right']])], ['class' => 'kartik\\grid\\DataColumn', 'attribute' => 'code', 'label' => 'Код события', 'vAlign' => 'middle', 'hAlign' => 'center', 'width' => '8px'], ['class' => 'kartik\\grid\\DataColumn', 'attribute' => 'myCODE', 'label' => 'Текст события', 'vAlign' => 'middle'], ['class' => 'kartik\\grid\\DataColumn', 'attribute' => 'pkt_num', 'label' => 'Номер пакета', 'vAlign' => 'middle', 'hAlign' => 'center', 'width' => '6px']];
?>
<div class="events-index">

    

    <?php 
date_default_timezone_set(Yii::$app->user->identity->user_timezone);
?>
 

     <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'columns' => $gridColumns, 'panel' => ['heading' => '<h3 class="panel-title"><i class="glyphicon glyphicon-globe"></i>Журнал событий</h3>', 'type' => 'success'], 'filterModel' => $searchModel, 'summary' => "Показаны позиции {begin, number}-{end, number} из {totalCount, number}", 'responsive' => true, 'hover' => true, 'exportConfig' => $defaultExportConfig, 'containerOptions' => ['style' => 'overflow: auto'], 'headerRowOptions' => ['class' => 'kartik-sheet-style'], 'filterRowOptions' => ['class' => 'kartik-sheet-style'], 'toolbar' => ['{export}', '{toggleData}']]);
?>

    
Exemplo n.º 18
0
        <div class="col-sm-6">
            <?php 
echo $form->field($node, "updated_time")->textInput($readOnlyinputOpts);
?>
        </div>
    </div>

     <div class="row">
         <div class="col-sm-6">
            <?php 
echo $form->field($node, 'sample')->dropDownList($dataSample, ['prompt' => '--Choose it as a sample--']);
?>
         </div>
          <div class="col-sm-6">
            <?php 
echo $form->field($node, 'access')->dropDownList($dataAccess, ['prompt' => '--Choose a access--']);
?>
         </div>
     </div>

    <div class="row">
        <div class="col-sm-6">
            <label>Trip schedule</label>
            <?php 
echo DateRangePicker::widget(['model' => $node, 'attribute' => 'schedule', 'convertFormat' => true, 'pluginOptions' => ['singleDatePicker' => true, 'timePickerIncrement' => 30, 'locale' => ['format' => 'Y-m-d']]]);
?>
        </div>
    </div>

<?php 
ActiveForm::end();
Exemplo n.º 19
0
 /**
  * Ham get html cho input theo type
  * @param string $type input co the la text, textarea, editor, date, datetime, daterange, dropdown, checkbox, radio
  * @param string $templateSetting giao dien input theo type
  * @param string $keySetting ten cua key setting
  * @param string $value gia tri cua key setting
  * @param array $items Mang cac gia tri cua setting neu setting co type la dropdown, checkbox, radio
  * @return string
  */
 private static function getInputByType($type = 'text', $templateSetting = null, $keySetting = null, $value = null, $items = [])
 {
     switch ($type) {
         case 'textarea':
             $templateSetting = Html::textarea($keySetting, $value, ['class' => 'form-control', 'title' => $keySetting]);
             break;
         case 'date':
             $templateSetting = DateControl::widget(['name' => $keySetting, 'value' => $value, 'type' => DateControl::FORMAT_DATE, 'ajaxConversion' => false, 'options' => ['pluginOptions' => ['autoclose' => true], 'options' => ['title' => $keySetting]], 'displayFormat' => 'dd-MM-yyyy', 'saveFormat' => 'yyyy-MM-dd']);
             break;
         case 'datetime':
             $templateSetting = DateControl::widget(['name' => $keySetting, 'value' => $value, 'type' => DateControl::FORMAT_DATETIME, 'ajaxConversion' => false, 'options' => ['pluginOptions' => ['autoclose' => true], 'options' => ['title' => $keySetting]], 'saveFormat' => 'yyyy-MM-dd']);
             break;
         case 'daterange':
             $templateSetting = DateRangePicker::widget(['name' => $keySetting, 'value' => $value, 'presetDropdown' => true, 'hideInput' => true, 'options' => ['title' => $keySetting]]);
             break;
         case 'dropdown':
             $templateSetting = Html::dropDownList($keySetting, $value, $items, ['class' => 'form-control', 'title' => $keySetting]);
             break;
         case 'checkbox':
             $templateSetting = Html::checkboxList($keySetting, $value, $items, ['class' => 'form-control', 'title' => $keySetting]);
             break;
         case 'radio':
             $templateSetting = Html::radioList($keySetting, $value, $items, ['class' => 'form-control', 'title' => $keySetting]);
             break;
         default:
             $templateSetting = Html::textInput($keySetting, $value, ['class' => 'form-control', 'title' => $keySetting]);
             break;
     }
     return $templateSetting;
 }
Exemplo n.º 20
0
<?php

use kartik\widgets\ActiveForm;
use kartik\daterange\DateRangePicker;
use app\modules\admin\Module;
use kartik\helpers\Html;
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_INLINE, 'method' => 'get', 'options' => ['enctype' => 'multipart/form-data', 'style' => 'float:left;margin-top:7px;']]);
echo DateRangePicker::widget(['attribute' => "date", 'name' => 'date', 'value' => \app\api\core\API::formatDate(), 'convertFormat' => true, 'pluginOptions' => ['locale' => ['separator' => ',', 'format' => 'Y-m-d'], 'opens' => 'right']]);
?>

<div style="display: inline-block">
<?php 
echo \kartik\widgets\Select2::widget(['name' => 'filter_limit', 'value' => \yii::$app->request->get('filter_limit', 50), 'data' => [20 => 20, 50 => 50, 100 => 100, 200 => 200], 'options' => ['placeholder' => '每页条数']]);
?>
</div>
<?php 
echo Html::submitButton('ok', ['class' => 'btn btn-primary']);
ActiveForm::end();