コード例 #1
0
 protected function renderFilterCellContent()
 {
     return DatePicker::widget([
         'model' => $this->grid->filterModel,
         'attribute' => $this->dateColumn,
         'template' => '{addon}{input}',
         'clientOptions' => [
             'autoclose' => true,
             'format' => 'yyyy-mm-dd',
             'disableEntry'=>true,
         ],
         'options' => [
             'data-pjax' => '0',
         ]
     ]);
 }
コード例 #2
0
ファイル: index.php プロジェクト: seans888/Proj-PhilCom
<div class="project-index">

    <h1><?php 
    echo Html::encode($this->title);
    ?>
</h1>
    <?php 
    $gridColums = [['contentOptions' => ['style' => 'font-size:13px; text-align:center;'], 'class' => 'kartik\\grid\\SerialColumn'], ['contentOptions' => ['style' => 'font-size:13px; text-align:center;'], 'attribute' => 'projectname', 'value' => 'projectname', 'filterInputOptions' => ['style' => 'width:140px;']], ['class' => 'kartik\\grid\\ExpandRowColumn', 'value' => function ($model, $key, $index, $column) {
        return GridView::ROW_COLLAPSED;
    }, 'detail' => function ($model, $key, $index, $column) {
        $searchModel = new PicSearch();
        $searchModel->id = $model->pic_id;
        $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
        return Yii::$app->controller->renderPartial('_picView', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
    }], ['contentOptions' => ['style' => 'font-size:13px; text-align:center;'], 'attribute' => 'pic_id', 'value' => 'pic.pic_fullName', 'filterType' => GridView::FILTER_SELECT2, 'filter' => ArrayHelper::map(Pic::find()->asArray()->all(), 'pic_fullName', 'pic_fullName'), 'filterWidgetOptions' => ['pluginOptions' => ['allowClear' => true]], 'filterInputOptions' => ['placeholder' => 'Choose Person', 'style' => 'width:140px;']], ['contentOptions' => ['style' => 'font-size:13px; text-align:center;'], 'attribute' => 'status', 'value' => 'status', 'filterType' => GridView::FILTER_SELECT2, 'filter' => ['FOR SITE SURVEY' => 'FOR SITE SURVEY', 'FOR DESIGNING' => 'FOR DESIGNING', 'FOR REVISION' => 'FOR REVISION', 'FOR REVIEW' => 'FOR REVIEW', 'FOR COSTING' => 'FOR COSTING', 'FOR NEGOTATION' => 'FOR NEGOTATION', 'CANCELED' => 'CANCELED', 'FOR PHILCOM PROPOSAL' => 'FOR PHILCOM PROPOSAL', 'PROPOSAL SENT/WAITING P.O' => 'PROPOSAL SENT/WAITING P.O', 'FOR MOBILAZATION' => 'FOR MOBILAZATION', 'ON-GOING' => 'ON-GOING', 'PHYSICALLY COMPLETED' => 'PHYSICALLY COMPLETED', 'ACCEPTED' => 'ACCEPTED'], 'filterWidgetOptions' => ['pluginOptions' => ['allowClear' => true]], 'filterInputOptions' => ['placeholder' => 'Choose Status', 'style' => 'width:180px;']], ['contentOptions' => ['style' => 'font-size:13px; text-align:center;'], 'attribute' => 'contractor', 'value' => 'contractor', 'filterInputOptions' => ['style' => 'width:140px;']], ['contentOptions' => ['style' => 'font-size:13px; text-align:center;'], 'attribute' => 'date_of_flob', 'filter' => DatePicker::widget(['model' => $searchModel, 'attribute' => 'date_of_flob', 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']])], ['contentOptions' => ['style' => 'font-size:13px; text-align:center;'], 'attribute' => 'date_of_completion', 'filter' => DatePicker::widget(['model' => $searchModel, 'attribute' => 'date_of_completion', 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']])], ['contentOptions' => ['style' => 'font-size:13px; text-align:center;'], 'label' => '% of Completion', 'attribute' => 'percentage_of_completion', 'value' => 'percentage_of_completion', 'filterInputOptions' => ['style' => 'width:100px;']], ['contentOptions' => ['style' => 'font-size:13px; text-align:center;'], 'attribute' => 'remarks', 'value' => 'remarks', 'filterInputOptions' => ['style' => 'width:150px;']], ['contentOptions' => ['style' => 'font-size:12px; text-align:center;'], 'attribute' => 'logs0.milestone', 'value' => 'logs0.milestoneFull'], ['class' => 'kartik\\grid\\ExpandRowColumn', 'value' => function ($model, $key, $index, $column) {
        return GridView::ROW_COLLAPSED;
    }, 'detail' => function ($model, $key, $index, $column) {
        $searchModel = new LogsSearch();
        $searchModel->project_id = $model->projectcode;
        $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
        return Yii::$app->controller->renderPartial('_logsView2', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
    }]];
    ?>

 
	
   <?php 
    echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'pjax' => true, 'columns' => $gridColums, 'responsive' => true, 'hover' => true]);
    ?>
 
コード例 #3
0
ファイル: index.php プロジェクト: andhikayuana/latyii2
$this->title = 'Customer Records';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="customer-record-index">

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

    <p>
        <?php 
if (Yii::$app->user->can('manager')) {
    ?>
            <?php 
    echo Html::a('Create Customer Record', ['create'], ['class' => 'btn btn-success']);
    ?>
        <?php 
}
?>
    </p>

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'name', ['attribute' => 'birth_date', 'format' => ['date', 'dd-MMMM-Y'], 'options' => ['style' => 'width:240px'], 'filter' => DatePicker::widget(['model' => $searchModel, 'attribute' => 'birth_date', 'template' => '{addon}{input}', 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']])], ['attribute' => 'phones.number'], ['class' => 'yii\\grid\\ActionColumn', 'header' => 'Actions', 'template' => Yii::$app->user->can('manager') ? '{view} {update} {delete}' : '{view}']]]);
?>

</div>
コード例 #4
0
ファイル: view.php プロジェクト: GAjay/Yii2
echo Html::encode($this->title);
?>
</h1>
   <?php 
// echo $this->render('_search', ['model' => $searchModel]);
?>
   <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['attribute' => 'username', 'label' => 'Mentee Name', 'format' => 'raw', 'filterInputOptions' => ['class' => 'form-control', 'placeholder' => 'Search'], 'value' => function ($data) {
    $url = Yii::$app->params['application_base'] . 'admin/user/' . $data->user_id;
    return Html::a($data->username, $url);
}, 'headerOptions' => ['width' => '17%', 'style' => 'text-align:center']], ['attribute' => 'service', 'label' => 'Service Name', 'filterInputOptions' => ['class' => 'form-control', 'placeholder' => 'Search'], 'headerOptions' => ['width' => '16%', 'style' => 'text-align:center']], ['attribute' => 'mentorname', 'label' => 'Mentor Name', 'filterInputOptions' => ['class' => 'form-control', 'placeholder' => 'Search'], 'format' => 'raw', 'value' => function ($data) {
    $url = Yii::$app->params['application_base'] . 'admin/mentor/' . $data->mentor_id;
    return Html::a($data->mentorname, $url);
}, 'headerOptions' => ['width' => '17%', 'style' => 'text-align:center']], ['attribute' => 'date', 'label' => 'Date', 'filterInputOptions' => ['class' => 'form-control', 'prompt' => 'Date'], 'value' => function ($data) {
    return date('Y-m-d', strtotime($data->date));
}, 'filter' => DatePicker::widget(['model' => $searchModel, 'attribute' => 'date', 'template' => '{input}{addon}', 'options' => ['placeholder' => 'Search'], 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-0m-dd']]), 'headerOptions' => ['width' => '15%', 'style' => 'text-align:center']], ['attribute' => 'time', 'label' => 'Time', 'filterInputOptions' => ['class' => 'form-control', 'placeholder' => 'Search'], 'format' => 'raw', 'value' => function ($data) {
    return date('h:i:s', strtotime($data->time));
}, 'headerOptions' => ['width' => '10%', 'style' => 'text-align:center']], ['attribute' => 'booking_hrs', 'label' => 'Hours', 'filterInputOptions' => ['class' => 'form-control', 'placeholder' => 'Search'], 'headerOptions' => ['width' => '10%', 'style' => 'text-align:center'], 'format' => 'raw'], ['attribute' => 'status', 'label' => 'Status', 'filterInputOptions' => ['class' => 'form-control', 'prompt' => 'All'], 'format' => 'raw', 'headerOptions' => ['width' => '10%', 'style' => 'text-align:center'], 'value' => function ($data) {
    if ($data->status == 'P') {
        return 'Pending';
    } else {
        if ($data->status == 'A') {
            return 'Approved';
        } else {
            if ($data->status == 'R') {
                return 'Rejected';
            } else {
                if ($data->status == 'D') {
                    return 'Due';
                } else {
                    if ($data->status == 'I') {
コード例 #5
0
ファイル: _logsView2.php プロジェクト: seans888/Proj-PhilCom
<?php

use yii\helpers\Html;
use kartik\grid\GridView;
use yii\widgets\Pjax;
use yii\helpers\Url;
use frontend\models\Project;
use dosamigos\datepicker\DatePicker;
/* @var $this yii\web\View */
/* @var $searchModel frontend\models\LogsSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
//$this->title = 'Project-Milestones';
//$this->params['breadcrumbs'][] = $this->title;
?>
<div class="logs-index">

	<?php 
$gridColumns = [['class' => 'yii\\grid\\SerialColumn'], 'logs_employee_name', 'milestone', ['attribute' => 'milestone_date', 'filter' => DatePicker::widget(['model' => $searchModel, 'attribute' => 'milestone_date', 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']])]];
?>
	
	
	 <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => $gridColumns, 'responsive' => true, 'hover' => true]);
?>

</div>
コード例 #6
0
}, 'attribute' => 'create_time'], ['class' => 'yii\\grid\\DataColumn', 'value' => function ($data) {
    if ($data->pay_time) {
        return date('Y-m-d H:i:s', $data->pay_time);
        // 如果是数组数据则为 $data['name'] ,例如,使用 SqlDataProvider 的情形。
    }
}, 'attribute' => 'pay_time', 'filter' => DatePicker::widget(['addon' => '', 'language' => 'zh-CN', 'name' => 'pay_time

                    ', 'value' => Yii::$app->request->get('pay_time'), 'template' => '{addon}{input}', 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']])], ['class' => 'yii\\grid\\DataColumn', 'value' => function ($data) {
    if ($data->finish_time) {
        return $data->finish_time;
        //                        return Yii::$app->formatter->asDate($data->finish_time, 'yyyy-MM-dd'); // 如果是数组数据则为 $data['name'] ,例如,使用 SqlDataProvider 的情形。
    } else {
        return '交易进行中';
    }
}, 'attribute' => 'finish_time'], 'address', ['class' => 'yii\\grid\\DataColumn', 'attribute' => 'gostatus', 'label' => '订单状态', 'value' => function ($model) {
    return \app\models\Gorder::get_gostatus1($model->gostatus);
}, 'filter' => \app\models\Gorder::get_gostatus()], ['class' => 'yii\\grid\\ActionColumn', 'controller' => 'my', 'template' => '{view}', 'header' => '查看订单详情'], ['class' => 'yii\\grid\\ActionColumn', 'header' => '操作']]]);
?>

<?php 
echo DatePicker::widget(['name' => '', 'value' => '', 'template' => '{addon}{input}', 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']]);
?>
</div>

<script>
//    用户可点击复选框来选择网格中的一些行。被选择的行可通过调用下面的JavaScript代码来获得:

    var keys = $('#grid').yiiGridView('getSelectedRows');  //为什么提示 $不存在
    // keys 为一个由与被选行相关联的键组成的数组
</script>
コード例 #7
0
ファイル: _form.php プロジェクト: specialnote/myYii
        <?php 
echo $form->field($model, 'author')->textInput(['maxlength' => true]);
?>
        <?php 
echo \common\widgets\Plupload::widget(['model' => $model, 'attribute' => 'cover_img', 'url' => '/file/upload', 'path' => Yii::$app->request->hostInfo]);
?>

        <?php 
echo $form->field($model, 'status')->radioList([Article::STATUS_DISPLAY => '可用', Article::STATUS_HIDDEN => '禁用']);
?>

        <?php 
echo Html::activeLabel($model, 'publish_at');
?>
        <?php 
echo DatePicker::widget(['model' => $model, 'attribute' => 'publish_at', 'template' => '{input} {addon}', 'language' => 'zh-CN', 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd', 'weekStart' => '1']]);
?>
        <?php 
if (Yii::$app->controller->action->id == 'create') {
    ?>
        <?php 
    echo $form->field($model, 'tag')->textInput()->hint('多个标签用;隔开');
    ?>
        <?php 
} else {
    ?>
            <?php 
    echo Html::activeLabel($model, 'tag');
    ?>
            <?php 
    echo Html::activeTextInput($model, 'tag', ['value' => $tag, 'disabled' => true]);
コード例 #8
0
use dosamigos\datepicker\DatePicker;
use common\models\ScholarsSearch;
/* @var $this yii\web\View */
/* @var $searchModel common\models\AllowanceSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Allowances';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="allowance-index">
<font color=red>Red</font> means the allowance is unsettled<br>
<font color=Blue>Blue</font> means the allowance is settled
    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'rowOptions' => function ($model) {
    if ($model->allowance_payStatus == 'not paid') {
        return ['class' => 'danger'];
    } else {
        if ($model->allowance_payStatus == 'paid') {
            return ['class' => 'success'];
        }
    }
}, 'columns' => [['class' => 'kartik\\grid\\SerialColumn'], 'allowance_amount', ['attribute' => 'allowance_paidDate', 'value' => 'allowance_paidDate', 'format' => 'raw', 'filter' => DatePicker::widget(['model' => $searchModel, 'attribute' => 'allowance_paidDate', 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']])], 'uploaded_by', 'updated_by', 'checked_by', 'checked_remark', ['class' => 'kartik\\grid\\ActionColumn', 'template' => '{view} {update} {check} {delete}', 'buttons' => ['update' => function ($url, $model) {
    return Html::a('<span class="glyphicon glyphicon-pencil"></span>', $url, ['title' => Yii::t('yii', 'Update')]);
}, 'check' => function ($url, $model) {
    return Html::a('<span class="glyphicon glyphicon-check"></span>', $url, ['title' => Yii::t('yii', 'Check')]);
}, 'delete' => function ($url, $model) {
    return Html::a('<span class="glyphicon glyphicon-trash"></span>', $url, ['title' => Yii::t('yii', 'Delete'), 'data-confirm' => Yii::t('kvgrid', 'Are you sure to delete this item?'), 'data-method' => 'post', 'data-pjax' => '0']);
}]]]]);
?>

</div>
コード例 #9
0
    <?php 
Modal::begin(['header' => '<h1>Crear Eventos</h1>', 'id' => 'modal', 'size' => 'modal-lg']);
echo "<div id='modalContent'></div>";
Modal::end();
?>
    


    <?php 
Pjax::begin();
?>
    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'rowOptions' => function ($model) {
    if ($model->STATUS_EVENT == 'cancelado') {
        return ['class' => 'danger'];
    } else {
        if ($model->STATUS_EVENT == 'realizado') {
            return ['class' => 'success'];
        } else {
            if ($model->STATUS_EVENT == 'por realizar') {
                return ['class' => 'warning'];
            }
        }
    }
}, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'NAME_EVENT', 'TYPE_EVENT', ['attribute' => 'DATE_EVENT', 'value' => 'DATE_EVENT', 'filter' => DatePicker::widget(['model' => $searchModel, 'language' => 'es', 'attribute' => 'DATE_EVENT', 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-m-d']])], 'PLACE_EVENT', 'STATUS_EVENT', ['class' => 'yii\\grid\\ActionColumn']]]);
Pjax::end();
?>
</div>

<!-- 
http://localhost/PROYECTOFINALDESARROLLO/basic/web/index.php?r=perfil-evento/index -->
コード例 #10
0
ファイル: index.php プロジェクト: krausweb/yiibooks
    <?php 
echo $this->render('_search', ['model' => $searchModel]);
?>

    <?php 
// Pjax::begin();
?>
    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'summary' => false, 'headerRowOptions' => ['class' => 'books_table_header'], 'tableOptions' => ['class' => 'table table-striped table-bordered books_table'], 'columns' => [['attribute' => 'id', 'filterOptions' => ['class' => 'filter_id']], ['attribute' => 'name'], ['attribute' => 'preview', 'format' => 'raw', 'value' => function ($model) {
    return Html::a(Html::img("/backend/web/img/small/" . $model->preview, ['alt' => $model->name, 'style' => 'height:50px;']), "/backend/web/img/original/" . $model->preview, ['title' => $model->name, 'rel' => 'fancybox']);
}, 'contentOptions' => ['class' => 'books_table_img']], ['attribute' => 'author', 'value' => function ($model) {
    return $model->author_fullname ? $model->author_fullname : Yii::t('app', 'UNKNOWN author');
}], ['attribute' => 'date', 'format' => ['date', 'php:d F Y'], 'filter' => DatePicker::widget(['model' => $searchModel, 'attribute' => 'date', 'addon' => '', 'language' => 'ru', 'clientOptions' => ['autoclose' => true, 'format' => 'dd/mm/yyyy']])], ['attribute' => 'date_create', 'value' => function ($model) {
    return $model->getBooksRelativeDate($model->date_create);
}, 'filter' => DatePicker::widget(['model' => $searchModel, 'attribute' => 'date_create', 'addon' => '', 'language' => 'ru', 'clientOptions' => ['autoclose' => true, 'format' => 'dd/mm/yyyy']])], ['class' => 'yii\\grid\\ActionColumn', 'header' => Yii::t('app', 'Action buttons'), 'contentOptions' => ['class' => 'books_table_action'], 'template' => '<table class="books_action_detail">
                                    <tbody>
                                        <tr>
                                            <td>{update}</td>
                                            <td>{view}</td>
                                            <td>{delete}{link}</td>
                                        </tr>
                                    </tbody>
                                </table>', 'buttons' => ['view' => function ($url, $model, $key) {
    return '<a href="' . $url . '" title="' . Yii::t('app', 'Button view') . '" aria-label="' . Yii::t('app', 'Button view') . '" data-pjax="0" data-toggle="modal" data-target="#view_modal_' . $key . '">
                                    <span class="glyphicon glyphicon-eye-open"></span>
                                </a>
                                <div class="modal fade" id="view_modal_' . $key . '" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                                  <div class="modal-dialog"><div class="modal-content"></div></div>
                                </div>';
}, 'update' => function ($url, $model, $key) {
コード例 #11
0
ファイル: index.php プロジェクト: seans888/Proj-PhilCom
    return GridView::ROW_COLLAPSED;
}, 'detail' => function ($model, $key, $index, $column) {
    $searchModel = new LogsSearch();
    $searchModel->project_id = $model->projectcode;
    $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
    return Yii::$app->controller->renderPartial('_logsView', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
}], ['contentOptions' => ['style' => 'font-size:13px; text-align:center;'], 'attribute' => 'projectcode', 'value' => 'projectcode', 'filterInputOptions' => ['style' => 'width:140px;']], ['contentOptions' => ['style' => 'font-size:13px; text-align:center;'], 'attribute' => 'account_id', 'value' => 'account.acct_name', 'filterType' => GridView::FILTER_SELECT2, 'filter' => ArrayHelper::map(Account::find()->asArray()->all(), 'acct_name', 'acct_name'), 'filterWidgetOptions' => ['pluginOptions' => ['allowClear' => true]], 'filterInputOptions' => ['placeholder' => 'Choose Account', 'style' => 'width:140px;']], ['contentOptions' => ['style' => 'font-size:13px; text-align:center;'], 'attribute' => 'sitename_id', 'value' => 'sitename.fullSiteName', 'filterType' => GridView::FILTER_SELECT2, 'filter' => ArrayHelper::map(Sitename::find()->asArray()->all(), 'sitename', 'sitename'), 'filterWidgetOptions' => ['pluginOptions' => ['allowClear' => true]], 'filterInputOptions' => ['placeholder' => 'Choose Sitename', 'style' => 'width:140px;']], ['class' => 'kartik\\grid\\EditableColumn', 'contentOptions' => ['style' => 'font-size:13px; text-align:center;'], 'attribute' => 'projectname', 'value' => 'projectname', 'filterInputOptions' => ['style' => 'width:140px;']], ['class' => 'kartik\\grid\\EditableColumn', 'contentOptions' => ['style' => 'font-size:13px; text-align:center; '], 'attribute' => 'pic_id', 'value' => 'pic.pic_fullName', 'filterType' => GridView::FILTER_SELECT2, 'filter' => ArrayHelper::map(Pic::find()->asArray()->all(), 'pic_fullName', 'pic_fullName'), 'filterWidgetOptions' => ['pluginOptions' => ['allowClear' => true]], 'filterInputOptions' => ['placeholder' => 'Choose Person', 'style' => 'width:150px;'], 'editableOptions' => ['inputType' => '\\kartik\\select2\\Select2', 'options' => ['data' => ArrayHelper::map(Pic::find()->all(), 'id', 'pic_fullName')]]], ['class' => 'kartik\\grid\\EditableColumn', 'contentOptions' => ['style' => 'font-size:12px; text-align:center;'], 'attribute' => 'status', 'value' => 'status', 'filterType' => GridView::FILTER_SELECT2, 'filter' => ['FOR SITE SURVEY' => 'FOR SITE SURVEY', 'FOR DESIGNING' => 'FOR DESIGNING', 'FOR REVISION' => 'FOR REVISION', 'FOR REVIEW' => 'FOR REVIEW', 'FOR COSTING' => 'FOR COSTING', 'FOR NEGOTATION' => 'FOR NEGOTATION', 'CANCELED' => 'CANCELED', 'FOR PHILCOM PROPOSAL' => 'FOR PHILCOM PROPOSAL', 'PROPOSAL SENT/WAITING P.O' => 'PROPOSAL SENT/WAITING P.O', 'FOR MOBILAZATION' => 'FOR MOBILAZATION', 'ON-GOING' => 'ON-GOING', 'PHYSICALLY COMPLETED' => 'PHYSICALLY COMPLETED', 'ACCEPTED' => 'ACCEPTED'], 'filterWidgetOptions' => ['pluginOptions' => ['allowClear' => true]], 'filterInputOptions' => ['placeholder' => 'Choose Status', 'style' => 'width:180px;'], 'editableOptions' => ['size' => 'sm', 'inputType' => \kartik\editable\Editable::INPUT_DROPDOWN_LIST, 'data' => ['FOR SITE SURVEY' => 'FOR SITE SURVEY', 'FOR DESIGNING' => 'FOR DESIGNING', 'FOR REVISION' => 'FOR REVISION', 'FOR REVIEW' => 'FOR REVIEW', 'FOR COSTING' => 'FOR COSTING', 'FOR NEGOTATION' => 'FOR NEGOTATION', 'CANCELED' => 'CANCELED', 'FOR PHILCOM PROPOSAL' => 'FOR PHILCOM PROPOSAL', 'PROPOSAL SENT/WAITING P.O' => 'PROPOSAL SENT/WAITING P.O', 'FOR MOBILAZATION' => 'FOR MOBILAZATION', 'ON-GOING' => 'ON-GOING', 'PHYSICALLY COMPLETED' => 'PHYSICALLY COMPLETED', 'ACCEPTED' => 'ACCEPTED']]], ['contentOptions' => ['style' => 'font-size:12px; text-align:center;'], 'attribute' => 'logs0.milestone', 'value' => 'logs0.milestoneFull'], ['class' => 'kartik\\grid\\EditableColumn', 'contentOptions' => ['style' => 'font-size:13px; text-align:center;'], 'attribute' => 'contractor', 'value' => 'contractor', 'filterInputOptions' => ['style' => 'width:120px;']], ['class' => 'kartik\\grid\\EditableColumn', 'contentOptions' => ['style' => 'font-size:13px; text-align:center;'], 'attribute' => 'date_of_flob', 'filter' => DatePicker::widget(['model' => $searchModel, 'attribute' => 'date_of_flob', 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']]), 'editableOptions' => ['size' => 'sm', 'inputType' => \kartik\editable\Editable::INPUT_DATE, 'options' => ['pluginOptions' => ['format' => 'yyyy-mm-dd']]]], ['class' => 'kartik\\grid\\EditableColumn', 'contentOptions' => ['style' => 'font-size:13px; text-align:center;'], 'attribute' => 'date_of_completion', 'value' => 'date_of_completion', 'filter' => DatePicker::widget(['model' => $searchModel, 'attribute' => 'date_of_completion', 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']]), 'editableOptions' => ['size' => 'sm', 'inputType' => \kartik\editable\Editable::INPUT_DATE, 'options' => ['pluginOptions' => ['format' => 'yyyy-mm-dd']]]], ['class' => 'kartik\\grid\\EditableColumn', 'contentOptions' => ['style' => 'font-size:13px; text-align:center;'], 'label' => '% of Completion', 'attribute' => 'percentage_of_completion', 'editableOptions' => ['size' => 'sm', 'inputType' => \kartik\editable\Editable::INPUT_RANGE, 'options' => ['pluginOptions' => ['min' => 0, 'max' => 100]]]], ['class' => 'kartik\\grid\\EditableColumn', 'contentOptions' => ['style' => 'font-size:13px; text-align:center;'], 'attribute' => 'remarks', 'filterInputOptions' => ['style' => 'width:140px;'], 'editableOptions' => ['size' => 'md', 'inputType' => \kartik\editable\Editable::INPUT_TEXTAREA, 'placement' => PopoverX::ALIGN_LEFT]], ['class' => 'yii\\grid\\ActionColumn', 'template' => '{delete}']];
$gridColumns3 = [['contentOptions' => ['style' => 'font-size:13px; text-align:center;'], 'attribute' => 'projectcode', 'value' => 'projectcode', 'filterInputOptions' => ['style' => 'width:140px;']], ['contentOptions' => ['style' => 'font-size:13px; text-align:center;'], 'attribute' => 'account_id', 'value' => 'account.acct_name', 'filterType' => GridView::FILTER_SELECT2, 'filter' => ArrayHelper::map(Account::find()->asArray()->all(), 'acct_name', 'acct_name'), 'filterWidgetOptions' => ['pluginOptions' => ['allowClear' => true]], 'filterInputOptions' => ['placeholder' => 'Choose Account', 'style' => 'width:140px;']], ['contentOptions' => ['style' => 'font-size:13px; text-align:center;'], 'attribute' => 'sitename_id', 'value' => 'sitename.fullSiteName', 'filterType' => GridView::FILTER_SELECT2, 'filter' => ArrayHelper::map(Sitename::find()->asArray()->all(), 'sitename', 'sitename'), 'filterWidgetOptions' => ['pluginOptions' => ['allowClear' => true]], 'filterInputOptions' => ['placeholder' => 'Choose Sitename', 'style' => 'width:140px;']], ['class' => 'kartik\\grid\\EditableColumn', 'contentOptions' => ['style' => 'font-size:13px; text-align:center;'], 'attribute' => 'projectname', 'value' => 'projectname', 'filterInputOptions' => ['style' => 'width:140px;']], ['class' => 'kartik\\grid\\EditableColumn', 'contentOptions' => ['style' => 'font-size:13px; text-align:center; '], 'attribute' => 'pic_id', 'value' => 'pic.pic_fullName', 'filterType' => GridView::FILTER_SELECT2, 'filter' => ArrayHelper::map(Pic::find()->asArray()->all(), 'pic_fullName', 'pic_fullName'), 'filterWidgetOptions' => ['pluginOptions' => ['allowClear' => true]], 'filterInputOptions' => ['placeholder' => 'Choose Person', 'style' => 'width:150px;'], 'editableOptions' => ['inputType' => '\\kartik\\select2\\Select2', 'options' => ['data' => ArrayHelper::map(Pic::find()->all(), 'id', 'pic_fullName')]]], ['class' => 'kartik\\grid\\EditableColumn', 'contentOptions' => ['style' => 'font-size:12px; text-align:center;'], 'attribute' => 'status', 'value' => 'status', 'filterType' => GridView::FILTER_SELECT2, 'filter' => ['FOR SITE SURVEY' => 'FOR SITE SURVEY', 'FOR DESIGNING' => 'FOR DESIGNING', 'FOR REVISION' => 'FOR REVISION', 'FOR REVIEW' => 'FOR REVIEW', 'FOR COSTING' => 'FOR COSTING', 'FOR NEGOTATION' => 'FOR NEGOTATION', 'CANCELED' => 'CANCELED', 'FOR PHILCOM PROPOSAL' => 'FOR PHILCOM PROPOSAL', 'PROPOSAL SENT/WAITING P.O' => 'PROPOSAL SENT/WAITING P.O', 'FOR MOBILAZATION' => 'FOR MOBILAZATION', 'ON-GOING' => 'ON-GOING', 'PHYSICALLY COMPLETED' => 'PHYSICALLY COMPLETED', 'ACCEPTED' => 'ACCEPTED'], 'filterWidgetOptions' => ['pluginOptions' => ['allowClear' => true]], 'filterInputOptions' => ['placeholder' => 'Choose Status', 'style' => 'width:180px;'], 'editableOptions' => ['size' => 'sm', 'inputType' => \kartik\editable\Editable::INPUT_DROPDOWN_LIST, 'data' => ['FOR SITE SURVEY' => 'FOR SITE SURVEY', 'FOR DESIGNING' => 'FOR DESIGNING', 'FOR REVISION' => 'FOR REVISION', 'FOR REVIEW' => 'FOR REVIEW', 'FOR COSTING' => 'FOR COSTING', 'FOR NEGOTATION' => 'FOR NEGOTATION', 'CANCELED' => 'CANCELED', 'FOR PHILCOM PROPOSAL' => 'FOR PHILCOM PROPOSAL', 'PROPOSAL SENT/WAITING P.O' => 'PROPOSAL SENT/WAITING P.O', 'FOR MOBILAZATION' => 'FOR MOBILAZATION', 'ON-GOING' => 'ON-GOING', 'PHYSICALLY COMPLETED' => 'PHYSICALLY COMPLETED', 'ACCEPTED' => 'ACCEPTED']]], ['contentOptions' => ['style' => 'font-size:12px; text-align:center;'], 'attribute' => 'logs0.milestone', 'value' => 'logs0.milestoneFull'], ['class' => 'kartik\\grid\\EditableColumn', 'contentOptions' => ['style' => 'font-size:13px; text-align:center;'], 'attribute' => 'contractor', 'value' => 'contractor', 'filterInputOptions' => ['style' => 'width:120px;']], ['class' => 'kartik\\grid\\EditableColumn', 'contentOptions' => ['style' => 'font-size:13px; text-align:center;'], 'attribute' => 'date_of_flob', 'filter' => DatePicker::widget(['model' => $searchModel, 'attribute' => 'date_of_flob', 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']]), 'editableOptions' => ['size' => 'sm', 'inputType' => \kartik\editable\Editable::INPUT_DATE, 'options' => ['pluginOptions' => ['format' => 'yyyy-mm-dd']]]], ['class' => 'kartik\\grid\\EditableColumn', 'contentOptions' => ['style' => 'font-size:13px; text-align:center;'], 'attribute' => 'date_of_completion', 'value' => 'date_of_completion', 'filter' => DatePicker::widget(['model' => $searchModel, 'attribute' => 'date_of_completion', 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']]), 'editableOptions' => ['size' => 'sm', 'inputType' => \kartik\editable\Editable::INPUT_DATE, 'options' => ['pluginOptions' => ['format' => 'yyyy-mm-dd']]]], ['class' => 'kartik\\grid\\EditableColumn', 'contentOptions' => ['style' => 'font-size:13px; text-align:center;'], 'label' => '% of Completion', 'attribute' => 'percentage_of_completion', 'editableOptions' => ['size' => 'sm', 'inputType' => \kartik\editable\Editable::INPUT_RANGE, 'options' => ['pluginOptions' => ['min' => 0, 'max' => 100]]]], ['class' => 'kartik\\grid\\EditableColumn', 'contentOptions' => ['style' => 'font-size:13px; text-align:center;'], 'attribute' => 'remarks', 'filterInputOptions' => ['style' => 'width:140px;'], 'editableOptions' => ['size' => 'md', 'inputType' => \kartik\editable\Editable::INPUT_TEXTAREA, 'placement' => PopoverX::ALIGN_LEFT]], ['class' => 'yii\\grid\\ActionColumn', 'template' => '{delete}']];
$gridColums2 = [['class' => 'kartik\\grid\\ExpandRowColumn', 'value' => function ($model, $key, $index, $column) {
    return GridView::ROW_COLLAPSED;
}, 'detail' => function ($model, $key, $index, $column) {
    $searchModel = new LogsSearch();
    $searchModel->project_id = $model->projectcode;
    $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
    return Yii::$app->controller->renderPartial('_logsView', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
}], ['contentOptions' => ['style' => 'font-size:13px; text-align:center;'], 'class' => 'kartik\\grid\\SerialColumn'], ['contentOptions' => ['style' => 'font-size:13px; text-align:center;'], 'attribute' => 'projectcode', 'value' => 'projectcode', 'filterInputOptions' => ['style' => 'width:140px;']], ['contentOptions' => ['style' => 'font-size:13px; text-align:center;'], 'attribute' => 'account_id', 'value' => 'account.acct_name', 'filterType' => GridView::FILTER_SELECT2, 'filter' => ArrayHelper::map(Account::find()->asArray()->all(), 'acct_name', 'acct_name'), 'filterInputOptions' => ['placeholder' => 'Choose Account', 'style' => 'width:140px;'], 'filterWidgetOptions' => ['pluginOptions' => ['allowClear' => true]]], ['contentOptions' => ['style' => 'font-size:12px; text-align:center;'], 'attribute' => 'sitename_id', 'value' => 'sitename.fullSiteName', 'filterType' => GridView::FILTER_SELECT2, 'filter' => ArrayHelper::map(Sitename::find()->asArray()->all(), 'sitename', 'sitename'), 'filterWidgetOptions' => ['pluginOptions' => ['allowClear' => true]], 'filterInputOptions' => ['placeholder' => 'Choose Sitename', 'style' => 'width:140px;']], ['contentOptions' => ['style' => 'font-size:13px; text-align:center;'], 'attribute' => 'projectname', 'value' => 'projectname', 'filterInputOptions' => ['style' => 'width:140px;']], ['contentOptions' => ['style' => 'font-size:12px; text-align:center;'], 'attribute' => 'pic_id', 'value' => 'pic.pic_fullName', 'filterType' => GridView::FILTER_SELECT2, 'filter' => ArrayHelper::map(Pic::find()->asArray()->all(), 'pic_fullName', 'pic_fullName'), 'filterWidgetOptions' => ['pluginOptions' => ['allowClear' => true]], 'filterInputOptions' => ['placeholder' => 'Choose Person', 'style' => 'width:140px;']], ['contentOptions' => ['style' => 'font-size:12px; text-align:center;'], 'attribute' => 'status', 'value' => 'status', 'filterType' => GridView::FILTER_SELECT2, 'filter' => ['FOR SITE SURVEY' => 'FOR SITE SURVEY', 'FOR DESIGNING' => 'FOR DESIGNING', 'FOR REVISION' => 'FOR REVISION', 'FOR REVIEW' => 'FOR REVIEW', 'FOR COSTING' => 'FOR COSTING', 'FOR NEGOTATION' => 'FOR NEGOTATION', 'CANCELED' => 'CANCELED', 'FOR PHILCOM PROPOSAL' => 'FOR PHILCOM PROPOSAL', 'PROPOSAL SENT/WAITING P.O' => 'PROPOSAL SENT/WAITING P.O', 'FOR MOBILAZATION' => 'FOR MOBILAZATION', 'ON-GOING' => 'ON-GOING', 'PHYSICALLY COMPLETED' => 'PHYSICALLY COMPLETED', 'ACCEPTED' => 'ACCEPTED'], 'filterWidgetOptions' => ['pluginOptions' => ['allowClear' => true]], 'filterInputOptions' => ['placeholder' => 'Choose Status', 'style' => 'width:180px;']], ['contentOptions' => ['style' => 'font-size:12px; text-align:center;'], 'attribute' => 'logs0.milestone', 'value' => 'logs0.milestoneFull'], ['contentOptions' => ['style' => 'font-size:13px; text-align:center;'], 'attribute' => 'contractor', 'value' => 'contractor', 'filterInputOptions' => ['style' => 'width:120px;']], ['class' => 'kartik\\grid\\EditableColumn', 'contentOptions' => ['style' => 'font-size:13px; text-align:center;'], 'attribute' => 'date_of_flob', 'filter' => DatePicker::widget(['model' => $searchModel, 'attribute' => 'date_of_flob', 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']]), 'editableOptions' => ['size' => 'sm', 'inputType' => \kartik\editable\Editable::INPUT_DATE, 'options' => ['pluginOptions' => ['format' => 'yyyy-mm-dd']]]], ['class' => 'kartik\\grid\\EditableColumn', 'contentOptions' => ['style' => 'font-size:13px; text-align:center;'], 'attribute' => 'date_of_completion', 'value' => 'date_of_completion', 'filter' => DatePicker::widget(['model' => $searchModel, 'attribute' => 'date_of_completion', 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']]), 'editableOptions' => ['size' => 'sm', 'inputType' => \kartik\editable\Editable::INPUT_DATE, 'options' => ['pluginOptions' => ['format' => 'yyyy-mm-dd']]]], ['class' => 'kartik\\grid\\EditableColumn', 'contentOptions' => ['style' => 'font-size:13px; text-align:center;'], 'label' => '% of Completion', 'attribute' => 'percentage_of_completion', 'readonly' => function ($model, $key, $index, $widget) {
    return $model->percentage_of_completion > 89;
    // do not allow editing
}, 'editableOptions' => ['size' => 'sm', 'inputType' => \kartik\editable\Editable::INPUT_RANGE, 'options' => ['pluginOptions' => ['min' => 0, 'max' => 100]]]], ['class' => 'kartik\\grid\\EditableColumn', 'contentOptions' => ['style' => 'font-size:13px; text-align:center;'], 'attribute' => 'remarks', 'filterInputOptions' => ['style' => 'width:140px;'], 'editableOptions' => ['size' => 'md', 'inputType' => \kartik\editable\Editable::INPUT_TEXTAREA, 'placement' => PopoverX::ALIGN_LEFT]]];
?>
	
	
	
    
     
	<br>
	<br>
	<br>
	
	<?php 
if ($roles == 10) {
コード例 #12
0
ファイル: index.php プロジェクト: reza-id/yii2learn
    <h1><?php 
echo Html::encode($this->title);
?>
</h1>
    <?php 
// echo $this->render('_search', ['model' => $searchModel]);
?>

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

    <?php 
Pjax::begin();
?>
    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'rowOptions' => function ($model) {
    if ($model->company_status == 'inactive') {
        return ['class' => 'danger'];
    }
}, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'company_name', 'company_email:email', 'company_address', 'company_created_date', ['attribute' => 'company_start_date', 'value' => 'company_start_date', 'format' => 'raw', 'filter' => DatePicker::widget(['model' => $searchModel, 'attribute' => 'company_start_date', 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']])], ['class' => 'yii\\grid\\ActionColumn']]]);
?>
    <?php 
Pjax::end();
?>

</div>
コード例 #13
0
ファイル: _form.php プロジェクト: wuwenhan/huoqiwang
    <?php 
echo $form->field($model, 'title')->textInput(['maxlength' => true]);
?>

    <div class="form-group field-thirdproduct-start_at required" style="width: 300px">
        <label class="control-label" for="thirdproduct-amount">有效期开始时间</label>
        <?php 
echo DatePicker::widget(['model' => $model, 'attribute' => 'use_start_at', 'language' => 'zh-CN', 'size' => 'ms', 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd', 'todayBtn' => true]]);
?>
    </div>

    <div class="form-group field-thirdproduct-start_at required" style="width: 300px">
        <label class="control-label" for="thirdproduct-amount">有效期结束时间</label>
        <?php 
echo DatePicker::widget(['model' => $model, 'attribute' => 'use_out_at', 'language' => 'zh-CN', 'size' => 'ms', 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd', 'todayBtn' => true]]);
?>
    </div>


    <?php 
echo $form->field($model, 'rate')->textInput();
?>


    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>
コード例 #14
0
ファイル: publishlogistics.php プロジェクト: wxzuan/wxzuan
?>
  
    <?php 
echo $form->field($model, 'logis_bail', ['labelOptions' => ['label' => '物品保证金(元)<span>(必填)</span>', 'class' => 'field-title contactNameField'], 'inputOptions' => ['class' => 'contactField requiredField']]);
?>
  
    <?php 
echo $form->field($model, 'logis_fee', ['labelOptions' => ['label' => '佣金<span>(必填)</span>', 'class' => 'field-title contactNameField'], 'inputOptions' => ['class' => 'contactField requiredField']]);
?>
    <?php 
echo $form->field($model, 'to_user_id', ['labelOptions' => ['label' => '收货用户<span>(必填)</span>', 'class' => 'field-title contactNameField']])->dropDownList($model->showUsername());
?>
    <div class="form-group">
        <label class="field-title contactNameField">限制到达时间<span>(必填)</span></label>
        <?php 
echo DatePicker::widget(['model' => $model, 'attribute' => 'logis_arrivetime', 'language' => 'zh-CN', 'template' => '{addon}{input}', 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-m-dd']]);
?>
    </div>
    <?php 
echo $form->field($model, 'logis_description', ['labelOptions' => ['label' => '物品简介<span>(必填)</span>', 'class' => 'field-title contactNameField']])->textArea(['class' => 'contactTextarea requiredField']);
?>


    <?php 
if (!isset($p_param['id'])) {
    ?>
        <?php 
    echo Html::submitButton('发布物流信息', ['class' => 'buttonWrap button button-red contactSubmitButton', 'name' => 'submit-button']);
    ?>
    <?php 
} else {
コード例 #15
0
                <li><a href="export">Download Data Penjualan Motor</a></li>
            </ul>
        </div>
        <!--
        <div class="col-md-2">
            <p>
                <a href="chart"><button type="button" class="btn btn-primary" style="margin-left: 10px;">
                        <span class="glyphicon glyphicon-stats" aria-hidden="true"></span> Grafik Penjualan Motor
                    </button></a>

                <a href="export"><button type="button" class="btn btn-primary" style="margin-left: 10px;">
                        <span class="glyphicon glyphicon-print" aria-hidden="true"></span> Download Data Penjualan Motor
                    </button></a>

            </p>
        </div>-->
        </div>

    <div class="table-responsive">
    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'tableOptions' => ['class' => 'table table-striped table-bordered'], 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'id', ['attribute' => 'jenisMotor0.nama', 'value' => 'motor0.jenisMotor0.nama', 'filter' => Html::activeDropDownList($searchModel, 'nama', \yii\helpers\ArrayHelper::map(\app\models\JenisMotor::find()->select('nama')->distinct()->all(), 'nama', 'nama'), ['class' => 'form-control', 'prompt' => 'Semua'])], ['attribute' => 'nama_lengkap', 'value' => 'pembeli0.nama_lengkap'], 'tipe_pembayaran', 'harga', ['attribute' => 'tgl', 'value' => 'tgl', 'format' => 'raw', 'contentOptions' => ['style' => 'width: 150px;'], 'filter' => DatePicker::widget(['model' => $searchModel, 'attribute' => 'tgl', 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']])], ['attribute' => 'foto_nota', 'format' => 'html', 'value' => function ($data) {
    return Html::img(Yii::getAlias('@web') . '/uploads/nota/' . $data['foto_nota'], ['width' => '70px']);
}], ['attribute' => 'foto_ktp', 'format' => 'html', 'value' => function ($data) {
    return Html::img(Yii::getAlias('@web') . '/uploads/ktp/' . $data['foto_ktp'], ['width' => '70px']);
}], ['class' => 'yii\\grid\\ActionColumn', 'template' => '{view} {update} {delete}', 'buttons' => ['update' => function ($url, $model) {
    return Html::a('<span class="glyphicon glyphicon-pencil"></span>', $url);
}]]]]);
?>
</div>
</div>
コード例 #16
0
ファイル: index.php プロジェクト: rxz135cc/yii2webApp
    <?php 
// echo $this->render('_search', ['model' => $searchModel]);
?>

    <p>
        <?php 
echo Html::button('Create Medical Certificate', ['value' => Url::to('index.php?r=medical-certificate/create'), 'class' => 'btn btn-success', 'id' => 'modalButton']);
?>
    </p>

    <?php 
Modal::begin(['header' => '<h4>Medical Certificate</h4>', 'id' => 'modal', 'size' => 'modal-lg']);
echo "<div id='modalContent'></div>";
Modal::end();
?>

    

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

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'mc_serial', ['attribute' => 'student_id', 'label' => 'Student Matrix', 'value' => 'student.student_matrix'], 'student.student_name', ['attribute' => 'mc_startdate', 'value' => 'mc_startdate', 'contentOptions' => ['style' => 'width:160px'], 'filter' => DatePicker::widget(['model' => $searchModel, 'attribute' => 'mc_startdate', 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-m-d']]), 'format' => 'date'], ['attribute' => 'mc_enddate', 'value' => 'mc_enddate', 'contentOptions' => ['style' => 'width:160px'], 'filter' => DatePicker::widget(['model' => $searchModel, 'attribute' => 'mc_enddate', 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-m-d']]), 'format' => 'date'], ['class' => 'yii\\grid\\ActionColumn']]]);
?>

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

</div>
コード例 #17
0
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Companies';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="companies-index">

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

    <p>
        <?php 
echo Html::a('Create Companies', ['create'], ['class' => 'btn btn-success']);
?>
    </p>
<?php 
Pjax::begin();
?>
    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'company_id', ['attribute' => 'company_start_date', 'value' => 'company_start_date', 'format' => 'raw', 'filter' => DatePicker::widget(['model' => $searchModel, 'attribute' => 'company_start_date', 'template' => '{addon}{input}', 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']])], 'company_name', 'company_email:email', 'company_address', ['class' => 'yii\\grid\\ActionColumn']]]);
?>
    <?php 
Pjax::end();
?>

</div>
コード例 #18
0
ファイル: index.php プロジェクト: rwarnasooriya/yii-advanced
use yii\widgets\Pjax;
/* @var $this yii\web\View */
/* @var $searchModel backend\modules\settings\models\UserSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Users';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="user-index">

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

    <p>
        <?php 
echo Html::a('Create User', ['create'], ['class' => 'btn btn-success']);
?>
    </p>
    <?php 
Pjax::begin();
?>
    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'firstname', 'lastname', ['attribute' => 'date_of_birth', 'value' => 'date_of_birth', 'format' => 'raw', 'filter' => DatePicker::widget(['model' => $searchModel, 'attribute' => 'date_of_birth', 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']])], 'username', ['class' => 'yii\\grid\\ActionColumn']]]);
Pjax::end();
?>
</div>
コード例 #19
0
                return ['class' => 'warning'];
            } else {
                if ($model->hrm_readed == -1) {
                    return ['class' => 'no-read'];
                } else {
                    return ['class' => 'danger'];
                }
            }
        }
    }
    if (Yii::$app->user->can('hrm') && $model->hrm_readed == -1) {
        return ['class' => 'no-read'];
    }
}, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['attribute' => 'full_name', 'value' => 'user.full_name'], array('attribute' => 'from_date', 'filter' => DatePicker::widget(['model' => $dataProvider, 'name' => 'from_date', 'value' => Yii::$app->request->get('from_date'), 'attribute' => 'from_date', 'size' => 'ms', 'template' => '{addon}{input}', 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']]), 'value' => function ($model) {
    return Yii::$app->formatter->asDate($model->from_date);
}, 'contentOptions' => array('style' => 'width: 170px;')), array('attribute' => 'to_date', 'filter' => DatePicker::widget(['model' => $dataProvider, 'name' => 'to_date', 'value' => Yii::$app->request->get('to_date'), 'attribute' => 'to_date', 'size' => 'ms', 'template' => '{addon}{input}', 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']]), 'value' => function ($model) {
    return Yii::$app->formatter->asDate($model->from_date);
}, 'contentOptions' => array('style' => 'width: 170px;')), 'from_hour', 'to_hour', array('attribute' => 'hours_off', 'filter' => false), ['attribute' => 'reason', 'filter' => ArrayHelper::map(\backend\models\ReasonApplication::find()->all(), 'id', 'name'), 'value' => 'reasonApplication.name'], ['attribute' => 'manager_ok', 'format' => 'raw', 'filter' => array('1' => 'Accept', '0' => 'Refuse', '-1' => 'Waiting'), 'value' => function ($model) {
    if ($model->manager_ok == 1) {
        $status = '<span style="color: #008000; font-size: 12px;"> Accept</span>';
    } else {
        if ($model->manager_ok == 0) {
            $status = '<span style="color: #008000; font-size: 12px;"> Refuse</span>';
        } else {
            $status = '<span style="color: #cccccc; font-size: 12px;"> Waiting</span>';
        }
    }
    //return Html::checkbox("manager_ok[]",false,array('disabled'=>true)).$status;
    return $status;
}], ['attribute' => 'hrm_ok', 'format' => 'raw', 'filter' => array('1' => 'Accept', '0' => 'Refuse', '-1' => 'Waiting'), 'value' => function ($model) {
    if ($model->hrm_ok == 1) {
コード例 #20
0
<div class="row">

    <div class="panel panel-default">
        <div class="panel-heading">
            <h3 class="panel-title">Please Fill The Form</h3>
        </div>
        <div class="panel-body">
            <div class="col-md-12">

                <label class="control-label" for="booking-date">Select Date</label>
                <?php 
$form = ActiveForm::begin(['id' => 'booking-form']);
?>
                <?php 
echo DatePicker::widget(['model' => $booking, 'attribute' => 'date', 'template' => '{addon}{input}', 'clientOptions' => ['autoclose' => true, 'startDate' => date_default_timezone_get(), 'format' => 'yyyy-mm-dd']]);
?>
            </div>


            <?php 
foreach ($tour->customFields as $field) {
    ?>
                <div class="col-sm-12">
                    <?php 
    echo $form->field($field, "{$field->id}")->textInput(['maxlength' => true, 'value' => ''])->label($field->name);
    ?>
                </div>
            <?php 
}
?>
コード例 #21
0
ファイル: _search.php プロジェクト: maxodrom/testbook
echo $form->field($model, 'name')->label(false)->textInput(['maxwidth' => true, 'placeholder' => 'название книги']);
?>
        </div>
    </div>

    <div class="row">
        <div class="col-lg-3">
            Дата выход книги:
            <?php 
echo DatePicker::widget(['name' => 'BookSearch[from_date]', 'value' => null !== Yii::$app->request->get('BookSearch')['from_date'] ? Yii::$app->request->get('BookSearch')['from_date'] : '', 'template' => '{addon}{input}', 'language' => 'ru', 'clientOptions' => ['autoclose' => true, 'format' => 'dd.mm.yyyy', 'todayHighlight' => true]]);
?>
        </div>
        <div class="col-lg-3">
            до
            <?php 
echo DatePicker::widget(['name' => 'BookSearch[to_date]', 'value' => null !== Yii::$app->request->get('BookSearch')['to_date'] ? Yii::$app->request->get('BookSearch')['to_date'] : '', 'template' => '{addon}{input}', 'language' => 'ru', 'clientOptions' => ['autoclose' => true, 'format' => 'dd.mm.yyyy', 'todayHighlight' => true]]);
?>
        </div>
        <div class="col-lg-4">
            <div>&nbsp;</div>
            <div class="form-group">
                <?php 
echo Html::submitButton('Найти', ['class' => 'btn btn-primary']);
?>
                <?php 
echo Html::a('Сброс', Url::to(['/book']), ['class' => 'btn btn-default']);
?>
            </div>
        </div>
    </div>
コード例 #22
0
ファイル: index.php プロジェクト: ynijar/basic
    <p>
        <?php 
echo Html::button('Create Post', ['value' => Url::to('index.php?r=posts%2Fcreate'), 'class' => 'btn btn-success', 'id' => 'modalButton']);
?>
    </p>

    <?php 
Modal::begin(['header' => '<h4>Create post</h4>', 'id' => 'modal', 'size' => 'modal-lg']);
echo '<div id="ModalContent"></div>';
Modal::end();
?>

    <?php 
Pjax::begin();
?>
    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'rowOptions' => function ($model) {
    if ($model->status_id == Status::NOT_ACTIVE_ID) {
        return ['class' => 'danger'];
    } elseif ($model->status_id == Status::ACTIVE_ID) {
        return ['class' => 'success'];
    }
}, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'id', ['attribute' => 'status_id', 'value' => 'status.name'], 'title', 'create', ['attribute' => 'end_date', 'value' => 'end_date', 'filter' => DatePicker::widget(['model' => $searchModel, 'attribute' => 'end_date', 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']])], 'description:ntext', ['class' => 'yii\\grid\\ActionColumn']]]);
?>
    <?php 
Pjax::end();
?>

</div>
コード例 #23
0
<?php

use yii\helpers\Html;
use dosamigos\datepicker\DatePicker;
/* @var $this yii\web\View */
/* @var $model app\models\Peso */
$this->title = 'Nuevo Peso';
$this->params['breadcrumbs'][] = ['label' => 'Pesos', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
echo DatePicker::widget(['model' => $model, 'attribute' => 'fecha', 'template' => '{addon}{input}', 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']]);
?>
<div class="peso-create">

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

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

</div>

コード例 #24
0
ファイル: index.php プロジェクト: seans888/SMF-Project
        		'attribute'=>'allowance_scholar_lastName',
        		'value'=>'allowanceScholar.scholar_lastName',
        	],
        	[
        	'attribute'=>'allowance_scholar_firstName',
        	'value'=>'allowanceScholar.scholar_firstName',
        	],
        	[
        	'attribute'=>'allowance_scholar_middleName',
        	'value'=>'allowanceScholar.scholar_middleName',
        	],     		
[
				'attribute'=>'allowance_paidDate',
				'value'=>'allowance_paidDate',
				'format'=>'raw',
				'filter'=>DatePicker::widget([
					'model' => $searchModel,
					'attribute' => 'allowance_paidDate',
						'clientOptions' => [
							'autoclose' => true,
							'format' => 'yyyy-mm-dd',
						]
				]),
			],

            ['class' => 'yii\grid\ActionColumn'],
        ],
    ]); ?>

</div>
コード例 #25
0
ファイル: _search.php プロジェクト: shahid80/EWay
                            </div>
                            <p class="help-block help-block-error clearfix"></p>
                        </div>

                        <div class="form-group field-adsearch-date_expired clearfix">
                            <?php 
echo Html::label($model->getAttributeLabel('date_expired'), null, ['class' => 'control-label col-sm-12 col-md-12 col-lg-12']);
?>
                            <div class="col-sm-6 col-md-6 col-lg-6">
                                <?php 
echo DatePicker::widget(['model' => $model, 'attribute' => 'min_date_expired', 'template' => '{addon}{input}', 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd'], 'options' => ['readonly' => 'readonly', 'placeholder' => $model->getAttributeLabel('min_date_expired')]]);
?>
                            </div>
                            <div class="col-sm-6 col-md-6 col-lg-6">
                                <?php 
echo DatePicker::widget(['model' => $model, 'attribute' => 'max_date_expired', 'template' => '{addon}{input}', 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd'], 'options' => ['readonly' => 'readonly', 'placeholder' => $model->getAttributeLabel('max_date_expired')]]);
?>
                            </div>
                            <p class="help-block help-block-error clearfix"></p>
                        </div>
                    </div>
                    
                    <div class="clearfix"></div>
                    
                    <div class="form-grou">
                        <?php 
echo Html::submitButton('Search', ['class' => 'btn btn-primary']);
?>
                        <?php 
echo Html::a('Reset', '/admin/ads', ['class' => 'btn btn-default']);
?>
コード例 #26
0
ファイル: _grid.php プロジェクト: deka6pb/yii2-simple-todo
use deka6pb\simpleTodo\models\Todo;
use dosamigos\datepicker\DatePicker;
use yii\helpers\Html;
use yii\grid\GridView;
use yii\widgets\Pjax;
/* @var $this yii\web\View */
/* @var $searchModel backend\modules\simpletodo\models\Todo */
/* @var $dataProvider yii\data\ActiveDataProvider */
?>

<?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'rowOptions' => function ($model) {
    if ($model->status == $model::STATUS_CONTINUES && date($model::FORMAT_DATETIME) > $model->date_start) {
        return ['class' => 'danger'];
    }
}, 'columns' => [['class' => 'yii\\grid\\CheckboxColumn', 'checkboxOptions' => function ($model, $key, $index, $column) {
    return ['data-id' => $model->id, 'class' => "disabled todo_status", 'checked' => $model->status == $model::STATUS_FINISHED ? true : false];
}], ['attribute' => 'text:ntext', 'format' => 'raw', 'value' => function ($model) {
    return $model->status == $model::STATUS_FINISHED ? '<span class="completed">' . $model->text . '</span>' : $model->text;
}], ['attribute' => 'type', 'filter' => Html::activeDropDownList($searchModel, 'status', Todo::getTypeAliases(), ['class' => 'form-control', 'prompt' => '--']), 'value' => function ($model) {
    return $model->getType();
}], ['attribute' => 'user_id', 'value' => function ($model) {
    return $model->getUserName();
}], ['attribute' => 'date_start', 'format' => ['date', 'php:Y-m-d H:i'], 'options' => ['width' => '200'], 'filter' => DatePicker::widget(['model' => $searchModel, 'attribute' => 'date_start', 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']])], 'duration_minute', ['class' => 'yii\\grid\\ActionColumn', 'template' => '{check}', 'buttons' => ["check" => function ($url, $model) {
    if ($model->status == $model::STATUS_CONTINUES) {
        return Html::a('<span class="glyphicon glyphicon-ok"></span>', $url, ['title' => Yii::t('app', 'Check'), 'data-pjax' => '1', 'data-toggle-active' => $model->id]);
    }
}]]]]);
?>

コード例 #27
0
ファイル: _form2.php プロジェクト: KokLip/GST
						<table id="meta">
							<tr>
								<td class="meta-head">Purchase Order #</td>
								<td><textarea class="form-control" name="po_no"><?php 
echo $model->purchaseorder_no;
?>
</textarea></td>
								<td hidden><textarea class="form-control" name="po_id"><?php 
echo $model->purchaseorder_id;
?>
</textarea></td>
							</tr>
							<tr>
								<td class="meta-head">Date</td>
								<td><?php 
echo DatePicker::widget(['model' => $model, 'attribute' => 'purchaseorder_date', 'template' => '{addon}{input}', 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd'], 'options' => ['class' => 'form-date', 'name' => 'po_date']]);
?>
								</td>
							</tr>
							<tr>
								<td class="meta-head">Amount Due</td>
								<td><div class="due">$0.00</div></td>
							</tr>
						</table>
					</td>
				</tr>
			</table>		
		</div>
		
		<div style="clear:both"></br></div>
		
コード例 #28
0
ファイル: index.php プロジェクト: deka6pb/yii2-autoparser
    <h1><?php 
echo Html::encode($this->title);
?>
</h1>
    <?php 
// echo $this->render('_search', ['model' => $searchModel]);
?>

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

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'rowOptions' => function ($model) {
    if ($model->status == $model::STATUS_PUBLISHED) {
        return ['class' => 'success'];
    } elseif ($model->status == $model::STATUS_STOPPED) {
        return ['class' => 'danger'];
    }
}, 'columns' => [['attribute' => 'id', 'options' => ['width' => '30']], ['attribute' => 'type', 'options' => ['width' => '30']], 'text:ntext', ['attribute' => 'status', 'format' => 'html', 'filter' => Html::activeDropDownList($searchModel, 'status', Posts::getStatusAliases(), ['class' => 'form-control']), 'options' => ['width' => '30'], 'value' => function ($model) {
    return $model->getStatus();
}], ['attribute' => 'tags', 'options' => ['width' => '35']], ['attribute' => 'sid', 'options' => ['width' => '35']], ['attribute' => 'provider', 'options' => ['width' => '35']], ['attribute' => 'created', 'format' => ['date', 'php:Y-m-d H:i'], 'options' => ['width' => '200'], 'filter' => DatePicker::widget(['model' => $searchModel, 'attribute' => 'created', 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']])], ['attribute' => 'published', 'format' => ['date', 'php:Y-m-d H:i'], 'options' => ['width' => '200'], 'filter' => DatePicker::widget(['model' => $searchModel, 'attribute' => 'published', 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']])], ['attribute' => 'url', 'format' => 'raw', 'options' => ['width' => '80'], 'value' => function ($model) {
    return Html::a('Go Link', $model->url, ['title' => $model->url]);
}], ['class' => 'yii\\grid\\ActionColumn']]]);
?>

</div>
コード例 #29
0
ファイル: request.php プロジェクト: kvazarum/prereg
                Заполните начальные данные
            </h4>
        </div><!-- panel-heading -->
        <div class="panel-body form-group">
<?php 
echo Select2::widget(['class' => "form-control", 'id' => "ocupations", 'name' => "ocupations", 'value' => '', 'data' => $specList, 'options' => ['multiple' => false, 'placeholder' => 'Выберите специальность ...']]);
echo '<p />';
echo Select2::widget(['class' => "form-control", 'id' => "specialists", 'name' => "specialists", 'value' => '', 'options' => ['multiple' => false, 'placeholder' => '...']]);
echo '<p /><label for="date">
                Дата приёма с:
            </label>';
echo DatePicker::widget(['id' => 'date_from', 'name' => 'date_from', 'language' => 'ru', 'value' => date('d-m-Y', time()), 'template' => '{addon}{input}', 'clientOptions' => ['autoclose' => true, 'format' => 'dd-mm-yyyy']]);
echo '<p /><label for="date">
                Дата приёма по:
            </label>';
echo DatePicker::widget(['id' => 'date_to', 'name' => 'date_to', 'language' => 'ru', 'value' => date('d-m-Y', time()), 'template' => '{addon}{input}', 'clientOptions' => ['autoclose' => true, 'format' => 'dd-mm-yyyy']]);
?>
            <p /><p />
<!--            <a class="btn btn-default" href="">Показать</a>-->
            <div class="form-group form-inline">
                
                <div class="checkbox">
                    <input id="one_day"  type="checkbox" class=”form-control”/>
                    <span>одним днём</span>
                </div>
            </div>
<!--            <div role="chekbox" />-->
                
            <button disabled="true" id='show' class="btn btn-info" onclick="">показать заявки</button>
        </div><!-- panel-body -->
    </div><!-- panel-info -->
コード例 #30
0
ファイル: _form.php プロジェクト: Kolya-an/wemamas
?>
  

   
</div>
                        </div>              
                
                <div class="col-xs-6">
                    <div class="form-group">
                        <label>Дата рождения *</label>
                    
  <?php 
//birthday
?>
 <?php 
echo DatePicker::widget(['model' => $model, 'attribute' => 'birthday', 'class' => 'form-control', 'value' => '01-Янв-1980', 'language' => 'ru', 'template' => '{addon}{input}', 'clientOptions' => ['autoclose' => true, 'format' => 'dd-M-yyyy']]);
?>
   
                  </div>
                </div>
              
        </div>
        <p class="p-text-i">
            * - поля обязательные к заполнению
        </p>
        <button class="btn btn-blue center-block">Создать аккаунт</button>
    </div>
    </div></div>
    <?php 
ActiveForm::end();
?>