示例#1
5
echo Yii::$app->request->get('news') == 'add' ? 'Новая новость (' . $news_type->name . ')' : 'Редактирование новости (' . $news_type->name . ')';
?>
</h3>
        <div class="box-tools pull-right">
            <?php 
/*=Html::a('<i class="fa fa-times"></i>', $link_close, ['class' => 'btn btn-box-tool'])*/
?>
        </div>
    </div>
    <div class="box-body">
        <div class="nav-tabs-custom">
            <?php 
$addon = '<span class="input-group-addon"><i class="fa fa-calendar"></i></span>';
?>
            <?php 
echo Tabs::widget(['items' => [['label' => 'Основные параметры', 'content' => '<p>' . $form->field($link, 'state')->checkbox() . $form->field($link, 'anchor')->label('Заголовок новости') . $form->field($link, 'title')->label('Заголовок страницы (опционально)') . $form->field($news, 'url') . $form->field($news, 'date')->widget(DatePicker::className(), ['options' => ['placeholder' => '___.___.______'], 'type' => DatePicker::TYPE_COMPONENT_PREPEND, 'pluginOptions' => ['autoclose' => true, 'format' => 'dd.mm.yyyy']]) . $form->field($news, 'date_range')->widget(DateRangePicker::classname(), ['convertFormat' => true, 'pluginOptions' => ['locale' => ['format' => 'd.m.Y', 'separator' => ' - '], 'opens' => 'left']]) . $form->field($link, 'gallery_images_id')->widget(GalleryManager::className(), ['group' => false, 'gallery_groups_id' => $news->newsType->gallery_groups_id, 'pluginOptions' => ['type' => 'promo', 'apiUrl' => 'gallery-manager', 'webRoute' => Yii::getAlias('@frontend/web')]])->label('Предварительное фото' . $news->newsType->gallery_groups_id) . '</p>', 'active' => true], ['label' => 'Дополнительно (системные параметры)', 'content' => '<p>' . $form->field($link, 'url')->staticControl() . $form->field($link, 'name') . '</p>'], ['label' => 'SEO', 'content' => '<p>' . $form->field($link, 'keywords')->textarea() . $form->field($link, 'description')->textarea() . $form->field($link, 'priority') . '</p>']]]);
?>
        </div>


        <?php 
echo $form->field($news, 'prev_text', ['template' => '{label}<div class="col-sm-12">{input}</div><div class="col-sm-10">{error}</div>', 'labelOptions' => ['class' => 'col-sm-12']])->textarea(['maxlength' => true, 'rows' => 2, 'id' => 'prev-text']);
?>

        <?php 
echo $form->field($news, 'full_text', ['template' => '{label}<div class="col-sm-12">{input}</div><div class="col-sm-10">{error}</div>', 'labelOptions' => ['class' => 'col-sm-12']])->widget(CKEditor::className(), ['options' => ['id' => 'full-text'], 'preset' => 'full', 'clientOptions' => ['height' => 300, 'toolbar' => [['name' => 'row1', 'items' => ['Maximize', 'Source', '-', 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Bold', 'Italic', 'Underline', 'Strike', '-', 'Subscript', 'Superscript', 'RemoveFormat', '-', 'TextColor', 'BGColor', '-', 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', 'list', 'indent', 'blocks', 'align', 'bidi', '-']], ['name' => 'row2', 'items' => ['Link', 'Unlink', 'Anchor', '-', 'ShowBlocks', '-', 'Image', 'Table', 'HorizontalRule', 'SpecialChar', 'Iframe', '-', 'NewPage', 'Print', 'Templates', '-', 'Undo', 'Redo', '-', 'Find', 'SelectAll', 'Format', 'Font', 'FontSize']]]]]);
?>

        <?php 
/*=$form->field($news, 'full_text', [
      'template' => '{label}<div class="col-sm-12">{input}</div><div class="col-sm-10">{error}</div>',
示例#2
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);
<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>
示例#4
1
文件: _search.php 项目: Eorling/test3
/* @var $model app\models\BooksSearch */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="books-search">

    <?php 
$form = ActiveForm::begin(['action' => ['index'], 'method' => 'get']);
?>

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

    <?php 
echo $form->field($model, 'date')->widget(\kartik\daterange\DateRangePicker::classname(), ['convertFormat' => true, 'pluginOptions' => ['format' => 'Y-m-d']]);
?>

    <?php 
echo $form->field($model, 'author_id')->dropDownList(\yii\helpers\ArrayHelper::map(\app\models\Authors::find()->all(), 'id', function ($model) {
    return $model->firstname . ' ' . $model->lastname;
}), ['prompt' => '']);
?>

    <div class="form-group">
        <?php 
echo Html::submitButton('Поиск', ['class' => 'btn btn-primary']);
?>
    </div>

    <?php 
示例#5
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>
示例#6
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>
示例#7
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>
示例#8
0
<div class="scoop-search">

    <?php 
$form = ActiveForm::begin(['method' => 'get']);
?>

    <?php 
echo $form->field($model, 'title')->label(false)->textInput(['placeholder' => 'freetext search']);
?>

    <?php 
if (isset($afterSearchTextCallback)) {
    call_user_func($afterSearchTextCallback, $this, $form, $model);
}
echo $form->field($model, 'date_published', ['addon' => ['prepend' => ['content' => '<i class="glyphicon glyphicon-calendar"></i>']], 'options' => ['class' => 'drp-container form-group']])->widget(DateRangePicker::classname(), ['useWithAddon' => true, 'convertFormat' => true, 'presetDropdown' => true, 'pluginOptions' => ['locale' => ['format' => 'd M Y', 'separator' => ' to '], 'opens' => 'left']]);
if (isset($afterSearchCalendarCallback)) {
    call_user_func($afterSearchCalendarCallback, $this, $form, $model);
}
// Normal select with ActiveForm & model
echo $form->field($model, 'keywords')->widget(Select2::classname(), ['id' => 'search-label', 'data' => \humanized\scoopit\models\gui\SearchLabel::getSelectData(), 'options' => ['placeholder' => 'Select keywords ...'], 'pluginOptions' => ['multiple' => true, 'allowClear' => true]])->label(false);
if (isset($afterSearchKeywordCallback)) {
    call_user_func($afterSearchKeywordCallback, $this, $form, $model);
}
?>

    <div class="form-group">
        <?php 
echo Html::submitButton('Search', ['class' => 'btn btn-primary']);
?>
        <?php 
示例#9
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;
 }
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}']]);
?>

    
示例#11
0
?>

    <?php 
echo $form->field($model, 'categories')->widget(Select2::classname(), ['value' => $model->isNewRecord ? [] : \common\models\Category::find()->select(['category.id'])->joinWith('posts')->where(['post.id' => $model->id])->asArray()->all(), 'data' => \yii\helpers\ArrayHelper::map(\common\models\Category::find()->where(['is not', 'parent_id', null])->select(['id', 'title'])->asArray()->all(), 'id', 'title'), 'options' => ['placeholder' => 'Categories', 'multiple' => true], 'pluginOptions' => ['tags' => true, 'allowClear' => true]]);
?>

    <?php 
echo $form->field($model, 'poster')->fileInput();
?>

    <?php 
echo $form->field($model, 'title')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'published_at', ['options' => ['class' => 'drp-container form-group']])->widget(DateRangePicker::classname(), ['model' => $model, 'attribute' => 'published_at', 'convertFormat' => true, 'pluginOptions' => ['timePicker' => true, 'timePickerIncrement' => 15, 'locale' => ['format' => 'Y-m-d H:i:s'], 'singleDatePicker' => true, 'showDropdowns' => true]]);
?>

    <?php 
echo $form->field($model, 'body')->widget(MarkdownEditor::className(), []);
?>

    <?php 
echo $form->field($model, 'is_lts')->widget(SwitchBox::className(), ['clientOptions' => ['size' => 'medium', 'onColor' => 'success', 'offColor' => 'danger']]);
?>

    <?php 
echo $form->field($model, 'keyword')->textInput(['maxlength' => true]);
?>

    <?php 
示例#12
0
}
\kartik\depdrop\DepDropAsset::register($this);
\kartik\depdrop\DepDropExtAsset::register($this);
$form = ActiveForm::begin();
echo $form->field($registraciya, 'fizLicoId')->hiddenInput()->label(false);
echo $form->field($registraciya, 'status')->hiddenInput()->label(false);
echo $form->field($registraciya, 'id')->hiddenInput()->label(false);
echo $form->field($registraciya, 'dolzhnost')->dropDownList($registraciya->getDolzhnostiFizLicaToSelect($registraciya->fizLicoId) + [-1 => 'добавить'], ['placeholder' => 'Выберите должность', 'id' => 'registraciya-dolzhnost', 'data-fizlicoid' => $registraciya->fizLicoId, 'onchange' => 'onChangeDolzhnost(this)']);
echo '<div class="panel panel-default">
  <div class="panel-heading"><b>Действующий аттестационный лист</b></div>
  <div class="panel-body">';
echo '<div class="col-md-3 no-left-padding">';
echo $form->field($registraciya, 'attestacionnyListKategoriya')->dropDownList(KategoriyaPedRabotnika::namesMap(), ['placeholder' => 'Выберите категорию', 'onChange' => 'onChangeCurrentCategoriya()', 'id' => 'attestacionnyListKategoriya']);
echo '</div>';
echo '<div id="preiod_dejstviya" class="col-md-3">';
echo $form->field($registraciya, 'attestacionnyListPeriodDejstviya', ['options' => ['class' => 'drp-container form-group', 'placeholder' => 'Выберите Период действия аттестации']])->widget(DateRangePicker::classname(), ['value' => date('d.m.Y') . ' - ' . date('d.m.Y'), 'useWithAddon' => true, 'language' => 'ru', 'hideInput' => true, 'pluginOptions' => ['format' => 'DD.MM.YYYY', 'separator' => ' - ', 'opens' => 'right']]);
echo '</div>';
echo '<div id="copiya_lista" class="col-md-3 no-right-padding">';
echo $form->field($registraciya, 'attestacionnyListPeriodFajl')->widget(\app\widgets\Files2Widget::className(), [])->label('Копия');
echo '</div>';
echo '<div id="data_okonchaniya_attestacii" class="col-md-3 no-right-padding">';
echo $form->field($registraciya, 'attestaciyaDataOkonchaniyaDejstviya')->widget(\kartik\widgets\DatePicker::className(), ['pluginOptions' => ['format' => 'dd.mm.yyyy']]);
echo '</div>';
echo '</div>
</div>';
echo $form->field($registraciya, 'kategoriya')->dropDownList(KategoriyaPedRabotnika::namesOnlyPositive(), ['placeholder' => 'Выберите категорию', 'onchange' => 'onChangeKategoriya(\'' . Html::getInputId($registraciya, 'kategoriya') . '\')', 'id' => 'registraciya-kategoriya']);
//echo '<div id="varIspytanie2Div">';
//echo $form->field($registraciya,'varIspytanie2')->dropDownList(
//    \app\entities\AttestacionnoeVariativnoeIspytanie_2::find()
//        ->formattedAll(EntityQuery::DROP_DOWN,'nazvanie')
//);
示例#13
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 
示例#14
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>
示例#15
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;
    }
示例#16
0
文件: index.php 项目: anhardeni/lat1
    <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>

示例#17
0
?>

    <?php 
echo $form->field($model, 'password_hash')->passwordInput();
?>

    <?php 
echo $form->field($model, 'status')->widget(Select2::classname(), ['options' => ['placeholder' => 'Select Status'], 'hideSearch' => false, 'data' => [10 => 'Active', 20 => 'Banned'], 'pluginOptions' => ['allowClear' => true]]);
?>

    <?php 
echo $form->field($model, 'flag_multiple')->widget(Select2::classname(), ['options' => ['placeholder' => 'Select Multiple Login'], 'hideSearch' => false, 'data' => [0 => 'No', 1 => 'Yes'], 'pluginOptions' => ['allowClear' => true]]);
?>
    
    <?php 
echo $form->field($model, 'active_date', ['addon' => ['prepend' => ['content' => '<i class="glyphicon glyphicon-calendar"></i>']], 'options' => ['class' => 'drp-container form-group', 'readonly' => 'readonly']])->widget(DateRangePicker::classname(), ['useWithAddon' => true, 'convertFormat' => true, 'pluginOptions' => ['singleDatePicker' => true, 'locale' => ['format' => 'Y-m-d']]]);
?>

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

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

    <?php 
echo $form->field($model, 'passage2')->textInput();
?>
    <?php 
$data = AuthItem::find('distinct description')->where(['not', ['description' => 'is null']])->asArray()->all();
示例#18
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>
示例#19
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>
示例#20
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();
示例#21
0
/* @var $form yii\widgets\ActiveForm */
$formatter = \Yii::$app->formatter;
if (!empty($model->dateFrom)) {
    $model->dateFrom = $formatter->asDatetime($model->dateFrom, 'dd.MM.yyyy HH:mm');
    $model->dateTo = $formatter->asDatetime($model->dateTo, 'dd.MM.yyyy HH:mm');
}
?>

<div class="finance-record-search">

    <?php 
$form = ActiveForm::begin(['method' => 'get', 'enableAjaxValidation' => false, 'options' => ['id' => 'finance-record-search']]);
?>

    <?php 
echo $form->field($model, 'dateRange')->widget(\kartik\daterange\DateRangePicker::className(), ['presetDropdown' => true, 'hideInput' => true, 'pluginOptions' => ['timePicker' => true, 'timePicker24Hour' => true, 'format' => 'DD.MM.YYYY HH:mm', 'timePickerIncrement' => 5, 'opens' => 'right', 'locale' => ['format' => 'DD.MM.YYYY HH:mm']], 'pluginEvents' => ['apply.daterangepicker' => "function(e) {\n\n            }"]]);
?>

    <?php 
//    $sessions = \common\models\cf\SessionRecord::find()->select(['CONCAT(StartTime, " - ", EndTime)', 'ID'])->orderBy(['ID'=>SORT_DESC])->indexBy('ID')->column();
//    $sessions[\common\models\cf\SessionRecord::getCurrent()->ID] = 'Текущая';
//    $form->field($model, 'SessionID')
//        ->dropdownList($sessions, ['prompt' => 'Выберите смену'])
?>

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

</div>
示例#22
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>
示例#23
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>
示例#24
0
if ($model->isNewRecord) {
    ?>
        <?php 
    echo $form->field($model, 'Disabled')->checkbox();
    ?>
    <?php 
}
?>
    <div class="col-md-12">
        <div class="panel panel-primary">
            <div class="panel-heading">Условия действия акции</div>
            <div class="panel-body">
                <div class="row">
                    <div class="col-md-12">
                        <?php 
echo $form->field($model, 'dateRange')->widget(\kartik\daterange\DateRangePicker::className(), ['presetDropdown' => false, 'hideInput' => true, 'pluginOptions' => ['ranges' => [Yii::t('kvdrp', "Today") => ["moment().startOf('day')", "moment()"], Yii::t('kvdrp', "Tomorrow") => ["moment().startOf('day').add(1,'days')", "moment().endOf('day').add(1,'days')"], Yii::t('kvdrp', "This Week") => ["moment().startOf('week')", "moment().endOf('week')"], Yii::t('kvdrp', "This Month") => ["moment().startOf('month')", "moment().endOf('month')"], Yii::t('kvdrp', "Next Month") => ["moment().add(1, 'month').startOf('month')", "moment().add(1, 'month').endOf('month')"], Yii::t('kvdrp', "Next {n} Days", ['n' => 365]) => ["moment()", "moment().startOf('day').add(365, 'days')"]], 'timePicker' => true, 'timePicker24Hour' => true, 'timePickerIncrement' => 1, 'opens' => 'right', 'locale' => ['format' => 'DD.MM.YYYY HH:mm']], 'pluginEvents' => ['apply.daterangepicker' => "function(e, DateRangePicker) {\n                                    var start = DateRangePicker.startDate.toDate()\n                                    var end = DateRangePicker.endDate.toDate()\n                                    var normal = end > start\n                                    var fromTo = \$(this).find('input').val().split(/\\s+-\\s+/);\n                                    if(!normal) {\n                                        \$('#" . Html::getInputId($model, 'DateFrom') . "').val(fromTo[1]).change()\n                                        \$('#" . Html::getInputId($model, 'DateTo') . "').val(fromTo[0]).change()\n                                    } else {\n                                        \$('#" . Html::getInputId($model, 'DateFrom') . "').val(fromTo[0]).change()\n                                        \$('#" . Html::getInputId($model, 'DateTo') . "').val(fromTo[1]).change()\n                                    }\n                                }"]]);
?>

                        <?php 
echo $form->field($model, 'DateFrom', ['template' => '{input}'])->hiddenInput(['disabled' => 'disabled']);
?>
                        <?php 
echo $form->field($model, 'DateTo', ['template' => '{input}'])->hiddenInput(['disabled' => 'disabled']);
?>
                        <?php 
echo $form->field($model, 'Schedule')->hiddenInput();
?>

                        <?php 
echo $form->field($model, 'WithHighPriority')->checkbox();
?>
示例#25
0
$this->params['breadcrumbs'][] = $this->title;
?>

<div class="text-left">
    <p style="display: inline;">

    <?php $form = \yii\bootstrap\ActiveForm::begin([
        'action'  => ['analitico-vale'],
        'id'      => 'pesquisa-Data',
        'method'  => 'get',
        'options' => ['class' => 'form-inline', 'style' => 'display: inline;']

    ]); ?>

    <div class="form-group">
        <?= $form->field($searchModel, 'dataVale', ['template' => '{input}'])->widget(DateRangePicker::classname(), ['pluginOptions' => ['format' => 'YYYY-MM-DD']]) ?>
        <? if(Yii::$app->user->identity->perfil == 'Administrador'): ?>
            <?= $form->field($searchModel, 'lojaId',['template' => '{input}'])->dropDownList(\app\models\Loja::map(),['prompt'=>\Yii::t('app', 'Selecione a loja')]) ?>
        <? endif;?>
    </div>

    <div class="form-group">
        <?= Html::submitButton("<span class='glyphicon glyphicon-search'>", ['class' => 'btn btn-primary']) ?>
    </div>

    <?php ActiveForm::end(); ?>
    </p>
</div>

<?php Pjax::begin(); ?>
	<?= DynaGrid::widget([
示例#26
0
<style>
    .search .form-control{ width:300px;}
    .search .form-group{ margin:0 10px;}
</style>
<?php 
use kartik\widgets\ActiveForm;
use kartik\helpers\Html;
$form = ActiveForm::begin(['method' => 'get', 'type' => ActiveForm::TYPE_INLINE, 'options' => ['class' => 'search']]);
if ($model->render == 'reg-user') {
    echo $form->field($model, 'userId');
}
//echo $form->field($model, 'filter_limit');
echo $form->field($model, 'regdate', [])->widget(\kartik\daterange\DateRangePicker::classname(), ['attribute' => "regdate", 'model' => $model, 'convertFormat' => true, 'pluginOptions' => ['timePicker' => true, 'timePickerIncrement' => 15, 'timePicker24Hour' => true, 'locale' => ['separator' => ' 至 ', 'format' => 'Y-m-d H:i:s'], '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("搜索", ['class' => 'btn btn-success', 'name' => Html::getInputName($model, 'do'), 'value' => 'search']);
//echo "&nbsp;&nbsp;";
//echo Html::submitButton("更新", [
//    'class' => 'btn btn-info',
//    'name' =>Html::getInputName($model,'do'),
//    'value'=>'update'
//]);
ActiveForm::end();
示例#27
0
<?php

use yii\bootstrap\Html;
use kartik\widgets\ActiveForm;
use kartik\daterange\DateRangePicker;
?>
<div class="row m-b-sm">
    <div class="col-lg-12">
        <?php 
$form = ActiveForm::begin(['id' => 'chart-form', 'method' => 'get']);
echo $form->field($model, 'datetime_range')->widget(DateRangePicker::className(), ['name' => 'UserJobStats[datetime_range]', 'value' => '1', 'presetDropdown' => true, 'hideInput' => true, 'pluginOptions' => ['format' => 'Y-m-d', 'separator' => '/', 'opens' => 'center'], 'convertFormat' => true]);
echo Html::button(Yii::t('job', 'Statistics'), ['class' => 'btn btn-success', 'onclick' => '$("#chart-form").submit();']);
ActiveForm::end();
?>
    </div>
</div>
<div class="row">
    <div class="col-lg-12">
        <div class="ibox float-e-margins">
            <div class="ibox-title">
                <h5><?php 
echo Yii::t('job', 'Chart');
?>
</h5>

                <div class="ibox-tools">
                    <a class="collapse-link">
                        <i class="fa fa-chevron-up"></i>
                    </a>
                    <a class="close-link">
                        <i class="fa fa-times"></i>
示例#28
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>
示例#29
0
$this->title = Yii::t('app', 'Relatório Sintético de Caixa');
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="estoque-index">

     <p style="display: inline;">
            
            <?php $form = ActiveForm::begin([
                'id' => 'pesquisa-parcela',
                'method' => 'get',
                'options' =>['class' => 'form-inline', 'style' => 'display: inline;']

            ]); ?>
            <div class="form-group">
                <?= $form->field($searchModel, 'dataPagamentoPeriodo',['template' => '{input}'])->widget(\kartik\daterange\DateRangePicker::classname(), ['pluginOptions' => ['format' => 'YYYY-MM-DD']]) ?>
            </div>
            <div class="form-group">
                <? if(Yii::$app->user->identity->perfil == 'Administrador'): ?>
                    <?= $form->field($searchModel, 'lojaId',['template' => '{input}'])->dropDownList(\app\models\Loja::map(),['prompt'=>\Yii::t('app', 'Selecione a loja')]) ?>
                <? endif;?>

            </div>
                <div class="form-group">
                <?= Html::submitButton("<span class='glyphicon glyphicon-search'>", ['class' => 'btn btn-primary']) ?>
            </div>

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

        </p>
示例#30
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>