예제 #1
0
<?php

use yii\web\View;
use yii\helpers\Url;
use yii\widgets\pjax;
/* @var $this \yii\web\View */
/* @var $status string */
/* @var $dataProvider \yii\data\ActiveDataProvider | array */
$asset = \app\assets\ModulesAsset::register($this);
if ($status === 'install') {
    $this->registerJs("\n        yii.modules.moduleSwitch('.JModuleSwitch','#pjax-content');\n        yii.modules.moduleUninstall('.JModuleUninstall', '#pjax-content');", View::POS_READY, 'yii.modules.moduleSwitch.moduleSwitch_JModuleUninstall');
}
Pjax::begin(['options' => ['id' => 'pjax-content', 'enableReplaceState' => true], 'timeout' => 10000]);
?>
<!-- Pjax Content Begin-->
<div id="pjax-content">
    <div class="content-header">
        <h1 id="" class="page-header">
            模块列表
            &nbsp;
            <a class="btn <?php 
echo $status == 'install' ? 'btn-primary' : 'btn-default';
?>
 " href="<?php 
echo Url::toRoute(['modules/index', 'status' => 'install']);
?>
" role="button">已安装</a>
            <a class="btn <?php 
echo $status == 'uninstall' ? 'btn-primary' : 'btn-default';
?>
" href="<?php 
예제 #2
0
<?php

use yii\bootstrap\Modal;
Modal::begin(['id' => 'categoryModal']);
Pjax::begin(['id' => 'pjax-modal', 'timeout' => false, 'enablePushState' => false, 'enableReplaceState' => false]);
Pjax::end();
Modal::end();
예제 #3
0
use yii\grid\GridView;
/* @var $this yii\web\View */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = Yii::t('app', 'Tweets');
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="tweet-index">

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

    <p>
        <?php 
echo Html::a(Yii::t('app', 'Create {modelClass}', ['modelClass' => 'Tweet']), ['create'], ['class' => 'btn btn-success']);
?>
    </p>
    
    <?php 
Pjax::begin();
?>
    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'created_at', 'text', 'rating', ['class' => 'yii\\grid\\ActionColumn']]]);
?>
    <?php 
Pjax::end();
?>

</div>
예제 #4
0
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="category-index">
    <?php 
Pjax::begin(['timeout' => false, 'id' => 'pjax-gridview']);
?>
    
    <h1><?php 
echo Html::encode($this->title);
?>
</h1>
    <?php 
// echo $this->render('_search', ['model' => $searchModel]);