Pjax only deals with the content enclosed between its [[begin()]] and [[end()]] calls, called the *body content* of the widget. By default, any link click or form submission (for those forms with data-pjax attribute) within the body content will trigger an AJAX request. In responding to the AJAX request, Pjax will send the updated body content (based on the AJAX request) to the client which will replace the old content with the new one. The browser's URL will then be updated using pushState. The whole process requires no reloading of the layout or resources (js, css). You may configure [[linkSelector]] to specify which links should trigger pjax, and configure [[formSelector]] to specify which form submission may trigger pjax. You may disable pjax for a specific link inside the container by adding data-pjax="0" attribute to this link. The following example shows how to use Pjax with the GridView widget so that the grid pagination, sorting and filtering can be done via pjax: php use yii\widgets\Pjax; Pjax::begin(); echo GridView::widget([...]); Pjax::end();
Since: 2.0
Author: Qiang Xue (qiang.xue@gmail.com)
Inheritance: extends yii\base\Widget
コード例 #1
4
ファイル: AjaxCrud.php プロジェクト: omnilight/yz2-admin
 public function run()
 {
     $this->registerScripts();
     if ($this->type == self::TYPE_INDEX) {
         Pjax::begin(['enablePushState' => false, 'enableReplaceState' => false, 'linkSelector' => '.pagination a']);
     }
     echo Html::tag('div', '', ['class' => 'ajax-crud-container ajax-crud-type-' . $this->type . ' ajax-crud-name-' . $this->name, 'id' => $this->getContainerId(), 'data' => ['type' => $this->type, 'name' => $this->name, 'container-index' => '#' . $this->getContainerId(self::TYPE_INDEX), 'container-create' => '#' . $this->getContainerId(self::TYPE_CREATE), 'container-update' => '#' . $this->getContainerId(self::TYPE_UPDATE)]]);
     if ($this->type == self::TYPE_INDEX) {
         Pjax::end();
     }
 }
コード例 #2
3
ファイル: Table.php プロジェクト: lukianovva/clover
 protected function getPjaxEnd()
 {
     $html = '';
     if ($this->pjax) {
         ob_start();
         Pjax::end();
         $html = ob_get_clean();
     }
     return $html;
 }
コード例 #3
3
ファイル: index.php プロジェクト: simbiosis-group/yii2-user
<?php

use anli\user\widgets\TenantList;
use yii\helpers\Html;
use yii\helpers\Url;
use yii\widgets\Pjax;
$this->title = 'Tenant';
Pjax::begin(['id' => 'list-pjax']);
?>
<div class="row">
    <div class="col-md-12">
        <?php 
echo TenantList::widget(['title' => "{$status} Tenants", 'subtitle' => 'showing up to 100...', 'searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
?>
    </div>
</div>
<?php 
pjax::end();
コード例 #4
2
ファイル: index.php プロジェクト: heartshare/yii2-seo-toolbar
/**
 * @var PageForm $model
 * @var array $seoAttributes
 */
use understeam\seotoolbar\assets\ToolbarAssets;
use understeam\seotoolbar\models\PageForm;
use yii\widgets\ActiveForm;
ToolbarAssets::register($this);
?>
<div class="seo-toolbar">
    <div class="toolbar-inner collapsed">
        <a class="yii-seo-toolbar-logo" href="#">
            <span>&gt;</span>
        </a>
        <?php 
$pjax = \yii\widgets\Pjax::begin(['id' => 'seo-toolbar-pjax', 'enablePushState' => false, 'linkSelector' => false, 'formSelector' => '#seo-entity-form']);
?>
        <?php 
$flashes = Yii::$app->session->getFlash('seo-success', [], true);
?>
        <?php 
foreach ($flashes as $flash) {
    ?>
            <div class="seo-success">
                <?php 
    echo $flash;
    ?>
            </div>
        <?php 
}
?>
コード例 #5
1
 public function run()
 {
     if ($this->_pjax) {
         $this->_pjax->end();
     }
     parent::run();
 }
コード例 #6
1
ファイル: index.php プロジェクト: night1pl/Nzi_Project
function show_params($id, $product)
{
    ?>
 <?php 
    echo "<td><a href=\"../product?id=" . $product[$id]['product_id'] . "\">" . $product[$id]['name'] . "</a>" . "</td>";
    ?>
 <?php 
    echo "<td>" . $product[$id]['quantity'] . "</td>";
    ?>
 <?php 
    echo "<td>\$" . $product[$id]['price'] . "</td>";
    ?>
 <?php 
    echo "<td>\$" . $product[$id]['quantity'] * $product[$id]['price'] . "</td>";
    ?>
       <?php 
    Pjax::begin();
    ?>
       <td><?php 
    echo Html::a("Delete", ['../product/del?id=' . $product[$id]['product_id']], ['class' => 'btn btn-sm btn-danger', 'type' => 'button']);
    ?>
</td>
       <?php 
    Pjax::end();
    ?>
 <?php 
}
コード例 #7
1
ファイル: GridView.php プロジェクト: harish-reglobbe/Auction
    public function run(){

        if($this->is_pjax){
            Pjax::begin($this->pjaxOptions);
        }

        parent::run();

        if($this->isShowForm) {
            echo PageSize::widget([
                'model'     => $this->filterModel,
                'attribute' => $this->attribute,
                'options'   => [
                    'data-pjax' => '0',
                ],
            ]);
        }

        if($this->is_pjax){
            Pjax::end();
        }

        echo ModelCrud::widget([
            'size' => $this->modalSize,
            'updateUrl' => ($this->updateUrl)? $this->updateUrl : Url::to(['update']),
            'createUrl' => ($this->createUrl)? $this->createUrl : Url::to(['create']),
            'updateVerb' => 'post',
            'viewUrl' => Url::to(['view']),
            'viewVerb' => 'post',
            'createVerb' => 'post',
            'modelTitle' => $this->modelTitle,
            'template' => '{view}{update}{create}',
            'modelClass' =>  $this->dataProvider->query->modelClass
        ]);
    }
コード例 #8
0
ファイル: CmsTreeWidget.php プロジェクト: skeeks-cms/cms
 /**
  * @return $this
  */
 protected function _endPjax()
 {
     if ($this->_pjaxIsStart === true) {
         $className = $this->pjax->className();
         $className::end();
     }
     return $this;
 }
コード例 #9
0
ファイル: Pjax.php プロジェクト: zolotarev/yii2-semantic-ui
 public function registerClientScript()
 {
     parent::registerClientScript();
     $this->getView()->registerJs('
     var pjaxLoader_' . $this->getSanitizedId() . ' = "' . addslashes($this->loader) . '";
     jQuery(document).on("pjax:start", "#' . $this->options['id'] . '", function() {
         jQuery("#' . $this->options['id'] . '").append(pjaxLoader_' . $this->getSanitizedId() . ');
     });
     ');
 }
コード例 #10
0
ファイル: Pjax.php プロジェクト: skeeks-cms/cms
    /**
     * Registers the needed JavaScript.
     */
    public function registerClientScript()
    {
        parent::registerClientScript();
        $errorMessage = \Yii::t('skeeks/admin', 'An unexpected error occurred. Refer to the developers.');
        if ($this->isBlock === true) {
            $this->getView()->registerJs(<<<JS
                (function(sx, \$, _)
                {
                    var blockerPanel = new sx.classes.Blocker('.sx-panel');

                    \$(document).on('pjax:send', function(e)
                    {
                        blockerPanel = new sx.classes.Blocker(\$(e.target));
                        blockerPanel.block();
                    });

                    \$(document).on('pjax:complete', function(e) {
                        blockerPanel.unblock();
                    });

                    \$(document).on('pjax:error', function(e, data) {
                        sx.notify.error('{$errorMessage}');
                        blockerPanel.unblock();
                    });

                })(sx, sx.\$, sx._);
JS
);
        }
        if ($this->blockContainer) {
            $this->getView()->registerJs(<<<JS
                (function(sx, \$, _)
                {
                    var blockerPanel = new sx.classes.Blocker(\$("{$this->blockContainer}"));

                    \$(document).on('pjax:send', function(e)
                    {
                        var blockerPanel = new sx.classes.Blocker(\$("{$this->blockContainer}"));
                        blockerPanel.block();
                    });

                    \$(document).on('pjax:complete', function(e) {
                        blockerPanel.unblock();
                    });

                    \$(document).on('pjax:error', function(e, data) {
                        sx.notify.error('{$errorMessage}');
                        blockerPanel.unblock();
                    });

                })(sx, sx.\$, sx._);
JS
);
        }
    }
コード例 #11
0
ファイル: Pjax.php プロジェクト: skoro/yii2-admin-template
 /**
  * @inheritdoc
  */
 public function run()
 {
     if ($this->requiresPjax()) {
         echo Notify::widget($this->notifyOptions);
     }
     $id = $this->options['id'];
     if ($this->modal) {
         $this->getView()->registerJs("Admin.Modal.pjax('#{$id}');");
     }
     parent::run();
 }
コード例 #12
0
ファイル: Pjax.php プロジェクト: hiqdev/hipanel-core
 public function run()
 {
     if ($this->requiresPjax()) {
         Alert::widget();
         /// We do render breadcrumbs only for the main outer PJAX block
         if ($this->id === Yii::$app->params['pjax']['id']) {
             $this->addBreadcrumbs();
         }
     }
     parent::run();
 }
コード例 #13
0
ファイル: Pjax.php プロジェクト: Liv1020/cms
    /**
     * Registers the needed JavaScript.
     */
    public function registerClientScript()
    {
        parent::registerClientScript();
        if ($this->blockPjaxContainer === true) {
            $this->getView()->registerJs(<<<JS
            (function(sx, \$, _)
            {
                var blockerPanel = new sx.classes.Blocker('.sx-panel');

                \$(document).on('pjax:send', function(e)
                {
                    var blockerPanel = new sx.classes.Blocker(\$(e.target));
                    blockerPanel.block();
                })

                \$(document).on('pjax:complete', function(e) {
                    blockerPanel.unblock();
                })

            })(sx, sx.\$, sx._);
JS
);
        }
        if ($this->blockContainer) {
            $this->getView()->registerJs(<<<JS
            (function(sx, \$, _)
            {
                var blockerPanel = new sx.classes.Blocker(\$("{$this->blockContainer}"));

                \$(document).on('pjax:send', function(e)
                {
                    var blockerPanel = new sx.classes.Blocker(\$("{$this->blockContainer}"));
                    blockerPanel.block();
                })

                \$(document).on('pjax:complete', function(e) {
                    blockerPanel.unblock();
                })

            })(sx, sx.\$, sx._);
JS
);
        }
    }
コード例 #14
0
ファイル: Params.php プロジェクト: zarv1k/yii2-params
 public function run()
 {
     Pjax::begin(['enablePushState' => false, 'formSelector' => $this->getFormId()]);
     if (\Yii::$app->session->getFlash('yii2-params-updated')) {
         // TODO: review this custom alert code
         $closeButton = Html::button('&times;', ['data-dismiss' => 'alert', 'aria-hidden' => 'true', 'class' => 'close']);
         echo Html::tag('div', $closeButton . "Params updated successfully!", ['class' => 'alert-info alert fade in']);
     }
     /** @var \zarv1k\params\models\DynamicParam[] $models */
     $models = \zarv1k\params\models\Params::getDynamicModels();
     $form = ActiveForm::begin(['id' => $this->getFormId(), 'action' => \Yii::$app->getUrlManager()->createUrl("{$this->_moduleId}/manage")]);
     /** @var ActiveField $activeField */
     $activeField = \Yii::$container->get('yii\\widgets\\ActiveField');
     // TODO: review get from di
     foreach ($models as $model) {
         echo $form->field($model, "[{$model->owner->id}]{$model->owner->code}", ['labelOptions' => ArrayHelper::merge($activeField->labelOptions, ['label' => $model->owner->description, 'title' => $model->owner->name]), 'inputOptions' => ArrayHelper::merge($activeField->inputOptions, ['placeholder' => $model->owner->description, 'title' => $model->owner->name])]);
     }
     echo Html::submitButton($this->getSubmitContent(), $this->getSubmitOptions());
     ActiveForm::end();
     Pjax::end();
 }
コード例 #15
0
ファイル: FiasSelector.php プロジェクト: ejen/yii2-fias
 public function run()
 {
     $id = Html::getInputId($this->model, $this->attribute);
     $name = Html::getInputName($this->model, $this->attribute);
     Pjax::begin(['id' => $id, 'enablePushState' => false]);
     if ($this->model->{$this->attribute}) {
         echo $this->renderAddrobj($this->model->{$this->attribute});
         echo $this->renderChildren($this->model->{$this->attribute});
         // Выводит в скрытый инпут полное наименование для дальнейшего использования в гугл картах
         echo Html::hiddenInput(null, FiasHelper::toFullString($this->model->{$this->attribute}), ['class' => 'full-name']);
     } else {
         // Выводит в скрытый инпут полное наименование для дальнейшего использования в гугл картах
         echo Html::hiddenInput(null, null, ['class' => 'full-name']);
         $query = FiasAddrobj::find();
         $query->andWhere(['parentguid' => 'f6e148a1-c9d0-4141-a608-93e3bd95e6c4', 'currstatus' => 0]);
         $query->orderBy('formalname');
         $data = ArrayHelper::map($query->all(), 'aoguid', 'name');
         echo $this->renderDropDownList($data);
     }
     echo Html::activeHiddenInput($this->model, $this->attribute, ['id' => null]);
     $this->view->registerJs("\n\n            \$('#" . $id . " select').change(function(){\n                \n                \$.pjax.defaults.data = {\n                    '{$name}': \$(this).val(),\n                };\n\n                \$.pjax.reload('#" . $id . "', {\n                    type: 'POST'\n                });\n\n            });\n        ");
     Pjax::end();
 }
コード例 #16
0
ファイル: _form.php プロジェクト: adsavin/car
        ]);
//        echo 
//        GridView::widget([
//            'dataProvider' => $dataProvider,
//            'filterModel' => $searchModel,
//            'columns' => [
//                ['class' => 'yii\grid\SerialColumn'],
////            'id',
//                'name',
//                'product_group_id',
//                'code',
//                'detail:ntext',
//                // 'created_time',
//                // 'last_update',
//                // 'user_id',
//                // 'product_unit_id',
//                ['class' => 'yii\grid\ActionColumn'],
//            ],
//        ]);
        ?>
        <?php Pjax::end() ?>
    </div>
</div>
<?php
$this->registerJs('
    $("#txtProductGroupId").on("input", function() {
        var id = $(this).val().trim();        
        queryItem(id, "product-category/search", "productgroup-product_category_id", "txtProductGroupName");
    });
    ');
コード例 #17
0
if (Mimin::filterRoute($this->context->id . '/tabarsip')) {
    ?>
                    <li class="active">
                        <a href="<?php 
    echo Url::to(['simpel-keg/varsip']);
    ?>
" >
                            Arsip </a>
                    </li>
                <?php 
}
?>
            </ul>
        </div>
        <?php 
Pjax::begin(['id' => 'dinasSearch']);
$url_search = Url::to(['simpel-keg/search-serasi']);
$js = <<<js
\$("#searchQuery").keyup(function(){
    var kata = \$(this).val();
    if(kata.length > 3 || kata.length == 0){
         \$("#datadinasGridview").load("{$url_search}"+"?search="+\$(this).val());
    }
});


 
js;
$this->registerJS($js);
?>
        <div class="wp-posts-index">
コード例 #18
0
ファイル: index.php プロジェクト: rzamarripa/shabel
            ['attribute'=>'fechacreacion_ft','format'=>['datetime',(isset(Yii::$app->modules['datecontrol']['displaySettings']['datetime'])) ? Yii::$app->modules['datecontrol']['displaySettings']['datetime'] : 'd-m-Y H:i:s A']],

            [
                'class' => 'yii\grid\ActionColumn',
                'buttons' => [
                'update' => function ($url, $model) {
                                    return Html::a('<span class="glyphicon glyphicon-pencil"></span>', Yii::$app->urlManager->createUrl(['solicitud/view','id' => $model->id,'edit'=>'t']), [
                                                    'title' => Yii::t('yii', 'Edit'),
                                                  ]);}

                ],
            ],
        ],
        'responsive'=>true,
        'hover'=>true,
        'condensed'=>true,
        'floatHeader'=>true,




        'panel' => [
            'heading'=>'<h3 class="panel-title"><i class="glyphicon glyphicon-th-list"></i> '.Html::encode($this->title).' </h3>',
            'type'=>'info',
            'before'=>Html::a('<i class="glyphicon glyphicon-plus"></i> Add', ['create'], ['class' => 'btn btn-success']),                                                                                                                                                          'after'=>Html::a('<i class="glyphicon glyphicon-repeat"></i> Reset List', ['index'], ['class' => 'btn btn-info']),
            'showFooter'=>false
        ],
    ]); Pjax::end(); ?>

</div>
コード例 #19
0
ファイル: view.php プロジェクト: baranov-nt/setyes
use yii\widgets\Pjax;
use yii\bootstrap\Modal;
Modal::begin(['size' => 'modal-sm text-center', 'header' => '<h5>' . Yii::t('app', 'Do you want to delete the ad?') . '</h5>', 'toggleButton' => false, 'closeButton' => false, 'id' => 'delete-element-' . $widget->id]);
echo Html::button(Yii::t('app', 'Yes'), ['class' => 'btn btn-danger', 'style' => 'margin-right: 5px;', 'onclick' => '
        $("#delete-element-' . $widget->id . '").modal("hide");
        $.pjax({
                    type: "POST",
                    url: "' . Url::to(['/ad/view/delete']) . '",
                    container: "#element_container_' . $widget->id . '",
                    data: {id: ' . $widget->id . '},
                    push: false
                })
    ']);
echo Html::button(Yii::t('app', 'No'), ['class' => 'btn btn-success', 'data-dismiss' => 'modal', 'aria-hidden' => 'true', 'style' => 'margin-left: 5px;']);
Modal::end();
Pjax::widget();
$js = <<<JS
\$("#star_container_{$widget->id}").on("pjax:complete", function() {
    \$("#star_container_{$widget->id}").attr("tabindex",-1).focus();
 });
JS;
$this->registerJS($js);
?>

<div id="element_container_<?php 
echo $widget->id;
?>
" class="main-container-element <?php 
echo $widget->main_container_class;
?>
">
コード例 #20
0
    /**
     * @inheritdoc
     */
    public function run()
    {
        $form = clone $this->form;
        if (empty($form->fieldConfig['template'])) {
            $form->fieldConfig['template'] = "{label}\n{input}\n{hint}\n{error}";
        }
        if (empty($form->fieldConfig['labelOptions'])) {
            $form->fieldConfig['labelOptions'] = ['class' => 'control-label'];
        }
        $keys = array_keys($this->models);
        $form->fieldConfig['template'] = str_replace('{input}', $this->inputTemplate, $form->fieldConfig['template']);
        $button = Html::a(Html::tag('span', '', ['class' => 'glyphicon glyphicon-plus']), $this->urlAdd, $this->buttonOptions);
        echo $this->field($form, $this->models[$keys[0]], "[{$keys[0]}]{$this->attribute}", $button);
        if (!$this->labelEach) {
            $form->fieldConfig['template'] = str_replace('{label}', Html::tag('label', '', $form->fieldConfig['labelOptions']), $form->fieldConfig['template']);
        }
        if (!$this->hintEach) {
            $form->fieldConfig['template'] = preg_replace('/\\{hint\\}|\\{hint\\}\\n|\\{hint\\}\\s/i', '', $form->fieldConfig['template']);
        }
        for ($i = 1; $i != count($keys); $i++) {
            $button = Html::a(Html::tag('span', '', ['class' => 'glyphicon glyphicon-minus']), array_merge((array) $this->urlRemove, ['id' => $this->models[$i]->{$this->primaryKey}]), $this->buttonOptions);
            echo $this->field($form, $this->models[$keys[$i]], "[{$keys[$i]}]{$this->attribute}", $button);
        }
        if ($this->form->enableClientScript) {
            $dfClientOptions = [];
            for ($i = 0; $i != count($form->attributes); $i++) {
                if (strpos($form->attributes[$i]['name'], $this->attribute) !== false) {
                    $dfClientOptions[] = $form->attributes[$i];
                }
            }
            $dfClientOptions = Json::encode($dfClientOptions);
            $formClientOptions = Json::encode($this->form->attributes);
            $js = <<<JS
(function(\$) {
    var dfClientOptions = {$dfClientOptions},
        \$form = \$('#{$this->form->id}');
    \$form.yiiActiveForm('data').attributes = {$formClientOptions};
    for (var i = 0; i != dfClientOptions.length; i++) {
        \$form.yiiActiveForm('add', dfClientOptions[i]);
    }
}(jQuery));
JS;
            $this->view->registerJs($js, View::POS_LOAD);
        }
        Pjax::end();
    }
コード例 #21
0
// Buttons
?>
        <div class="pull-right">
            <?php 
echo Html::a(Yii::t('app', 'Create {modelClass}', ['modelClass' => Yii::t('infoweb/alias', 'Alias')]), ['create'], ['class' => 'btn btn-success']);
?>
    
        </div>
    </h1>
    
    <?php 
// Flash messages
?>
    <?php 
echo $this->render('_flash_messages');
?>

    <?php 
// Gridview
?>
    <?php 
Pjax::begin(['id' => 'grid-pjax']);
?>
    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'kartik\\grid\\DataColumn', 'label' => Yii::t('app', 'Entity'), 'value' => 'entityTypeName'], ['class' => 'kartik\\grid\\DataColumn', 'label' => Yii::t('app', 'Name'), 'attribute' => 'entityModel.name', 'value' => 'entityModel.name', 'enableSorting' => true], ['class' => 'kartik\\grid\\DataColumn', 'label' => Yii::t('app', 'Url'), 'value' => function ($data) {
    return '/' . Yii::$app->language . '/' . $data->url;
}, 'enableSorting' => true], ['class' => 'kartik\\grid\\ActionColumn', 'template' => '{update}', 'updateOptions' => ['title' => Yii::t('app', 'Update'), 'data-toggle' => 'tooltip'], 'width' => '100px']], 'responsive' => true, 'floatHeader' => true, 'floatHeaderOptions' => ['scrollingTop' => 88], 'hover' => true, 'export' => false]);
?>

</div>
コード例 #22
0
ファイル: GridView.php プロジェクト: hscstudio/psiaga
 /**
  * Ends the PJAX container
  */
 protected function endPjax()
 {
     if (!$this->pjax) {
         return;
     }
     echo ArrayHelper::getValue($this->pjaxSettings, 'afterGrid', '');
     Pjax::end();
 }
コード例 #23
0
ファイル: category.php プロジェクト: absol3112/sonneboutique
            </div>
        </div>
        -->
        <!--/discount  panel end-->
    </div>
</div>

<!--right column-->
<div class="col-lg-9 col-md-9 col-sm-12">
    <div class="w100 clearfix category-top">
        <?php 
echo Html::tag('h2', $this->title);
?>
        <div class="categoryImage">
            <img src="/images/site/category.jpg" class="img-responsive" alt="img">
        </div>
    </div>

            <?php 
Pjax::begin();
?>
            <?php 
echo ListView::widget(['options' => ['id' => 'product-listview'], 'layout' => $template, 'dataProvider' => $dataProvider, 'itemOptions' => ['class' => 'item col-lg-3 col-md-3 col-sm-6 col-xs-12'], 'itemView' => function ($model, $key, $index, $widget) {
    return $this->render('_product_item', ['model' => $model]);
}, 'summaryOptions' => ['class' => 'pull-left']]);
?>
            <?php 
Pjax::end();
?>
    <!--/.categoryFooter-->
</div>
コード例 #24
0
ファイル: _form.php プロジェクト: EduSec/EduSec
</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(){
	var chkvalue = $('#feespaymenttransaction-fees_pay_tran_mode').val();
	if(chkvalue==1) {
		$(".cheque-data").hide();
		$(".cash-data").show();
	}
コード例 #25
0
ファイル: BaseComment.php プロジェクト: ochiem/app-cms
 /**
  * @inheritdoc
  */
 public function run()
 {
     if ($this->comments) {
         Pjax::begin();
         echo Html::beginTag($this->tag, ArrayHelper::merge(['id' => $this->id], $this->options));
         $this->renderComments($this->comments);
         echo Html::endTag($this->tag);
         echo Html::beginTag('nav', ['class' => 'comment-pagination']);
         echo LinkPager::widget(['pagination' => $this->pages, 'activePageCssClass' => 'active', 'disabledPageCssClass' => 'disabled', 'options' => ['class' => 'pagination']]);
         echo Html::endTag('nav');
         Pjax::end();
     }
 }
コード例 #26
0
ファイル: view.php プロジェクト: GalkinDmitriy/evalotta
		</td>
		<td class="c23">

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

			<?//= Html::img('/image/bannerfans_15821322.jpg', ['width'=>'100%']); ?>
			<p><?php 
echo Html::encode($model->description);
?>
<br><br></p>

			<? if (!(Yii::$app->user->isGuest)) Pjax::begin(['id' => 'notes']); ?>
			<?php 
echo ListView::widget(['dataProvider' => $products, 'itemOptions' => ['class' => '_product'], 'layout' => "{items}\n{pager}\n", 'itemView' => '//product/_product', 'viewParams' => array('groups' => $groups)]);
?>
			<? if (!(Yii::$app->user->isGuest)) Pjax::end(); ?>

		</td>
	</tr>
</table>

<?php 
echo Html::input('hidden', 'this_category_id', $model->category_id, $options = ['class' => 'this_category_id']);
echo Html::input('hidden', 'group_this_category_id', $model->category_id, $options = ['class' => 'group_this_category_id']);
?>


コード例 #27
0
			<?
		    	// usage without model
				echo '<label class="control-label">Дата завершения кампании</label>';
				echo DatePicker::widget([
				    'name' => 'date_end',
					'value' => $time_end,
				    'pluginOptions' => [
				        'autoclose' => true,
						'format' => 'yyyy-mm-dd',
						'startDate' => $time_end,
				        'todayHighlight' => true
				    ],
				]);
		    ?>

		<?Pjax::end();?>


		<br>
	    <?php 
echo $form->field($model, 'link')->textinput();
?>
    
    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? 'Добавить' : 'Обновить', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>

    <?php 
ActiveForm::end();
コード例 #28
0
ファイル: report2.php プロジェクト: inamjung/testupgithup
?>
           
                ถึงวันที่:
                <?php 
echo yii\jui\DatePicker::widget(['name' => 'date2', 'value' => $date2, 'language' => 'th', 'dateFormat' => 'yyyy-MM-dd', 'clientOptions' => ['changeMonth' => true, 'changeYear' => true], 'options' => ['class' => 'form-control']]);
?>
            </div> 
            <div class="col-xs-4 col-sm-4 col-md-2">
                <button class='btn btn-danger'>ประมวลผล</button>
            </div>   
        </div>
    </form>
</div>

<?php 
Pjax::begin();
?>
 
<?php 
echo \kartik\grid\GridView::widget(['dataProvider' => $dataProvider, 'formatter' => ['class' => 'yii\\i18n\\Formatter', 'nullDisplay' => '-'], 'responsive' => TRUE, 'hover' => true, 'floatHeader' => FALSE, 'panel' => ['heading' => 'รายการสอบเทียบค่ามาตรฐาน', 'before' => '', 'type' => \kartik\grid\GridView::TYPE_INFO], 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['label' => 'วันที่สอบเทียบ', 'attribute' => 'caldate', 'headerOptions' => ['class' => 'text-center']], ['label' => 'รายการ', 'attribute' => 'name_list', 'headerOptions' => ['class' => 'text-center']], ['label' => 'เลขครุภัณฑ์', 'attribute' => 'numberpas', 'headerOptions' => ['class' => 'text-center'], 'contentOptions' => ['class' => 'text-center']], ['label' => 'แผนก', 'attribute' => 'dep', 'headerOptions' => ['class' => 'text-center']], ['label' => 'ผลสอบเทียบ', 'attribute' => 'result', 'headerOptions' => ['class' => 'text-center']], ['label' => 'หมายเหตุ', 'attribute' => 'cuase', 'headerOptions' => ['class' => 'text-center']]]]);
?>

<?php 
$script = <<<JS
\$(function(){
    \$("label[title='Show all data']").hide();
});
        
\$('#btn_sql').on('click', function(e) {
    
   \$('#sql').toggle();
コード例 #29
0
ファイル: index.php プロジェクト: alissoncti/sgo
    <div class="row">
        <div class="col-md-12">
            <?php Pjax::begin(); ?>
            <?= DynaGrid::widget([
                'columns' => $columns,
                'theme' => 'panel-danger',
                'showPersonalize' => false,
                'gridOptions' => [
                    'dataProvider' => $dataProvider,
                    //'filterModel' => $searchModel,
                    'showPageSummary' => false,
                ],
                'options' => ['id' => 'dynagrid-1'],
            ]); ?>
            <?php Pjax::end(); ?>
        </div>
    </div>


    <!-- Modal Saida Despesas -->
    <div class="modal fade" id="modalSaidaDespesas"  role="dialog" aria-labelledby="modalSaidaDespesasLabel">
      <div class="modal-dialog" role="document">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <h4 class="modal-title" id="myModalLabel">Saída - Despesas</h4>
          </div>
          <div class="modal-body">
            <?/*= $this->render('/despesa/_form', [
                'model' => $despesa,
コード例 #30
-2
ファイル: index.php プロジェクト: v3toys/skeeks
<?php

/**
 * @author Semenov Alexander <*****@*****.**>
 * @link http://skeeks.com/
 * @copyright 2010 SkeekS (СкикС)
 * @date 02.06.2015
 */
/* @var $this yii\web\View */
/* @var $searchModel \skeeks\cms\models\Search */
/* @var $dataProvider yii\data\ActiveDataProvider */
$pjax = \yii\widgets\Pjax::begin();
?>

    <?php 
/*echo $this->render('@skeeks/cms/views/admin-cms-content-element/_search', [
      'searchModel' => $searchModel,
      'dataProvider' => $dataProvider,
      'content_id' => $content_id,
      'cmsContent' => $cmsContent,
  ]); */
?>

    <?php 
echo \skeeks\cms\modules\admin\widgets\GridViewStandart::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'autoColumns' => false, 'pjax' => $pjax, 'adminController' => $controller, 'columns' => ['id', ['class' => \skeeks\cms\grid\CreatedAtColumn::className()], ['attribute' => 'user_id', 'class' => \skeeks\cms\grid\UserColumnData::className()], 'full_name', 'phone', 'email', 'status_name', ['label' => 'К оплате', 'value' => function (\v3toys\skeeks\models\V3toysMessage $v3toysOrder) {
    return \Yii::$app->money->convertAndFormat($v3toysOrder->money);
}]]]);
?>

<?php 
$pjax::end();