/**
  * @inheritdoc
  * @return bool|string
  * @throws Exception
  */
 public function run()
 {
     $model = $this->model;
     if (!$model) {
         return false;
     }
     if (!$model->hasMethod('getLog')) {
         throw new Exception("Attach " . ChangeLogBehavior::className() . " behavior to " . $model::className());
     }
     /**
      * @var ChangeLogBehavior $model
      */
     $logProvider = $model->getLog();
     $view = $this->header;
     $view .= GridView::widget(['dataProvider' => $logProvider, 'columns' => ['log_time:datetime', 'prefix', ['attribute' => 'message', 'content' => function ($item) {
         $messages = unserialize($item['message']);
         if (is_array($messages)) {
             $message = "";
             foreach ($messages as $attr => $changes) {
                 $message .= $attr . ": " . $changes . "<br>";
             }
             return $message;
         }
         return $messages;
     }]]]);
     return $view;
 }
 public function run()
 {
     if (!$this->model) {
         return Html::tag('div', Html::tag('b', Yii::t('yii', 'Error')) . ': ' . $this->getModule()->t('attachments', 'The model cannot be empty.'), ['class' => 'alert alert-danger']);
     }
     $hasFileBehavior = false;
     foreach ($this->model->getBehaviors() as $behavior) {
         if (is_a($behavior, FileBehavior::className())) {
             $hasFileBehavior = true;
         }
     }
     if (!$hasFileBehavior) {
         return Html::tag('div', Html::tag('b', Yii::t('yii', 'Error')) . ': ' . $this->getModule()->t('attachments', 'The behavior FileBehavior has not been attached to the model.'), ['class' => 'alert alert-danger']);
     }
     Url::remember(Url::current());
     return GridView::widget(['dataProvider' => new ArrayDataProvider(['allModels' => $this->model->getFiles()]), 'layout' => '{items}', 'tableOptions' => $this->tableOptions, 'columns' => [['label' => $this->getModule()->t('attachments', 'File name'), 'format' => 'raw', 'value' => function (File $model) {
         return Html::a("{$model->name}.{$model->type}", $model->getUrl());
     }], ['class' => 'yii\\grid\\ActionColumn', 'template' => '{delete}', 'buttons' => ['delete' => function ($url, $model, $key) {
         return Html::a('<span class="glyphicon glyphicon-trash"></span>', ['/file/file/delete', 'id' => $model->id], ['title' => Yii::t('yii', 'Delete'), 'data-confirm' => Yii::t('yii', 'Are you sure you want to delete this item?'), 'data-method' => 'post']);
     }]]]]);
 }
    public function run()
    {
        $confirm = Yii::t('yii', 'Are you sure you want to delete this item?');
        $js = <<<JS
        \$(".delete-button").click(function(){
            var tr = this.closest('tr');
            var url = \$(this).data('url');
            if (confirm("{$confirm}")) {
                \$.ajax({
                    method: "POST",
                    url: url,
                    success: function(data) {
                        if (data) {
                            tr.remove();
                        }
                    }
                });
            }
        });
JS;
        Yii::$app->view->registerJs($js);
        return GridView::widget(['dataProvider' => new ArrayDataProvider(['allModels' => $this->model->getFiles()]), 'layout' => '{items}', 'tableOptions' => $this->tableOptions, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['label' => $this->getModule()->t('attachments', 'File name'), 'format' => 'raw', 'value' => function ($model) {
            return Html::a("{$model->name}.{$model->type}", $model->getUrl());
        }], ['class' => 'yii\\grid\\ActionColumn', 'template' => '{delete}', 'buttons' => ['delete' => function ($url, $model, $key) {
            return Html::a('<span class="glyphicon glyphicon-trash"></span>', '#', ['class' => 'delete-button', 'title' => Yii::t('yii', 'Delete'), 'data-url' => Url::to(['/attachments/file/delete', 'id' => $model->id])]);
        }]]]]);
    }
Example #4
0
 /**
  * Renders interpreter tabs
  * @return string tabs
  */
 protected function renderViews()
 {
     $columns = ArrayHelper::getColumn($this->_relViews, function ($element) {
         return sprintf('%s:raw', $element['label']);
     });
     if ($this->actions) {
         array_push($columns, $this->actions);
     }
     $provider = new \yii\data\ArrayDataProvider(['allModels' => [ArrayHelper::map($this->_relViews, 'label', 'content')]]);
     echo \yii\grid\GridView::widget(['dataProvider' => $provider, 'columns' => $columns, 'layout' => '{items}', 'pager' => false]);
 }
Example #5
0
 protected function getTable()
 {
     $options = ['dataProvider' => $this->dataProvider, 'summary' => '', 'tableOptions' => $this->tableOptions];
     if ($this->columns) {
         $options['columns'] = $this->columns;
     }
     $table = $this->getPjaxBegin();
     $table .= GridView::widget($options);
     $table .= $this->getPjaxEnd();
     return $table;
 }
 public static function CreateGridWithDropDownListHeader($dataProvider, $form, $header_model, $arr_header_values)
 {
     $columns_config = [['class' => SerialColumn::className()]];
     $i = 0;
     foreach ($header_model as $key => $value) {
         $columns_config[] = ['header' => $form->field($header_model, $key, ['inputOptions' => ['label' => '']])->dropDownList($arr_header_values), 'attribute' => $i];
         $i++;
     }
     $dynamic_grid_view = GridView::widget(['dataProvider' => $dataProvider, 'columns' => $columns_config]);
     return $dynamic_grid_view;
 }
Example #7
0
 public function run()
 {
     switch ($this->identity->hasApiTokens()) {
         case true:
             $dataProvider = new \yii\data\ArrayDataProvider(['allModels' => $this->identity->getApiTokens()]);
             echo \yii\grid\GridView::widget(['dataProvider' => $dataProvider, 'columns' => ['id', 'token:ntext', 'added', 'active:boolean', 'level', 'revoked:boolean', 'revoked_on'], 'rowOptions' => function ($model, $key, $index, $grid) {
                 return ["class" => \Yii::$app->controller->getStatusIndicator($this->identity)];
             }, "tableOptions" => ['class' => 'table table-bordered']]);
             break;
         default:
             echo Html::tag('div', "No tokens found");
             break;
     }
 }
Example #8
0
 public function run()
 {
     $dataProvider = new \yii\data\ArrayDataProvider(["allModels" => is_array($this->items) && !empty($this->items) ? $this->items : $this->model->getModels(), 'pagination' => false]);
     switch (\Yii::$app->user->identity->isAdmin()) {
         case true:
             break;
     }
     $revisions = GridView::widget(['dataProvider' => $dataProvider, 'columns' => [['attribute' => 'author_id', 'label' => 'Author', 'format' => 'html', 'value' => function ($model, $index, $widget) {
         return $model->author()->url();
     }], 'created_at', ['attribute' => 'parent_type', 'label' => 'Type'], ['class' => 'yii\\grid\\ActionColumn', 'buttons' => $this->getActions(), 'template' => "{view} {restore} {delete}", 'urlCreator' => function ($action, $model, $key, $index) {
         return \Yii::$app->controller->id . '/' . $action . '/' . $model->getId();
     }, 'options' => ['rowspan' => 3]]], 'rowOptions' => function ($model, $key, $index, $grid) {
         return ["class" => \nitm\helpers\Statuses::getIndicator($model->getStatus())];
     }, "tableOptions" => ['class' => 'table']]);
     $this->options['id'] .= $this->parentId;
     echo Html::tag('div', $revisions, $this->options);
 }
 public function run()
 {
     if (!$this->model) {
         return Html::tag('div', Html::tag('b', Yii::t('yii', 'Error')) . ': ' . $this->getModule()->t('attachments', 'The model cannot be empty.'), ['class' => 'alert alert-danger']);
     }
     $hasFileBehavior = false;
     foreach ($this->model->getBehaviors() as $behavior) {
         if ($behavior->className() == FileBehavior::className()) {
             $hasFileBehavior = true;
         }
     }
     if (!$hasFileBehavior) {
         return Html::tag('div', Html::tag('b', Yii::t('yii', 'Error')) . ': ' . $this->getModule()->t('attachments', 'The behavior FileBehavior has not been attached to the model.'), ['class' => 'alert alert-danger']);
     }
     Url::remember(Url::current());
     return GridView::widget(['dataProvider' => new ArrayDataProvider(['allModels' => $this->model->getFiles()]), 'layout' => '{items}', 'tableOptions' => $this->tableOptions, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['label' => $this->getModule()->t('attachments', 'File name'), 'format' => 'raw', 'value' => function ($model) {
         return Html::a("{$model->name}.{$model->type}", $model->getUrl(), ['class' => ' group' . $model->itemId, 'onclick' => 'return false;']);
     }], ['class' => 'yii\\grid\\ActionColumn', 'template' => '{delete}', 'buttons' => ['delete' => function ($url, $model, $key) {
         return Html::a('<span class="glyphicon glyphicon-trash"></span>', ['/attachments/file/delete', 'id' => $model->id], ['title' => Yii::t('yii', 'Delete'), 'data-confirm' => Yii::t('yii', 'Are you sure you want to delete this item?'), 'data-method' => 'post']);
     }]]]]) . Colorbox::widget(['targets' => ['.group' . $this->model->id => ['rel' => '.group' . $this->model->id, 'photo' => true, 'scalePhotos' => true, 'width' => '100%', 'height' => '100%', 'maxWidth' => 800, 'maxHeight' => 600]], 'coreStyle' => 4]);
 }
    public function run()
    {
        if (!$this->model) {
            return Html::tag('div', Html::tag('b', Yii::t('yii', 'Error')) . ': ' . $this->getModule()->t('attachments', 'The model cannot be empty.'), ['class' => 'alert alert-danger']);
        }
        $hasFileBehavior = false;
        foreach ($this->model->getBehaviors() as $behavior) {
            if ($behavior instanceof FileBehavior) {
                $hasFileBehavior = true;
                break;
            }
        }
        if (!$hasFileBehavior) {
            return Html::tag('div', Html::tag('b', Yii::t('yii', 'Error')) . ': ' . $this->getModule()->t('attachments', 'The behavior FileBehavior has not been attached to the model.'), ['class' => 'alert alert-danger']);
        }
        $confirm = Yii::t('yii', 'Are you sure you want to delete this item?');
        $js = <<<JS
        \$(".delete-button").click(function(){
            var tr = this.closest('tr');
            var url = \$(this).data('url');
            if (confirm("{$confirm}")) {
                \$.ajax({
                    method: "POST",
                    url: url,
                    success: function(data) {
                        if (data) {
                            tr.remove();
                        }
                    }
                });
            }
        });
JS;
        Yii::$app->view->registerJs($js);
        return GridView::widget(['dataProvider' => new ArrayDataProvider(['allModels' => $this->model->getFiles()]), 'layout' => '{items}', 'tableOptions' => $this->tableOptions, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['label' => $this->getModule()->t('attachments', 'File name'), 'format' => 'raw', 'value' => function ($model) {
            return Html::a("{$model->name}.{$model->type}", $model->getUrl(), ['class' => ' group' . $model->itemId, 'onclick' => 'return false;']);
        }], ['class' => 'yii\\grid\\ActionColumn', 'template' => '{delete}', 'buttons' => ['delete' => function ($url, $model, $key) {
            return Html::a('<span class="glyphicon glyphicon-trash"></span>', '#', ['class' => 'delete-button', 'title' => Yii::t('yii', 'Delete'), 'data-url' => Url::to(['/attachments/file/delete', 'id' => $model->id])]);
        }]]]]) . Colorbox::widget(['targets' => ['.group' . $this->model->id => ['rel' => '.group' . $this->model->id, 'photo' => true, 'scalePhotos' => true, 'width' => '100%', 'height' => '100%', 'maxWidth' => 800, 'maxHeight' => 600]], 'coreStyle' => 4]);
    }
<?php

use yii\helpers\Html;
use yii\grid\GridView;
?>
<div class="bank-master-index">
    <?php 
$org = app\models\Organization::find()->asArray()->one();
$model->sort = false;
$dispColumn = false;
if ($type == 'Excel') {
    $dispColumn = true;
    echo "<meta http-equiv=\"Content-type\" content=\"text/html;charset=utf-8\" />";
    echo "<table><tr> <th colspan='7'><h3>" . $org['org_name'] . "</h3> </th> </tr> </table>";
}
?>
    <?php 
echo GridView::widget(['dataProvider' => $model, 'layout' => '{items}', 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'bank_master_name', 'bank_alias', ['attribute' => 'created_at', 'value' => function ($data) {
    return Yii::$app->formatter->asDateTime($data->created_at);
}, 'visible' => $dispColumn], ['attribute' => 'created_by', 'value' => 'createdBy.user_login_id', 'visible' => $dispColumn], ['attribute' => 'updated_at', 'value' => function ($data) {
    return !empty($data->updated_at) ? Yii::$app->formatter->asDateTime($data->updated_at) : " (not set) ";
}, 'visible' => $dispColumn], ['attribute' => 'updated_by', 'value' => 'updatedBy.user_login_id', 'visible' => $dispColumn]]]);
?>

</div>
Example #12
0
<div class="box-header with-border">
	<h3 class="box-title"><i class="fa fa-inr"></i><sup><i class="fa fa-clock-o"></i></sup> <?php 
echo Yii::t('fees', 'Payment History');
?>
</h3>
</div>
<div class="box-body table-responsive no-padding">
<?php 
$stuFeesData = app\modules\fees\models\FeesPaymentTransaction::find()->where(['fees_pay_tran_stu_id' => $stuData->stu_master_id, 'fees_pay_tran_collect_id' => $FccModel->fees_collect_category_id, 'is_status' => 0]);
$dataProvider = new ActiveDataProvider(['query' => $stuFeesData, 'sort' => ['defaultOrder' => ['fees_pay_tran_id' => SORT_DESC]], 'pagination' => ['pageSize' => 10]]);
\yii\widgets\Pjax::begin(['enablePushState' => FALSE]);
echo GridView::widget(['dataProvider' => $dataProvider, 'layout' => "{items}\n{pager}", 'showOnEmpty' => true, 'emptyText' => Yii::t('fees', 'No fees results found.'), 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'fees_pay_tran_id', ['attribute' => 'fees_pay_tran_date', 'value' => function ($data) {
    return Yii::$app->dateformatter->getDateDisplay($data['fees_pay_tran_date']);
}], ['attribute' => 'fees_pay_tran_mode', 'value' => function ($data) {
    return $data->fees_pay_tran_mode == 1 ? "Cash" : "Cheque";
}], ['attribute' => 'fees_pay_tran_cheque_no', 'value' => function ($data) {
    return !empty($data->fees_pay_tran_cheque_no) ? $data->fees_pay_tran_cheque_no : "-";
}], ['attribute' => 'fees_pay_tran_bank_id', 'value' => function ($data) {
    return !empty($data->feesPayTranBank->bank_master_name) ? $data->feesPayTranBank->bank_master_name : "-";
}], 'fees_pay_tran_bank_branch', 'fees_pay_tran_amount', ['class' => 'app\\components\\CustomActionColumn', 'template' => '{update} {delete}']]]);
\yii\widgets\Pjax::end();
?>
</div><!---End Pannel Body Of Student Payment History--->
</div><!---End Payment History box Block--->

<!--/div--> <!--------End responcive div tag------>

<!--/div-->
</div>
<script>
$(document).ready(function(){
Example #13
0
?>
<div class="venda-index">

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

    <p>
        <?= Html::a(Yii::t('app', 'Create Venda'), ['create'], ['class' => 'btn btn-success']) ?>
    </p>

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

            'idvenda',
            'data',
            'desconto',
            'valortotal',
            'cliente_idcliente',
            // 'vendedor_idvendedor',
            'forma_pagamento_idforma_pagamento',
            // 'loja_idloja',

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

</div>
Example #14
0
<?php

use yii\helpers\Html;
use yii\grid\GridView;
/* @var $this yii\web\View */
/* @var $searchModel backend\models\search\KeyStorageItemSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = Yii::t('backend', 'Key Storage Items');
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="key-storage-item-index">

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

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

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'key', 'value', ['class' => 'yii\\grid\\ActionColumn', 'template' => '{update} {delete}']]]);
?>

</div>
Example #15
0
<?php

use yii\helpers\Html;
use yii\grid\GridView;
use yii\grid\ActionColumn;
/**
 * @var yii\web\View $this
 * @var yii\data\ActiveDataProvider $dataProvider
 * @var app\modules\user\models\SearchUser $searchModel
 */
$this->title = 'Список страниц';
$this->params['breadcrumbs'][] = $this->title;
?>

<div class="">
   <?php 
echo GridView::widget(['id' => 'pages-grid', 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['attribute' => 'id', 'options' => array('width' => '50px')], ['attribute' => 'title', 'format' => 'html', 'value' => function ($model) {
    return Html::a($model['title'], ['update', 'id' => $model['id']]);
}], ['attribute' => 'alias', 'format' => 'url', 'value' => function ($model) {
    return \yii\helpers\Url::To('@web/page/' . $model->alias, true);
}], ['attribute' => 'created_at', 'format' => ['date', 'dd.MM.yyyy'], 'options' => array('width' => '225px'), 'filter' => \yii\jui\DatePicker::widget(['dateFormat' => 'dd.MM.yyyy', 'model' => $searchModel, 'attribute' => 'created_at', 'options' => ['class' => 'form-control'], 'clientOptions' => ['dateFormat' => 'dd.mm.yy']])], ['class' => 'yii\\grid\\ActionColumn']]]);
?>
</div>

Example #16
0
use yii\helpers\Html;
use yii\grid\GridView;
/* @var $this yii\web\View */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Termékkategóriák';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="product-categories-index">

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

    <p>
        <?php 
echo Html::a('Új kategória létrehozása', ['create'], ['class' => 'btn btn-success']);
?>
    </p>

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'columns' => ['id', 'title', 'slug', ['attribute' => 'visible', 'value' => function ($model, $index, $dataColumn) {
    return $model["visible"] == 1 ? "Igen" : "Nem";
}], 'order', ['class' => 'yii\\grid\\ActionColumn', 'buttons' => ['view' => function ($url, $model, $key) {
    return Html::a(Html::tag('span', '', ['class' => 'glyphicon glyphicon-eye-open']), Yii::$app->urlManager->createAbsoluteUrl(["/category/view/", "justcategory" => $model["slug"]]));
}]]]]);
?>

</div>
use yii\helpers\Html;
use yii\grid\GridView;
/* @var $this yii\web\View */
/* @var $searchModel app\models\CitySearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Cities';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="city-index">

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

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

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'id', 'name', 'name_eng', 'region', ['class' => 'yii\\grid\\ActionColumn']]]);
?>

</div>
Example #18
0
use yii\helpers\Html;
use yii\grid\GridView;
use backend\models\CmsRecipes;
/* @var $this yii\web\View */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = Yii::t('backend', 'Recipes');
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="cms-recipes-index">

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

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

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'rowOptions' => function ($model) {
    if ($model->is_active == 0) {
        return ['class' => 'danger'];
    }
}, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'id', 'title', array('attribute' => 'is_active', 'filter' => Html::activeDropDownList($searchModel, 'is_active', CmsRecipes::dropdownActive(), ['class' => 'form-control', 'prompt' => Yii::t('backend', 'All')]), 'format' => 'boolean'), 'sort_order', ['class' => 'yii\\grid\\ActionColumn', 'template' => '{update} {delete}']]]);
?>

</div>
Example #19
0
<?php 
echo $this->render('/_alert', ['module' => Yii::$app->getModule('user')]);
?>

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

<?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'layout' => "{items}\n{pager}", 'columns' => ['username', 'email:email', ['attribute' => 'registration_ip', 'value' => function ($model) {
    return $model->registration_ip == null ? '<span class="not-set">' . Yii::t('user', '(not set)') . '</span>' : $model->registration_ip;
}, 'format' => 'html'], ['attribute' => 'created_at', 'value' => function ($model) {
    return Yii::t('user', '{0, date, MMMM dd, YYYY HH:mm}', [$model->created_at]);
}], ['header' => Yii::t('user', 'Confirmation'), 'value' => function ($model) {
    if ($model->isConfirmed) {
        return '<div class="text-center"><span class="text-success">' . Yii::t('user', 'Confirmed') . '</span></div>';
    } else {
        return Html::a(Yii::t('user', 'Confirm'), ['confirm', 'id' => $model->id], ['class' => 'btn btn-xs btn-success btn-block', 'data-method' => 'post', 'data-confirm' => Yii::t('user', 'Are you sure you want to confirm this user?')]);
    }
}, 'format' => 'raw', 'visible' => Yii::$app->getModule('user')->enableConfirmation], ['header' => Yii::t('user', 'Block status'), 'value' => function ($model) {
    if ($model->isBlocked) {
        return Html::a(Yii::t('user', 'Unblock'), ['block', 'id' => $model->id], ['class' => 'btn btn-xs btn-success btn-block', 'data-method' => 'post', 'data-confirm' => Yii::t('user', 'Are you sure you want to unblock this user?')]);
    } else {
        return Html::a(Yii::t('user', 'Block'), ['block', 'id' => $model->id], ['class' => 'btn btn-xs btn-danger btn-block', 'data-method' => 'post', 'data-confirm' => Yii::t('user', 'Are you sure you want to block this user?')]);
    }
}, 'format' => 'raw'], ['class' => 'yii\\grid\\ActionColumn', 'template' => '{update} {delete}']]]);
?>

<?php 
Pjax::end();
Example #20
0
	<div class="col-xs-4 left-padding">
	<?php 
echo Html::a(Yii::t('dash', 'PDF'), ['/export-data/export-to-pdf', 'model' => get_class($searchModel)], ['class' => 'btn btn-block btn-warning', 'target' => '_blank']);
?>
	</div>
	<div class="col-xs-4 left-padding">
	<?php 
echo Html::a(Yii::t('dash', 'EXCEL'), ['/export-data/export-excel', 'model' => get_class($searchModel)], ['class' => 'btn btn-block btn-primary', 'target' => '_blank']);
?>
	</div>
  </div>
</div>

<div class="col-xs-12" style="padding-top: 10px;">
   <div class="box">
      <div class="box-body table-responsive">
	<div class="msg-of-day-index">
	<?php 
Pjax::begin(['enablePushState' => false]);
?>
	    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'summary' => '', 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'msg_details', ['attribute' => 'msg_user_type', 'value' => function ($model) {
    return $model->msg_user_type == 'S' ? 'Student' : ($model->msg_user_type == 'E' ? "Employee" : "General");
}, 'filter' => ['S' => 'Student', 'E' => 'Employee', '0' => 'General']], ['class' => '\\pheme\\grid\\ToggleColumn', 'attribute' => 'is_status', 'enableAjax' => true, 'filter' => ['0' => 'Active', '1' => 'Deactive']], ['class' => 'app\\components\\CustomActionColumn']]]);
Pjax::end();
?>
	</div>
      </div>
   </div>
</div>
    echo $flash;
    ?>
</p>
    <?php 
    Alert::end();
}
if ($flash = Yii::$app->session->getFlash("restaurant_chian_notification_error")) {
    Alert::begin(['options' => ['class' => 'alert-danger alert-dismissable'], 'icon' => 'fa fa-info', 'closeButton' => []]);
    ?>
    <p><?php 
    echo $flash;
    ?>
</p>
    <?php 
    Alert::end();
}
Row::begin();
Column::begin();
Box::begin(['type' => Box::TYPE_INFO, 'header' => $this->title, 'headerIcon' => 'fa fa-gear']);
echo $this->render('_restaurant_search', ['model' => $searchModel, 'restaurantDetails' => $restaurantDetails]);
$queryArray = yii::$app->getRequest()->getQueryParams();
if ($queryArray['RestaurantSearch']) {
    $form = ActiveForm::begin(['action' => ['tag'], 'method' => 'post']);
    echo Html::submitButton('Allocate', ['class' => 'btn btn-success']);
    echo GridView::widget(['filterPosition' => false, 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'tableOptions' => ['class' => 'table table-bordered'], 'columns' => ['Id', 'name', 1 ? ['class' => 'yii\\grid\\CheckboxColumn', 'multiple' => false] : []]]);
    echo Html::input('hidden', 'chainId', $restaurantDetails->Id);
    ActiveForm::end();
}
Box::end();
Column::end();
Row::end();
Example #22
0
use yii\widgets\Pjax;
/* @var $this yii\web\View */
/* @var $searchModel app\models\auth\AuthRuleSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Auth Rules';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="auth-rule-index">

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

    <p>
        <?php 
echo Html::a('Create Auth Rule', ['create'], ['class' => 'btn btn-success']);
?>
    </p>
<?php 
Pjax::begin();
?>
    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'name', 'data:ntext', 'created_at', 'updated_at', ['class' => 'yii\\grid\\ActionColumn']]]);
Pjax::end();
?>
</div>
Example #23
0
<?php

use yii\helpers\Html;
use yii\grid\GridView;
/* @var $this yii\web\View */
/* @var $searchModel \backend\models\search\WidgetTextSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = Yii::t('backend', 'Text Blocks');
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="text-block-index">

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

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

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'id', 'key', 'title', ['class' => \common\grid\EnumColumn::className(), 'attribute' => 'status', 'enum' => [Yii::t('backend', 'Disabled'), Yii::t('backend', 'Enabled')]], ['class' => 'yii\\grid\\ActionColumn', 'template' => '{update}{delete}']]]);
?>

</div>
Example #24
0
<?php

use yii\helpers\Html;
use yii\grid\GridView;
/* @var $this yii\web\View */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Galleries';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="gallery-index">

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

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

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'id', 'src', 'name', 'desc:ntext', 'status', ['class' => 'yii\\grid\\ActionColumn']]]);
?>

</div>
Example #25
0
<?php

use yii\helpers\Html;
use yii\grid\GridView;
use yii\data\ArrayDataProvider;
use yii\helpers\ArrayHelper;
/**
 * @var yii\web\View $this
 */
$this->title = Yii::t('rbac', 'Generate Routes');
$this->params['breadcrumbs'][] = ['label' => Yii::t('rbac', 'Routes'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<h1><?php 
echo Yii::t('rbac', 'Generate Routes');
?>
</h1>

<?php 
echo Html::beginForm();
echo GridView::widget(['dataProvider' => new ArrayDataProvider(['allModels' => $new]), 'columns' => [['class' => 'yii\\grid\\CheckboxColumn', 'checkboxOptions' => function ($model) {
    return ['value' => ArrayHelper::getValue($model, 'name'), 'checked' => true];
}], ['class' => 'yii\\grid\\DataColumn', 'attribute' => 'name']]]);
echo Html::submitButton(Yii::t('rbac', 'Append'), ['name' => 'Submit', 'class' => 'btn btn-primary']);
echo Html::endForm();
Example #26
0
<div class="basketStepsBlock col-xs-12">
    <div id="step1" class="basketSteps" style="display:block"><i style="float: left;" class="icon-white icon-circle-success"></i>Выберите товары для заказа</div>
</div>
<h1>Ваша корзина.</h1>
<div id="basket">
    <div class="col-xs-12 col-lg-12 col-md-12 col-sm-12">
        <?php 
echo GridView::widget(['id' => 'BasketGrid', 'dataProvider' => $model, 'columns' => [['attribute' => 'manufacturer', 'label' => 'Производитель'], ['label' => 'Номер детали', 'value' => function ($model) {
    return $model['tovar_id'] ? $model['tovar_id'] : $model['part_number'];
}], ['label' => 'Название детали', 'value' => function ($model) {
    return $model['part_name'] ? $model['part_name'] : $model['tovar']['name'];
}], ['attribute' => '', 'label' => 'Цена', 'value' => function ($model) {
    return number_format($model['tovar_price'], 2, '.', '');
}, 'contentOptions' => ['class' => 'itemPrice']], ['label' => 'Кол-во ед.', 'format' => 'raw', 'value' => function ($model) {
    return '<input type="number" class="form-control" onChange="countBasketSum(); detailCounter(this, ' . $model['id'] . ')" value="' . $model['tovar_count'] . '" min="' . $model['tovar_min'] . '">';
}, 'contentOptions' => ['class' => 'itemCount']], ['attribute' => 'allsum', 'label' => 'Сумма', 'value' => function ($model) {
    return number_format($model['tovar_price'], 2, '.', '');
}, 'contentOptions' => ['class' => 'itemFullPrice']], ['attribute' => 'period', 'label' => 'Срок'], ['label' => 'Описание', 'format' => 'raw', 'value' => function ($model) {
    $description = $model['description'] ? $model['description'] : 'Ввести описание';
    $data = Html::a('<i class="icon-edit icon-white"></i>', '#', ['class' => 'grid-right-up-corner', 'onClick' => 'editText(this)', 'title' => 'Редактировать описание']);
    $data .= Html::a('<i class="icon-cross icon-white"></i>', '#', ['class' => 'grid-left-up-corner', 'onClick' => 'cancelEdit(this)', 'title' => 'Отменить редактирование']);
    $data .= '<span id="oldText" style="display: none"></span>';
    $data .= Html::textarea('itemDescription', $description, ['readonly' => true]);
    return $data;
}, 'contentOptions' => ['class' => 'itemDescription']], ['class' => 'yii\\grid\\CheckboxColumn', 'checkboxOptions' => ['onChange' => 'countBasketMarkedItemsSum()'], 'header' => yii\helpers\Html::checkBox('selection_all', false, ['class' => 'select-on-check-all', 'onChange' => 'countBasketMarkedItemsSum()', 'value' => '0'])]]]);
?>

    </div>
    <div class="col-xs-12 col-lg-12 col-md-12 col-sm-12">
        <div class="basket-grid-footer">
            <div class="basked-all-items">В корзине товаров на сумму: <strong><?php 
echo Yii::$app->formatter->asCurrency($itogo['tovar_summa']);
Example #27
0
echo $this->title;
?>
        </div>
    </div>


    <div class="body">


        <?php 
$form = ActiveForm::begin(['method' => 'get']);
?>
        <div class="row">
            <div class="col-md-8 col-sm-12">
                <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $model, 'layout' => '{pager}']);
?>
            </div>

            <div class="col-md-4 col-sm-12">
                <div class="table-group-actions pull-right margin-top-10">


                        <?php 
$selectedRankId = Yii::$app->request->get()[$model->formName()]['user_rank'];
echo Html::dropDownList($model->formName() . "[user_rank]", $selectedRankId, ArrayHelper::merge(["0" => "选择类型"], ArrayHelper::map($rankList, 'rank_id', 'rank_name')), ['class' => 'select2 form-control input-inline input-small input-sm table-group-action-input']);
?>
                        &nbsp;
                        <?php 
echo Html::submitButton("", ['class' => 'btn btn-sm yellow fa fa-search ', 'title' => Yii::$app->params['lang']['button_search']]);
?>
Example #28
0
    <?php 
echo $this->render('_search', ['model' => $searchModel]);
?>

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

        <?php 
//            echo Html::a(Yii::t('app', 'Ajuste Compromiso', [
//                    'modelClass' => 'Ajustes',
//                ]), ['create', 'page' => '1'], ['class' => 'btn btn-primary']);
//
//            echo Html::a(Yii::t('app', 'Ajuste Causado', [
//                    'modelClass' => 'Ajustes',
//                ]), ['create', 'page' => '2'], ['class' => 'btn btn-primary']);
//
//            echo Html::a(Yii::t('app', 'Ajuste Pagado', [
//                    'modelClass' => 'Ajustes',
//                ]), ['create', 'page' => '3'], ['class' => 'btn btn-primary']);
?>

    </p>

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'observacion', 'id_documento', 'id_tipo', 'monto_ajuste', 'id_usuario_crea', ['class' => 'yii\\grid\\ActionColumn']]]);
?>

</div>
Example #29
0
use yii\helpers\Url;
use yii\grid\GridView;
$title = Yii::t('user', 'Roles');
$this->title = $title . ' | ' . Yii::$app->name;
$this->params['breadcrumbs'] = [$title];
?>
<h1><?php 
echo Html::encode($title);
?>
</h1>

<div class="btn-toolbar" role="toolbar">
	<?php 
echo Html::a(Yii::t('user', 'Create'), ['create'], ['class' => 'btn btn-primary']);
?>
</div>

<?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'summary' => '', 'showHeader' => false, 'tableOptions' => ['class' => 'table table-condensed'], 'columns' => [['header' => Yii::t('user', 'Name'), 'format' => 'html', 'value' => function ($model, $key, $index, $column) {
    $r = Html::encode($model->name);
    if (!empty($model->description)) {
        $r .= ' ' . Html::tag('span', Html::encode('(' . $model->description . ')'), ['class' => 'text-muted']);
    }
    $children = \Yii::$app->authManager->getChildren($model->name);
    foreach ($children as $child) {
        $r .= ' ' . Html::tag('span', Html::encode($child->name), ['class' => $child->type == $child::TYPE_ROLE ? 'label label-primary' : 'label label-default', 'title' => $child->description]);
    }
    return $r;
}], ['class' => 'yii\\grid\\ActionColumn', 'options' => ['style' => 'width: 50px;'], 'template' => '{update} {delete}', 'urlCreator' => function ($action, $model, $key, $index) {
    return Url::toRoute([$action, 'name' => $model->name]);
}]]]);
Example #30
0
<?php

use yii\helpers\Html;
use yii\grid\GridView;
/* @var $this yii\web\View */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = Yii::t('ui', 'Dct Languages');
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="dct-language-index">

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

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

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'dct_language_id', 'name', 'prefix', 'enable', ['class' => 'yii\\grid\\ActionColumn']]]);
?>

</div>