Пример #1
8
use yii\grid\DataColumn;
$speciesModel = new Species();
$searchModel = new SpeciesSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
?>

<h1><?php 
echo Yii::t('app', 'Alle soorten');
?>
</h1>
<?php 
echo Html::a(Yii::t('app', 'Toevoegen'), Url::toRoute('species/form'), ['class' => 'btn btn-successbtn btn-success']);
?>

<br><br>
<?php 
DataColumn::className();
?>

<?php 
echo DataTables::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['attribute' => 'taxon', 'value' => function ($model, $key, $index, $column) {
    return $model->getTaxonomy($model->taxon);
}], ['attribute' => 'genus', 'format' => 'html', 'value' => function ($model, $key, $index, $column) {
    return Html::a($model->genus, Url::toRoute('species/detail/' . $model->id));
}], ['attribute' => 'speceus', 'format' => 'html', 'value' => function ($model, $key, $index, $column) {
    return Html::a($model->speceus, Url::toRoute('species/detail/' . $model->id));
}], ['attribute' => 'dutch', 'format' => 'html', 'value' => function ($model, $key, $index, $column) {
    return Html::a($model->dutch, Url::toRoute('species/detail/' . $model->id));
}], ['attribute' => 'url', 'format' => 'html', 'value' => function ($model, $key, $index, $column) {
    return Html::a($model->url, $model->url);
}]], 'clientOptions' => ['info' => false, 'responsive' => true, 'dom' => 'lfTrtip', 'tableTools' => ['aButtons' => [['sExtends' => 'copy', 'sButtonText' => Yii::t('app', 'Copy to clipboard')], ['sExtends' => 'csv', 'sButtonText' => Yii::t('app', 'Save to CSV')], ['sExtends' => 'xls', 'oSelectorOpts' => ['page' => 'current']], ['sExtends' => 'pdf', 'sButtonText' => Yii::t('app', 'Save to PDF')], ['sExtends' => 'print', 'sButtonText' => Yii::t('app', 'Print')]]]]]);
Пример #2
1
use yii\grid\GridView;
use yii\helpers\Url;
use fedemotta\datatables\DataTables;
$this->title = 'List';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="site-list">
    <h1><?php 
echo Html::encode($this->title);
?>
</h1>
    <div>
        <?php 
//echo GridView::widget([
echo DataTables::widget(['dataProvider' => $rMmID, 'formatter' => ['class' => 'yii\\i18n\\Formatter', 'nullDisplay' => '0'], 'summary' => '', 'columns' => [['attribute' => 'MssID', 'label' => 'MssID'], ['attribute' => 'Title', 'label' => 'Title'], ['attribute' => 'Link', 'label' => 'Link'], ['attribute' => 'Target', 'label' => 'Target'], ['attribute' => 'Type', 'label' => 'Type'], ['attribute' => 'Status', 'label' => 'Status'], ['attribute' => 'Sort', 'label' => 'Sort']]]);
?>
    </div>
    <div>
        <?php 
//echo GridView::widget([
echo DataTables::widget(['dataProvider' => $rPoID, 'formatter' => ['class' => 'yii\\i18n\\Formatter', 'nullDisplay' => '0'], 'summary' => '', 'columns' => [['attribute' => 'PoID', 'label' => 'MmID'], ['attribute' => 'Position', 'label' => 'Position']]]);
?>
    </div>
    <?php 
echo $thDate;
?>
    <code><?php 
echo __FILE__;
?>
</code>
</div>
Пример #3
0
echo DataTables::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['attribute' => 'date', 'label' => 'Datum', 'value' => function ($model, $key, $index, $column) {
    return Html::a($model->visit->date, Url::toRoute('/observations/detail/' . $model->id));
}, 'format' => 'html'], ['label' => Yii::t('app', 'Project'), 'value' => function ($model, $key, $index, $column) {
    return Html::a($model->box->project->name, Url::toRoute('/projects/detail/' . $model->box->project->id));
}, 'format' => 'html'], ['attribute' => 'box_id', 'value' => function ($model, $key, $index, $column) {
    if ($model->box->project->blur != Projects::BLUR_NO_BOX_CODE && $model->visit->blur != Projects::BLUR_NO_BOX_CODE) {
        return Html::a($model->box->code, Url::toRoute('/boxes/detail/' . $model->box_id));
    } else {
        return Yii::t('app', 'verborgen');
    }
}, 'format' => 'html'], ['label' => Yii::t('app', 'Waarnemer(s)'), 'value' => function ($model, $key, $index, $column) {
    if ($model->visit->getObservers()->exists()) {
        $returnArray = [];
        foreach ($model->visit->getObservers()->all() as $observer) {
            $returnArray[] = $observer->username;
        }
        return implode($returnArray, ', ');
    }
    return '#VERWIJDERD';
}, 'format' => 'html'], ['attribute' => 'species_id', 'value' => function ($model, $key, $index, $column) {
    if ($model->observation_type == Observations::OBSERVATION_TYPE_MANURE) {
        return $model->getObservationType();
    }
    return $model->species ? Html::a($model->species->dutch, Url::to('/species/detail/' . $model->species_id)) : '';
}, 'format' => 'html'], ['attribute' => 'sight_quantity', 'label' => '#', 'value' => function ($model, $key, $index, $column) {
    return $model->sight_quantity ? $model->sight_quantity : 0;
}], ['attribute' => 'picture', 'label' => '', 'value' => function ($model, $key, $index, $column) {
    return $model->getPictureSet() ? '<img src="/images/haspicture.png" height="20" alt="picture">' : '';
}, 'format' => 'html', 'contentOptions' => ['align' => 'center', 'width' => '25']], ['attribute' => 'validated_by_id', 'label' => ' ', 'value' => function ($model, $key, $index, $column) {
    return $model->validated_by_id ? '<img src="/images/check.png" alt="check" height="20">' : '';
}, 'format' => 'html', 'contentOptions' => ['align' => 'center', 'width' => '20']]], 'clientOptions' => ['info' => false, 'responsive' => true, 'dom' => 'lfTrtip', 'tableTools' => ['aButtons' => [['sExtends' => 'copy', 'sButtonText' => Yii::t('app', 'Copy to clipboard')], ['sExtends' => 'csv', 'sButtonText' => Yii::t('app', 'Save to CSV')], ['sExtends' => 'pdf', 'sButtonText' => Yii::t('app', 'Save to PDF')], ['sExtends' => 'print', 'sButtonText' => Yii::t('app', 'Print')]]]]]);
Пример #4
0
        </form>


    </div>


    <div class="panel panel-default">
        <div class="panel-body">
            <?php 
if (isset($dataProvider)) {
    $dev = \yii\helpers\Html::a('คุณดนัย สอนไสย', 'https://fb.com/foyplvowlp', ['target' => '_blank']);
}
//echo yii\grid\GridView::widget([
//echo \kartik\grid\GridView::widget([
echo DataTables::widget(['dataProvider' => $dataProvider, 'formatter' => ['class' => 'yii\\i18n\\Formatter', 'nullDisplay' => '0'], 'columns' => [['attribute' => 'HOSPCODE', 'header' => 'รหัส รพสต.', 'headerOptions' => ['width' => '30']], ['attribute' => 'DNAME', 'header' => 'รายการยา', 'headerOptions' => ['width' => '300']], ['attribute' => 'TOTAL', 'header' => 'จำนวน (เม็ด)', 'headerOptions' => ['width' => '20']]], 'clientOptions' => ["lengthMenu" => [[20, -1], [20, Yii::t('app', "All")]], "info" => TRUE, "responsive" => true, "dom" => 'lfTrtip', "tableTools" => ["aButtons" => [["sExtends" => "copy", "sButtonText" => Yii::t('app', "Copy to clipboard")], ["sExtends" => "csv", "sButtonText" => Yii::t('app', "Save to CSV")], ["sExtends" => "xls", "oSelectorOpts" => ["page" => 'current']], ["sExtends" => "pdf", "sButtonText" => Yii::t('app', "Save to PDF")], ["sExtends" => "print", "sButtonText" => Yii::t('app', "Print")]]]]]);
?>
        </div>
    </div>

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

</div>
Пример #5
0
    </tr>
</table>


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


    <?php 
echo DataTables::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'clientOptions' => ["bStateSave" => true, "paging" => false, "info" => false, "sDom" => '<"top"i>rt<"bottom"lp><"clear">'], 'columns' => [['class' => 'yii\\grid\\SerialColumn', 'header' => 'ID', 'contentOptions' => ['style' => 'text-align: center; vertical-align: middle']], ['attribute' => 'name', 'label' => 'Название', 'contentOptions' => ['style' => 'vertical-align: middle']], ['attribute' => 'preview', 'label' => 'Превью', 'format' => ['raw'], 'value' => function ($data) {
    return Html::img(Yii::getAlias('@web') . $data->preview, ['class' => 'data-id-img', 'width' => '60', 'height' => '75']);
}], ['attribute' => 'author_id', 'label' => 'Автор', 'value' => 'fullName', 'contentOptions' => ['style' => 'vertical-align: middle']], ['attribute' => 'date', 'label' => 'Дата выхода книги', 'format' => ['date', 'php:d F Y'], 'contentOptions' => ['style' => 'vertical-align: middle']], ['attribute' => 'date_crate', 'label' => 'Дата добавления', 'format' => ['date', 'php:d F Y'], 'contentOptions' => ['style' => 'vertical-align: middle']], ['class' => ActionColumn::className(), 'header' => 'Кнопки действия', 'template' => '{update} {view} {delete}', 'contentOptions' => ['style' => 'vertical-align: middle'], 'buttons' => ['update' => function ($url, $model, $key) {
    return Html::a('<span> [ред] </span>', $url, ['title' => 'Редактировать', 'data-method' => 'post', 'data-pjax' => '0', 'target' => '_blank']);
}, 'delete' => function ($url, $model, $key) {
    return Html::a('<span >[удл]</span>', $url, ['title' => Yii::t('yii', 'Удалить'), 'data-confirm' => 'Вы уверены, что хотите удалить?', 'data-method' => 'post', 'data-pjax' => 'o']);
}, 'view' => function ($url, $model, $key) {
    return Html::a('<span>[просм]</span>', Yii::getAlias('@web') . $url, ['title' => Yii::t('yii', 'Просмотреть'), 'data-toggle' => 'modal', 'data-target' => '#activity-modal', 'data-pjax' => '0', 'value' => Yii::getAlias('@web') . $url, 'target' => 'modal', 'class' => 'my-modal-link']);
}]]]]);
?>


    <?php 
Modal::begin(['id' => 'activity-modal', 'header' => '<h4 class="modal-title">Просмотр</h4>', 'footer' => '<a href="#" class="btn btn-primary" data-dismiss="modal">Закрыть</a>']);
?>

    <div id="modal-content">

    </div>
Пример #6
0
/* @var $searchModel app\models\TaxSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Taxes';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="tax-index">

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

    <p>
        <?php 
echo Html::a('Create Tax', ['create'], ['class' => 'btn btn-success']);
?>
    </p>
	
	<?php 
echo Tabs::widget(['items' => [['label' => 'Supply Tax', 'url' => ['tax/index']], ['label' => 'Purchase Tax', 'active' => true, 'url' => ['tax/purchase']]]]);
?>

    <?php 
echo DataTables::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['attribute' => 'tax_code', 'options' => ['width' => '100']], ['attribute' => 'tax_rate', 'options' => ['width' => '100']], ['attribute' => 'tax_description', 'options' => ['width' => '700']], ['class' => 'yii\\grid\\ActionColumn']]]);
?>

</div>
Пример #7
0
echo $form->field($searchModel, 'temporada_id')->dropdownList($data, array('prompt' => 'Seleccione una temporada'));
?>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> </label>

                            <div class="col-xs-10 col-sm-5">
                                <?php 
echo $form->field($empleadoSearch, 'nombre')->dropdownList($empleadoNoTemporada, array('prompt' => 'Seleccione un empleado'));
?>
                            </div>
                        </div>


                        <div class="form-group">
                            <div >
                                <?php 
echo DataTables::widget(['dataProvider' => $empleadoTemporada, 'filterModel' => $empleadoSearch, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'nombre', 'apellido', 'rut', 'telefono']]);
?>
                                
                            </div>
                        </div>

                    <form>
                </div>
            </div>

    </div>
</div>
Пример #8
0
<?php

use yii\helpers\Html;
use fedemotta\datatables\DataTables;
use yii\helpers\Url;
/* @var $this yii\web\View */
/* @var $searchModel app\models\CustomerSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Access';
$this->params['breadcrumbs'][] = $this->title;
if ($accessUpdate != NULL) {
    $update = '{update}';
} else {
    $update = '';
}
?>
<div class="customer-index">

    <h1 class="page-header"><?php 
echo Html::encode($this->title);
?>
</h1>

	
    <?php 
echo DataTables::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'user_name', ['class' => 'yii\\grid\\ActionColumn', 'template' => $update]]]);
?>

</div>
Пример #9
0
<?php

use fedemotta\datatables\DataTables;
use yii\helpers\Html;
use yii\helpers\Url;
use app\models\Projects;
?>
<div class="table-responsive">
	<?php 
echo DataTables::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['attribute' => 'name', 'label' => Yii::t('app', 'Projectnaam'), 'value' => function ($model, $key, $index, $column) {
    return Html::a($model['name'], Url::toRoute('projects/detail/' . $model['id']));
}, 'format' => 'html'], ['label' => Yii::t('app', 'Laatste invoer'), 'value' => function ($model, $key, $index, $column) {
    return Projects::getLastEntryWithIdentifier($model['id']) ? Projects::getLastEntryWithIdentifier($model['id'])['date'] : "-";
}], ['label' => Yii::t('app', 'Aantal kasten'), 'value' => function ($model, $key, $index, $column) {
    return $model['boxcount'];
}]], 'clientOptions' => ['info' => false, 'responsive' => true, 'dom' => 'lfTrtip', 'tableTools' => ['aButtons' => [['sExtends' => 'copy', 'sButtonText' => Yii::t('app', 'Copy to clipboard')], ['sExtends' => 'csv', 'sButtonText' => Yii::t('app', 'Save to CSV')], ['sExtends' => 'pdf', 'sButtonText' => Yii::t('app', 'Save to PDF')], ['sExtends' => 'print', 'sButtonText' => Yii::t('app', 'Print')]]]]]);
?>
</div>
Пример #10
0
use yii\helpers\Html;
use fedemotta\datatables\DataTables;
/* @var $this yii\web\View */
/* @var $searchModel app\models\PurchaseOrderSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Purchase Orders';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="purchase-order-index">

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

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

    <?php 
echo DataTables::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'purchaseorder_id', 'purchaseorder_no', 'purchaseorder_date', 'purchaseorder_date_transaction', 'purchaseorder_date_delete', ['class' => 'yii\\grid\\ActionColumn']]]);
?>

</div>
Пример #11
0
<?php

use fedemotta\datatables\DataTables;
use yii\helpers\Url;
use yii\helpers\Html;
use app\models\Visits;
use app\models\Observations;
use app\models\Boxtypes;
use app\models\ProjectClusters;
?>
<div class="table-responsive">
	<?php 
echo DataTables::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['attribute' => 'code', 'format' => 'html', 'value' => function ($model, $key, $index, $column) {
    return Html::a($model['code'], Url::toRoute('boxes/detail/' . $model['id']));
}], ['attribute' => 'boxtype_id', 'format' => 'html', 'label' => 'Boxtype', 'value' => function ($model, $key, $index, $column) {
    $boxType = $model['boxtype_id'] ? Boxtypes::findOne($model['boxtype_id']) : NULL;
    return $boxType ? Html::a($boxType->model, Url::toRoute('boxtypes/detail/' . $boxType->id)) : "-";
}], ['attribute' => 'cluster_id', 'format' => 'html', 'label' => 'Cluster', 'value' => function ($model, $key, $index, $column) {
    $cluster = $model['cluster_id'] ? ProjectClusters::findOne($model['cluster_id']) : NULL;
    return $cluster ? $cluster->cluster : '-';
}], ['attribute' => 'placement_date', 'label' => Yii::t('app', 'Plaatsingsdatum')], ['label' => Yii::t('app', 'Laatste waarneming'), 'value' => function ($model, $key, $index, $column) {
    if (($observationModel = Observations::find()->byBox($model['id'])->one()) !== NULL) {
        return Visits::findOne($observationModel->visit_id)->date;
    } else {
        return "-";
    }
}]], 'clientOptions' => ['info' => false, 'responsive' => true, 'dom' => 'lfTrtip', 'tableTools' => ['aButtons' => [['sExtends' => 'copy', 'sButtonText' => Yii::t('app', 'Copy to clipboard')], ['sExtends' => 'csv', 'sButtonText' => Yii::t('app', 'Save to CSV')], ['sExtends' => 'pdf', 'sButtonText' => Yii::t('app', 'Save to PDF')], ['sExtends' => 'print', 'sButtonText' => Yii::t('app', 'Print')]]]]]);
?>
</div>
Пример #12
0
<?php

use fedemotta\datatables\DataTables;
use yii\helpers\Html;
use yii\helpers\Url;
?>
<div class="table-responsive">
	<?php 
echo DataTables::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['attribute' => 'project_id', 'label' => Yii::t('app', 'Project'), 'value' => function ($model, $key, $index, $column) {
    return Html::a($model->project->name, Url::toRoute('projects/detail/' . $model->project_id));
}, 'format' => 'html'], ['attribute' => 'date', 'label' => Yii::t('app', 'Datum'), 'value' => function ($model, $key, $index, $column) {
    return Html::a($model->date, Url::toRoute('visits/detail/' . $model->id));
}, 'format' => 'html'], ['attribute' => 'observer_id', 'label' => Yii::t('app', 'Waarnemer'), 'value' => function ($model, $key, $index, $column) {
    return $model->observer->username;
}]], 'clientOptions' => ['info' => false, 'responsive' => true, 'dom' => 'lfTrtip', 'tableTools' => ['aButtons' => [['sExtends' => 'copy', 'sButtonText' => Yii::t('app', 'Copy to clipboard')], ['sExtends' => 'csv', 'sButtonText' => Yii::t('app', 'Save to CSV')], ['sExtends' => 'pdf', 'sButtonText' => Yii::t('app', 'Save to PDF')], ['sExtends' => 'print', 'sButtonText' => Yii::t('app', 'Print')]]]]]);
?>
</div>
Пример #13
0
            <div class="temporada-index">

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

                <!--?= GridView::widget([
                    'dataProvider' => $dataProvider,
                    'filterModel' => $searchModel,
                    'columns' => [
                        ['class' => 'yii\grid\SerialColumn'],

                        'temporada_id',
                        'anio',
                        'fruto',
                        'precio',

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

                <?php 
echo DataTables::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'temporada_id', 'anio', 'fruto', 'precio', ['class' => 'yii\\grid\\ActionColumn']]]);
?>

            </div>
        </div>
    </div>
</div>
Пример #14
0
                        <?php 
$template = '';
if (\Yii::$app->user->can("Users-Update")) {
    $template .= '{update}';
}
if (\Yii::$app->user->can("Users-View")) {
    $template .= '{view}';
}
if (\Yii::$app->user->can("Users-Delete")) {
    $template .= '{delete}';
}
?>

                        <?php 
echo DataTables::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn', 'header' => 'Sr.#'], ['attribute' => 'name', 'format' => 'raw', 'value' => function ($data) {
    return Html::a(Html::encode($data->name), 'users/view/id/' . $data->id);
}], 'email', ['attribute' => 'role_id', 'value' => 'role.name'], ['attribute' => 'status', 'value' => 'status'], ['attribute' => 'created_by', 'value' => 'created.name'], ['attribute' => 'modified_by', 'value' => 'modified.name'], 'created_date', 'modified_date', ['class' => 'yii\\grid\\ActionColumn', 'header' => 'Action', 'template' => $template]], 'clientOptions' => ["columnDefs" => $columnHidden], 'tableOptions' => ["class" => "table table-striped table-bordered", "cellspacing" => "0", "width" => "100%", 'id' => 'datatableyii']]);
?>

                    </div>


                </div>
            </div>
      


</div>
<style>

</style>
Пример #15
0
use yii\bootstrap\Tabs;
/* @var $this yii\web\View */
/* @var $searchModel app\models\CustomerSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Suppliers';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="customer-index">

    <h1 class="page-header"><?php 
echo Html::encode($this->title);
?>
</h1>
	
	 <p>
        <?php 
echo Html::a('Create', ['create'], ['class' => 'btn btn-success']);
?>
    </p>
	
    <?php 
echo Tabs::widget(['items' => [['label' => 'Customer', 'url' => ['customer/index']], ['label' => 'Supplier', 'active' => true, 'url' => ['customer/supplier']]]]);
?>
  

    <?php 
echo DataTables::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'customer_name', 'customer_tel', 'customer_fax', 'customer_email:email', ['class' => 'yii\\grid\\ActionColumn']]]);
?>

</div>
Пример #16
0
          </p>
            <div class="box box-success">
                <div class="box-header">
                    <h3 class="box-title"> Trigger List</h3>
                </div>
                <!-- /.box-header -->
                <div class="box-body">
                  <?php 
//$searchModel = new ModelSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
?>
                  <?php 
echo DataTables::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['label' => 'วันที่ Admit', 'format' => 'raw', 'value' => 'admit_date', 'contentOptions' => ['style' => 'max-width: 60px;']], ['label' => 'HN', 'format' => 'raw', 'value' => 'hn', 'contentOptions' => ['style' => 'max-width: 100px;']], 'admit_count', ['attribute' => 'disease', 'filter' => \app\models\Trigger::itemsAlias('step_ae'), 'value' => function ($model) {
    return $model->diagName;
}], 'level', ['attribute' => 'step', 'filter' => \app\models\Trigger::itemsAlias('step_ae'), 'value' => function ($model) {
    return $model->stepAeName;
}], ['attribute' => 'step_error', 'filter' => \app\models\Trigger::itemsAlias('step_error'), 'value' => function ($model) {
    return $model->stepErrorName;
}], ['class' => 'yii\\grid\\ActionColumn']], 'tableOptions' => ['class' => 'table table-striped table-bordered hover']]);
?>
                </div>
              </div>
            </div>
          </div>
        </div>


    <?php 
// echo $this->render('_search', ['model' => $searchModel]);
?>
Пример #17
0
            <div class="empleado-index">

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

                <!--?= GridView::widget([
                    'dataProvider' => $dataProvider,
                    'filterModel' => $searchModel,
                    'columns' => [
                        ['class' => 'yii\grid\SerialColumn'],

                        'empleado_id',
                        'nombre',
                        'apellido',
                        'rut',
                        'telefono',

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

                <?php 
echo DataTables::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'empleado_id', 'nombre', 'apellido', 'rut', 'telefono', ['class' => 'yii\\grid\\ActionColumn']]]);
?>
            </div>
        </div>
    </div>
</div>
Пример #18
0
                    <div class="table-responsive">
                        <?php 
$columnHidden = [["targets" => 4, "visible" => false], ["targets" => 5, "visible" => false]];
?>
                        <?php 
$template = '';
if (\Yii::$app->user->can("FeeCategory-Update")) {
    $template .= '{update}';
}
if (\Yii::$app->user->can("FeeCategory-View")) {
    $template .= '{view}';
}
if (\Yii::$app->user->can("FeeCategory-Delete")) {
    $template .= '{delete}';
}
?>

                        <?php 
echo DataTables::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn', 'header' => 'Sr.#'], 'name', ['attribute' => 'status', 'value' => 'status'], ['attribute' => 'created_by', 'value' => 'created.name'], 'created_date', 'modified_date', ['class' => 'yii\\grid\\ActionColumn', 'header' => 'Action', 'template' => $template]], 'clientOptions' => ["columnDefs" => $columnHidden], 'tableOptions' => ["class" => "table table-striped table-bordered", "cellspacing" => "0", "width" => "100%", 'id' => 'datatableyii']]);
?>


                    </div>

                </div>
            </div>
        </div>
    </div>
</div>
Пример #19
0
            <div class="page-header">
                <h1>
                    Cosecha Diaria
                    <small>
                        <i class="ace-icon fa fa-angle-double-right"></i>
                        Historial de Cosechas Agregadas
                    </small>
                </h1>
            </div><!-- /.page-header -->
            <div class="cosechadia-index">

                <p>
                    <?php 
echo Html::a('<i class="fa fa-plus-circle"></i> Crear Cosecha diaria', ['create'], ['class' => 'btn btn-success']);
?>
                </p>

                <?php 
echo DataTables::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['attribute' => 'anioFruto', 'label' => 'Temporada', 'format' => 'text', 'content' => function ($data) {
    return $data->getTemporadaAnioFruto();
}], ['attribute' => 'nombreApellido', 'label' => 'Empleado', 'format' => 'text', 'content' => function ($data) {
    return $data->getEmpleadoNombreApellido();
}], 'fecha', 'cantidad', 'total', ['class' => 'yii\\grid\\ActionColumn']]]);
?>

            </div>
        </div>
    </div>
</div>

Пример #20
0
    $delete = '';
}
?>
<div class="product-index">

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

    <p>
        <?php 
echo $accessCreate != NULL ? Html::a('Create', ['create'], ['class' => 'btn btn-success']) : '';
?>
    </p>
	
	<?php 
echo Tabs::widget(['items' => [['label' => 'Product', 'url' => ['product/index']], ['label' => 'Service', 'url' => ['product/service']]]]);
?>

    <?php 
echo DataTables::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'product_name', 'product_averageCost', 'product_sellingPice', ['class' => 'yii\\grid\\ActionColumn', 'template' => $view . ' ' . $update . ' ' . $delete, 'buttons' => ['view' => function ($url, $model) {
    return Html::a('<span class="fa fa-search"></span>View', $url, ['title' => Yii::t('app', 'View'), 'class' => 'btn btn-primary btn-xs']);
}]]]]);
?>

</div>
Пример #21
0
                        <?php 
$columnHidden = [["targets" => 4, "visible" => false], ["targets" => 5, "visible" => false]];
?>
                        <?php 
$template = '';
if (\Yii::$app->user->can("Country-Update")) {
    $template .= '{update}';
}
if (\Yii::$app->user->can("Country-View")) {
    $template .= '{view}';
}
if (\Yii::$app->user->can("Country-Delete")) {
    $template .= '{delete}';
}
?>

                        <?php 
echo DataTables::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn', 'header' => 'Sr.#'], 'name', ['attribute' => 'status', 'value' => 'status'], ['attribute' => 'created_by', 'value' => 'created.name'], 'created_date', 'modified_date', ['class' => 'yii\\grid\\ActionColumn', 'header' => 'Action', 'template' => $template, 'buttons' => ['view' => function ($url, $model) {
    return Html::a('<span class="fa fa-key"></span>', $url);
}]]], 'clientOptions' => ["columnDefs" => $columnHidden], 'tableOptions' => ["class" => "table table-striped table-bordered", "cellspacing" => "0", "width" => "100%", 'id' => 'datatableyii']]);
?>


                    </div>

                </div>
            </div>
        </div>
    </div>
</div>
Пример #22
0
}
if ($accessDelete != NULL) {
    $delete = '{delete}';
} else {
    $delete = '';
}
?>
<div class="quotation-index">

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

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

    <?php 
echo DataTables::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'quotation_no', 'quotation_date', 'quotation_date_transaction', 'quotation_total_amount', ['class' => 'yii\\grid\\ActionColumn', 'template' => $view . ' ' . $update . ' ' . $delete, 'buttons' => ['view' => function ($url, $model) {
    return Html::a('<span class="fa fa-search"></span>View', $url, ['title' => Yii::t('app', 'View'), 'class' => 'btn btn-primary btn-xs']);
}]]]]);
?>

</div>
Пример #23
0
<?php

use fedemotta\datatables\DataTables;
use yii\helpers\Html;
use yii\helpers\Url;
?>
<div class="table-responsive">
	<?php 
echo DataTables::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['attribute' => 'project_id', 'label' => Yii::t('app', 'Project'), 'value' => function ($model, $key, $index, $column) {
    return Html::a($model->project->name, Url::toRoute('projects/detail/' . $model->project_id));
}, 'format' => 'html'], ['attribute' => 'date', 'label' => Yii::t('app', 'Datum'), 'value' => function ($model, $key, $index, $column) {
    return Html::a($model->date, Url::toRoute('visits/detail/' . $model->id));
}, 'format' => 'html'], ['label' => Yii::t('app', 'Waarnemer(s)'), 'value' => function ($model, $key, $index, $column) {
    if ($model->getObservers()->exists()) {
        $returnArray = [];
        foreach ($model->getObservers()->all() as $observer) {
            $returnArray[] = $observer->username;
        }
        return implode($returnArray, ', ');
    }
    return '#VERWIJDERD';
}, 'format' => 'html']], 'clientOptions' => ['info' => false, 'responsive' => true, 'dom' => 'lfTrtip', 'tableTools' => ['aButtons' => [['sExtends' => 'copy', 'sButtonText' => Yii::t('app', 'Copy to clipboard')], ['sExtends' => 'csv', 'sButtonText' => Yii::t('app', 'Save to CSV')], ['sExtends' => 'pdf', 'sButtonText' => Yii::t('app', 'Save to PDF')], ['sExtends' => 'print', 'sButtonText' => Yii::t('app', 'Print')]]]]]);
?>
</div>
Пример #24
0
    $delete = '';
}
?>
<div class="tax-index">

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

    <p>
        <?php 
echo $accessCreate != NULL ? Html::a('Create Tax', ['create'], ['class' => 'btn btn-success']) : '';
?>
    </p>
	
	<?php 
echo Tabs::widget(['items' => [['label' => 'Supply Tax', 'url' => ['tax/index']], ['label' => 'Purchase Tax', 'url' => ['tax/purchase']]]]);
?>

    <?php 
echo DataTables::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['attribute' => 'tax_code', 'options' => ['width' => '100']], ['attribute' => 'tax_rate', 'options' => ['width' => '100']], ['attribute' => 'tax_description', 'options' => ['width' => '700']], ['class' => 'yii\\grid\\ActionColumn', 'template' => $view . ' ' . $update . ' ' . $delete, 'buttons' => ['view' => function ($url, $model) {
    return Html::a('<span class="fa fa-search"></span>View', $url, ['title' => Yii::t('app', 'View'), 'class' => 'btn btn-primary btn-xs']);
}]]]]);
?>

</div>
Пример #25
0
                    <?php 
echo Html::a('Create Cosechadia', ['create'], ['class' => 'btn btn-success']);
?>
                </p>

                <!--?= GridView::widget([
                    'dataProvider' => $dataProvider,
                    'filterModel' => $searchModel,
                    'columns' => [
                        ['class' => 'yii\grid\SerialColumn'],

                        'cosechadia_id',
                        'empleado_id',
                        'fecha',
                        'cantidad',
                        'total',
                        // 'pagado',

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

                <?php 
echo DataTables::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'cosechadia_id', 'empleado_id', 'fecha', 'cantidad', 'total', ['class' => 'yii\\grid\\ActionColumn']]]);
?>

            </div>
        </div>
    </div>
</div>