コード例 #1
1
ファイル: view.php プロジェクト: romdim/dbi-playground

    
<?php 
$this->beginBlock('TilesUsers');
?>
<div style='position: relative'><div style='position:absolute; right: 0px; top 0px;'>
  <?php 
echo Html::a('<span class="glyphicon glyphicon-list"></span> ' . 'List All' . ' Tiles Users', ['tiles-users/index'], ['class' => 'btn text-muted btn-xs']);
?>
  <?php 
echo Html::a('<span class="glyphicon glyphicon-plus"></span> ' . 'New' . ' Tiles User', ['tiles-users/create', 'TilesUser' => ['tile' => $model->id]], ['class' => 'btn btn-success btn-xs']);
?>
</div></div><?php 
Pjax::begin(['id' => 'pjax-TilesUsers', 'enableReplaceState' => false, 'linkSelector' => '#pjax-TilesUsers ul.pagination a, th a', 'clientOptions' => ['pjax:success' => 'function(){alert("yo")}']]);
echo '<div class="table-responsive">' . \yii\grid\GridView::widget(['layout' => '{summary}{pager}<br/>{items}{pager}', 'dataProvider' => new \yii\data\ActiveDataProvider(['query' => $model->getTilesUsers(), 'pagination' => ['pageSize' => 20, 'pageParam' => 'page-tilesusers']]), 'pager' => ['class' => yii\widgets\LinkPager::className(), 'firstPageLabel' => 'First', 'lastPageLabel' => 'Last'], 'columns' => [['class' => 'yii\\grid\\ActionColumn', 'template' => '{view} {update}', 'contentOptions' => ['nowrap' => 'nowrap'], 'urlCreator' => function ($action, $model, $key, $index) {
    // using the column name as key, not mapping to 'id' like the standard generator
    $params = is_array($key) ? $key : [$model->primaryKey()[0] => (string) $key];
    $params[0] = 'tiles-users' . '/' . $action;
    return $params;
}, 'buttons' => [], 'controller' => 'tiles-users'], ['class' => yii\grid\DataColumn::className(), 'attribute' => 'level', 'value' => function ($model) {
    if ($rel = $model->getLevel()->one()) {
        return Html::a($rel->id, ['levels/view', 'id' => $rel->id], ['data-pjax' => 0]);
    } else {
        return '';
    }
}, 'format' => 'raw'], 'created_at', 'updated_at', 'created_by', 'updated_by']]) . '</div>';
Pjax::end();
$this->endBlock();
?>
コード例 #2
1
ファイル: _list.php プロジェクト: mademingshiwo/todolist
" role="button">数据导出</a>
         	<a id="<?php 
    echo $data->id;
    ?>
" class="delete_query btn btn-warning btn-xs" href="#" role="button">删除查询</a>
         </td>
      </tr>
   <?php 
}
?>
   </tbody>
</table>
<div id="pagination">
<div>
<?php 
echo yii\widgets\LinkPager::widget(['pagination' => $pages]);
?>
</div>
<div>
<?php 
echo "总共有{$pages->totalCount}条记录,当前显示从" . strval($pages->offset + 1) . "-" . strval($pages->offset + $pages->limit > $pages->totalCount ? $pages->totalCount : $pages->offset + $pages->limit) . "的记录";
?>
</div>
</div>
<script>
jQuery('body').on('click','.delete_query',function(){
	var r=confirm("你确定要删除吗?");
	if(r==true) {
	    var tr = $(this).parents('tr');
	    var query_id = $(this).attr('id');
	    $.ajax({
コード例 #3
0
ファイル: index.php プロジェクト: ICHydro/anaconda
?>
        </div>

        <div class="pull-right">

                                                    
            <?php 
echo \yii\bootstrap\ButtonDropdown::widget(['id' => 'giiant-relations', 'encodeLabel' => false, 'label' => '<span class="glyphicon glyphicon-paperclip"></span> ' . Yii::t('app', 'Relations'), 'dropdown' => ['options' => ['class' => 'dropdown-menu-right'], 'encodeLabels' => false, 'items' => [['url' => ['sensor/index'], 'label' => '<i class="glyphicon glyphicon-arrow-right">&nbsp;' . Yii::t('app', 'Sensor') . '</i>']]], 'options' => ['class' => 'btn-default']]);
?>
        </div>
    </div>


    <div class="table-responsive">
        <?php 
echo GridView::widget(['layout' => '{summary}{pager}{items}{pager}', 'dataProvider' => $dataProvider, 'pager' => ['class' => yii\widgets\LinkPager::className(), 'firstPageLabel' => Yii::t('app', 'First'), 'lastPageLabel' => Yii::t('app', 'Last')], 'filterModel' => $searchModel, 'tableOptions' => ['class' => 'table table-striped table-bordered table-hover'], 'headerRowOptions' => ['class' => 'x'], 'columns' => [['class' => 'yii\\grid\\ActionColumn', 'urlCreator' => function ($action, $model, $key, $index) {
    // using the column name as key, not mapping to 'id' like the standard generator
    $params = is_array($key) ? $key : [$model->primaryKey()[0] => (string) $key];
    $params[0] = \Yii::$app->controller->id ? \Yii::$app->controller->id . '/' . $action : $action;
    return Url::toRoute($params);
}, 'contentOptions' => ['nowrap' => 'nowrap']], 'startdate', 'enddate', ['class' => yii\grid\DataColumn::className(), 'attribute' => 'sensorid', 'value' => function ($model) {
    if ($rel = $model->getSensor()->one()) {
        return Html::a($rel->name, ['sensor/view', 'id' => $rel->id], ['data-pjax' => 0]);
    } else {
        return '';
    }
}, 'format' => 'raw'], 'filename', 'status']]);
?>
    </div>

</div>
コード例 #4
0
ファイル: index.php プロジェクト: Brother-Simon/easyii
        echo Url::to(['/admin/' . $module . '/a/down', 'id' => $item->primaryKey]);
        ?>
" class="btn btn-default move-down" title="<?php 
        echo Yii::t('easyii', 'Move down');
        ?>
"><span class="glyphicon glyphicon-arrow-down"></span></a>
                        <a href="<?php 
        echo Url::to(['/admin/' . $module . '/a/delete', 'id' => $item->primaryKey]);
        ?>
" class="btn btn-default confirm-delete" title="<?php 
        echo Yii::t('easyii', 'Delete item');
        ?>
"><span class="glyphicon glyphicon-remove"></span></a>
                    </div>
                </td>
            </tr>
        <?php 
    }
    ?>
        </tbody>
    </table>
    <?php 
    echo yii\widgets\LinkPager::widget(['pagination' => $data->pagination]);
} else {
    ?>
    <p><?php 
    echo Yii::t('easyii', 'No records found');
    ?>
</p>
<?php 
}
コード例 #5
0
ファイル: update.php プロジェクト: webtoolsnz/yii2-scheduler
?>
    <?php 
$this->endBlock();
?>



    <?php 
$this->beginBlock('logs');
?>
    <div class="table-responsive">
        <?php 
\yii\widgets\Pjax::begin(['id' => 'logs']);
?>
        <?php 
echo GridView::widget(['layout' => '{summary}{pager}{items}{pager}', 'dataProvider' => $logDataProvider, 'pager' => ['class' => yii\widgets\LinkPager::className(), 'firstPageLabel' => Yii::t('app', 'First'), 'lastPageLabel' => Yii::t('app', 'Last')], 'columns' => [['attribute' => 'started_at', 'format' => 'raw', 'value' => function ($m) {
    return Html::a(Yii::$app->getFormatter()->asDatetime($m->started_at), ['view-log', 'id' => $m->id]);
}], 'ended_at:datetime', ['label' => 'Duration', 'value' => function ($m) {
    return $m->getDuration();
}], ['label' => 'Result', 'format' => 'raw', 'contentOptions' => ['class' => 'text-center'], 'value' => function ($m) {
    return Html::tag('span', '', ['class' => $m->error == 0 ? 'text-success glyphicon glyphicon-ok-circle' : 'text-danger glyphicon glyphicon-remove-circle']);
}]]]);
?>
        <?php 
\yii\widgets\Pjax::end();
?>
    </div>
    <?php 
$this->endBlock();
?>
コード例 #6
0
ファイル: index.php プロジェクト: RubenDjOn/PrivateTeacher
            <?php 
echo \yii\bootstrap\ButtonDropdown::widget(['id' => 'giiant-relations', 'encodeLabel' => false, 'label' => '<span class="glyphicon glyphicon-paperclip"></span> ' . 'Relations', 'dropdown' => ['options' => ['class' => 'dropdown-menu-right'], 'encodeLabels' => false, 'items' => [['label' => '<i class="glyphicon glyphicon-arrow-right"> Payment</i>', 'url' => ['payment/index']], ['label' => '<i class="glyphicon glyphicon-arrow-left"> User</i>', 'url' => ['user/index']], ['label' => '<i class="glyphicon glyphicon-arrow-left"> User</i>', 'url' => ['user/index']], ['label' => '<i class="glyphicon glyphicon-arrow-left"> User</i>', 'url' => ['user/index']]]]]);
?>
        </div>
    </div>

    
        <div class="panel panel-default">
            <div class="panel-heading">
                Students            </div>

            <div class="panel-body">

                <div class="table-responsive">
                <?php 
echo GridView::widget(['layout' => '{summary}{pager}{items}{pager}', 'dataProvider' => $dataProvider, 'pager' => ['class' => yii\widgets\LinkPager::className(), 'firstPageLabel' => 'First', 'lastPageLabel' => 'Last'], 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\ActionColumn', 'urlCreator' => function ($action, $model, $key, $index) {
    // using the column name as key, not mapping to 'id' like the standard generator
    $params = is_array($key) ? $key : [$model->primaryKey()[0] => (string) $key];
    $params[0] = \Yii::$app->controller->id ? \Yii::$app->controller->id . '/' . $action : $action;
    return Url::toRoute($params);
}, 'contentOptions' => ['nowrap' => 'nowrap']], 'id', 'user_id', 'name', 'lastname', 'email:email', 'avatar', 'lesson_cost:url']]);
?>
                </div>

            </div>

        </div>


    
</div>
コード例 #7
0
ファイル: list.php プロジェクト: rocketyang/hasscms-app
     <div class="reply-form" data-nestedLevel="<?php 
        echo $nestedLevel;
        ?>
">

     </div>
     <?php 
        if ($model->isReplied()) {
            echo CommentsList::widget(['entity' => $entity, "entity_id" => $entity_id, "parent_id" => $model->comment_id, "nestedLevel" => $nestedLevel + 1]);
        }
        ?>
    <?php 
    }
    ?>
  </div>
</div>
<?php 
}
?>

<?php 
if ($nestedLevel == 1) {
    ?>
</div>
<div class="box-tools pull-right">
		<?php 
    echo yii\widgets\LinkPager::widget(['pagination' => $dataProvider->pagination, 'options' => ['class' => 'pagination pagination-sm inline']]);
    ?>
</div>
<?php 
}
コード例 #8
0
ファイル: list.php プロジェクト: SlimSavernake/yii2-comments
<?php

use yeesoft\comments\Comments;
use yii\helpers\ArrayHelper;
use yii\widgets\ListView;
use yii\widgets\Pjax;
/* @var $this yii\web\View */
/* @var $model yeesoft\comments\models\Comment */
?>

<?php 
$containerClass = ArrayHelper::getValue($dataProvider->query->where, 'parent_id') ? 'sub-comments' : 'comments';
?>

<?php 
if ($comment) {
    Pjax::begin();
    echo ListView::widget(['dataProvider' => $dataProvider, 'emptyText' => Comments::t('comments', 'No Comments'), 'itemView' => function ($model, $key, $index, $widget) use($comment, $nested_level) {
        return $this->render('item', compact('model', 'widget', 'comment', 'nested_level'));
    }, 'options' => ['class' => $containerClass], 'itemOptions' => ['class' => 'comment'], 'layout' => '{items}<div class="text-center">{pager}</div>', 'pager' => ['class' => yii\widgets\LinkPager::className(), 'options' => ['class' => 'pagination pagination-sm']]]);
    Pjax::end();
}
コード例 #9
0
ファイル: index.php プロジェクト: huylv-hust/ws
    ?>
"
                               id="nstcd<?php 
    echo $product['M05_COM_CD'] . $product['M05_NST_CD'];
    ?>
"/>
                        </tr>
<?php 
}
?>
                    </tbody>
                </table>
                <nav class="paging">

<?php 
echo yii\widgets\LinkPager::widget(['pagination' => $pagination, 'nextPageLabel' => '&gt;', 'prevPageLabel' => '&lt;', 'firstPageLabel' => '&laquo;', 'lastPageLabel' => '&raquo;']);
?>

                </nav>
            </div>
            <div class="modal-footer"><a href="#bgContentProduct" class="btnSubmit" style="cursor: pointer"
                                         onclick="closePop()">選択する</a></div>
        </div>
    </div>
</div>
<div id="modalRegistConfirm" class="modal fade">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button aria-label="Close" data-dismiss="modal" class="close" type="button"><span
                        aria-hidden="true">×</span></button>
コード例 #10
0
ファイル: view.php プロジェクト: febfeb/yii2-dynamic-field
    <div class="clearfix"></div>

    <div class="panel panel-default">
        <div class="panel-body">
            <?php 
if (isset($dataProvider)) {
    $column = [['class' => 'yii\\grid\\ActionColumn', 'urlCreator' => function ($action, $model, $key, $index) {
        // using the column name as key, not mapping to 'id' like the standard generator
        $params = is_array($key) ? $key : [$model->primaryKey()[0] => (string) $key];
        $params[0] = \Yii::$app->controller->id ? \Yii::$app->controller->id . '/' . $action : $action;
        return Url::toRoute($params);
    }, 'contentOptions' => ['nowrap' => 'nowrap', 'style' => 'text-align:center']]];
    /* @var $searchModel \app\models\search\CobaBroh */
    foreach ($searchModel->attributes() as $attribute) {
        \app\components\NodeLogger::sendLog($attribute);
        $column[] = $attribute;
    }
    ?>
            <?php 
    echo GridView::widget(['layout' => '{summary}{pager}{items}{pager}', 'dataProvider' => $dataProvider, 'pager' => ['class' => yii\widgets\LinkPager::className(), 'firstPageLabel' => 'First', 'lastPageLabel' => 'Last'], 'filterModel' => $searchModel, 'tableOptions' => ['class' => 'table table-striped table-bordered table-hover'], 'headerRowOptions' => ['class' => 'x'], 'columns' => $column]);
    ?>
            <?php 
} else {
    echo "Please Generate Model First or Click Here : <br>" . Html::a("<i class='fa fa-check'></i> Generate Model", ["table/generate", "id" => $model->id], ["class" => "btn btn-info"]);
}
?>
        </div>
    </div>
</div>
コード例 #11
0
ファイル: index.php プロジェクト: alexus007/budget
        <div class="panel-heading">
            <h2>
                <i><?php 
echo Yii::t('app', 'Budgets');
?>
 <?php 
echo HelpPopover::widget(['dataOptions' => ['content' => Yii::t('help', 'BudgetHelp')]]);
?>
</i>
            </h2>
        </div>

        <div class="panel-body">

            <div class="table-responsive">
                <?php 
echo GridView::widget(['layout' => '{summary}{pager}{items}{pager}', 'dataProvider' => $dataProvider, 'pager' => ['class' => yii\widgets\LinkPager::className(), 'firstPageLabel' => Yii::t('app', 'First'), 'lastPageLabel' => Yii::t('app', 'Last')], 'filterModel' => $searchModel, 'tableOptions' => ['class' => 'table table-striped table-bordered table-hover'], 'headerRowOptions' => ['class' => 'x'], 'columns' => [['class' => yii\grid\ActionColumn::className(), 'contentOptions' => ['nowrap' => 'nowrap']], 'title', 'income_limit', 'costs_limit', ['filter' => kartik\date\DatePicker::widget(['model' => $searchModel, 'attribute' => 'created_date', 'pluginOptions' => ['format' => 'dd.mm.yyyy']]), 'attribute' => 'created_date', 'format' => 'date']]]);
?>
            </div>

        </div>

    </div>

    <?php 
\yii\widgets\Pjax::end();
?>


</div>
コード例 #12
0
ファイル: index.php プロジェクト: johnitvn/mg075hynlo5793r5gt
</h5>
        </div>
        <div class="ibox-content"> 
            <form>
                <div class="input-group">
                    <input type="text" placeholder="<?php 
echo Yii::t('app', 'Search employee');
?>
" class="input form-control" name="q" value="<?php 
echo isset($_GET['q']) ? $_GET['q'] : "";
?>
">
                    <span class="input-group-btn">
                        <button type="submit" class="btn btn btn-primary"><i class = "fa fa-search"></i> <?php 
echo Yii::t('app', 'Search');
?>
</button>
                    </span>
                </div>
            </form>          
            <div class="table-responsive m-t">
                <?php 
echo GridView::widget(['layout' => '{items}{pager}', 'dataProvider' => $dataProvider, 'pager' => ['class' => yii\widgets\LinkPager::className(), 'firstPageLabel' => Yii::t('app', 'First'), 'lastPageLabel' => Yii::t('app', 'Last')], 'tableOptions' => ['class' => 'table table-striped table-hover'], 'columns' => ['id', ['attribute' => 'avatar', 'value' => function ($model) {
    return '<img src="/img/default-avatar/28.jpg"/>';
}, 'format' => 'raw'], 'fullname', 'username', 'email:email', ['class' => 'backend\\components\\grid\\ActionColumn']]]);
?>
            </div>
        </div>
    </div>
</div>
コード例 #13
0
        }
        $key++;
        ?>
      	<td><?php 
        echo $td_data_format;
        ?>
</td>
      	<?php 
    }
    ?>
      </tr>
   <?php 
}
?>
   </tbody>
</table>
<script>
try{$("[data-toggle='tooltip']").tooltip();}catch(e){}
</script>
	<div style="text-align: center">
		<div class="pagination">
		<?php 
echo yii\widgets\LinkPager::widget(['pagination' => $data['pages']]);
?>
		</div>
		<div>
		<?php 
echo "总共有{$data['pages']->totalCount}条记录,当前显示从" . strval($data['pages']->offset + 1) . "-" . strval($data['pages']->offset + $data['pages']->limit > $data['pages']->totalCount ? $data['pages']->totalCount : $data['pages']->offset + $data['pages']->limit) . "的记录";
?>
		</div>
	</div>
コード例 #14
-1
ファイル: view.php プロジェクト: AlvaCorp/yii2-boilerplate
					<?php 
echo RgnPostcodeAccess::button('index', ['label' => 'All Postcodes', 'buttonOptions' => ['class' => 'btn btn-success btn-xs']]);
?>

					<?php 
echo RgnPostcodeAccess::button('create', ['label' => 'New Postcode', 'urlOptions' => ['RgnPostcodeForm' => ['country_id' => $model->country_id, 'province_id' => $model->province_id, 'city_id' => $model->city_id, 'district_id' => $model->id]], 'buttonOptions' => ['class' => 'btn btn-success btn-xs']]);
?>

				</div>
			</div>

			<?php 
Pjax::begin(['id' => 'pjax-RgnPostcodes', 'enableReplaceState' => false, 'linkSelector' => '#pjax-RgnPostcodes ul.pagination a, th a', 'clientOptions' => ['pjax:success' => 'function(){alert("yo")}']]);
?>
			<?php 
echo '<div class="table-responsive">' . \yii\grid\GridView::widget(['layout' => '{summary}{pager}<br/>{items}{pager}', 'dataProvider' => new \yii\data\ActiveDataProvider(['query' => $model->getRgnPostcodes(), 'pagination' => ['pageSize' => 50, 'pageParam' => 'page-rgnpostcodes']]), 'pager' => ['class' => yii\widgets\LinkPager::className(), 'firstPageLabel' => 'First', 'lastPageLabel' => 'Last'], 'columns' => [['class' => 'yii\\grid\\SerialColumn', "options" => ["width" => "50px"]], ["attribute" => "postcode", "format" => "raw", "options" => [], "value" => function ($model) {
    return $model->linkTo;
}], ['attribute' => 'subdistrict_id', "format" => "raw", "options" => [], 'value' => function ($model) {
    return $model->subdistrict ? $model->subdistrict->linkTo : '<span class="label label-warning">?</span>';
}]]]) . '</div>';
?>
			<?php 
Pjax::end();
?>
			<?php 
$this->endBlock();
?>



			<?php 
コード例 #15
-4
ファイル: index.php プロジェクト: AlvaCorp/yii2-boilerplate
	<div class="panel panel-default">
		<div class="panel-heading">
			<h2>
				<i><?php 
echo 'Postcodes';
?>
</i>
			</h2>
		</div>

		<div class="panel-body">

			<div class="table-responsive">
				<?php 
echo GridView::widget(['layout' => '{summary}{pager}{items}{pager}', 'dataProvider' => $dataProvider, 'pager' => ['class' => yii\widgets\LinkPager::className(), 'firstPageLabel' => 'First', 'lastPageLabel' => 'Last'], 'filterModel' => $searchModel, 'tableOptions' => ['class' => 'table table-striped table-bordered table-hover'], 'headerRowOptions' => ['class' => 'x'], 'columns' => [['class' => 'yii\\grid\\SerialColumn', "options" => ["width" => "50px"]], ["attribute" => "postcode", "format" => "raw", "options" => [], "value" => function ($model) {
    return $model->linkTo;
}], ['attribute' => 'province_id', "format" => "raw", "options" => [], 'value' => function ($model) {
    return $model->province ? $model->province->linkTo : '<span class="label label-warning">?</span>';
}], ['attribute' => 'city_id', "format" => "raw", "options" => [], 'value' => function ($model) {
    return $model->city ? $model->city->linkTo : '<span class="label label-warning">?</span>';
}], ['attribute' => 'district_id', "format" => "raw", "options" => [], 'value' => function ($model) {
    return $model->district ? $model->district->linkTo : '<span class="label label-warning">?</span>';
}]]]);
?>
			</div>

		</div>

	</div>