当前位置: 首页>>代码示例>>PHP>>正文


PHP bootstrap\Tabs类代码示例

本文整理汇总了PHP中dmstr\bootstrap\Tabs的典型用法代码示例。如果您正苦于以下问题:PHP Tabs类的具体用法?PHP Tabs怎么用?PHP Tabs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Tabs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: actionView

 /**
  * Displays a single Role model.
  * @param integer $id
  *
  * @return mixed
  */
 public function actionView($id)
 {
     \Yii::$app->session['__crudReturnUrl'] = Url::previous();
     Url::remember();
     Tabs::rememberActiveState();
     return $this->render('view', ['model' => $this->findModel($id)]);
 }
开发者ID:febfeb,项目名称:yii2-basic-ready,代码行数:13,代码来源:RoleController.php

示例2: actionIndex

 /**
  * Lists all Less models.
  * @return mixed
  */
 public function actionIndex()
 {
     $searchModel = new LessSearch();
     $dataProvider = $searchModel->search($_GET);
     Tabs::clearLocalStorage();
     Url::remember();
     \Yii::$app->session['__crudReturnUrl'] = null;
     return $this->render('index', ['dataProvider' => $dataProvider, 'searchModel' => $searchModel]);
 }
开发者ID:dmstr,项目名称:yii2-prototype-module,代码行数:13,代码来源:LessController.php

示例3: actionView

 /**
  * Displays a single ImageGallery model.
  * @param integer $id
  * @param null $returnUrl
  *
  * @return mixed
  */
 public function actionView($id, $returnUrl = null)
 {
     Tabs::rememberActiveTab(\Yii::$app->request->url, $this->id);
     if ($returnUrl === null) {
         $returnUrl = $this->module->id ? $this->module->id . '/' . $this->id . '/' . $this->action->id : $this->id . '/' . $this->action->id;
         $returnUrl = \Yii::$app->urlManager->createUrl([$returnUrl, 'id' => $id]);
     }
     Url::remember($returnUrl);
     return $this->render('view', ['model' => $this->findModel($id)]);
 }
开发者ID:dmstr,项目名称:yii2-news-module,代码行数:17,代码来源:ImageGalleryController.php

示例4: actionView

 /**
  * Displays a single Country model.
  * @param integer $country_id
  *
  * @return mixed
  */
 public function actionView($country_id)
 {
     $resolved = \Yii::$app->request->resolve();
     $resolved[1]['_pjax'] = null;
     $url = Url::to(array_merge(['/' . $resolved[0]], $resolved[1]));
     \Yii::$app->session['__crudReturnUrl'] = Url::previous();
     Url::remember($url);
     Tabs::rememberActiveState();
     return $this->render('view', ['model' => $this->findModel($country_id)]);
 }
开发者ID:schmunk42,项目名称:giiant-crud-examples,代码行数:16,代码来源:CountryController.php

示例5: actionView

 /**
  * Displays a single Subdistrict model.
  * @param integer $id
  *
  * @return mixed
  */
 public function actionView($id)
 {
     $model = $this->findModel($id);
     if ($model->operation->allowView == FALSE) {
         throw $model->operation->exception('view');
     }
     \Yii::$app->session['__crudReturnUrl'] = ReturnUrl::getUrl(Url::previous());
     Url::remember();
     Tabs::rememberActiveState();
     return $this->render('view', ['model' => $model]);
 }
开发者ID:fredyns,项目名称:yii2-boilerplate,代码行数:17,代码来源:SubdistrictController.php

示例6: actionView

 /**
  * Displays a single Table model.
  * @param integer $id
  *
  * @return mixed
  */
 public function actionView($id)
 {
     $table = $this->findModel($id);
     $searchModel = null;
     $dataProvider = null;
     if ($table->model_search_class != null) {
         $class = $table->model_search_class;
         $searchModel = new $class();
         $dataProvider = $searchModel->search($_GET);
     }
     \Yii::$app->session['__crudReturnUrl'] = Url::previous();
     Url::remember();
     Tabs::rememberActiveState();
     return $this->render('view', ['model' => $table, 'searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
 }
开发者ID:febfeb,项目名称:yii2-dynamic-field,代码行数:21,代码来源:TableController.php

示例7: actionView

 /**
  * Displays a single Budget model.
  * @param integer $id
  *
  * @return mixed
  */
 public function actionView($id)
 {
     $modelHistory = new BudgetHistory();
     $historySearch = new BudgetHistorySearch();
     $providerIncome = $historySearch->searchItems($id, BudgetItem::TYPE_INCOME, Yii::$app->request->queryParams);
     $providerCost = $historySearch->searchItems($id, BudgetItem::TYPE_COST, Yii::$app->request->queryParams);
     \Yii::$app->session['__crudReturnUrl'] = Url::previous();
     Url::remember();
     Tabs::rememberActiveState();
     try {
         if ($modelHistory->load($_POST) && $modelHistory->save()) {
             return $this->redirect(Url::previous());
         } elseif (!\Yii::$app->request->isPost) {
             $modelHistory->load($_GET);
         }
     } catch (\Exception $e) {
         $msg = isset($e->errorInfo[2]) ? $e->errorInfo[2] : $e->getMessage();
         $modelHistory->addError('_exception', $msg);
     }
     return $this->render('view', ['model' => $this->findModel($id), 'modelHistory' => $modelHistory, 'providerIncome' => $providerIncome, 'providerCost' => $providerCost]);
 }
开发者ID:alexus007,项目名称:budget,代码行数:27,代码来源:BudgetController.php

示例8:

        <div class="panel-body">



    <?php 
$this->beginBlock('common\\models\\UserProfile');
?>

    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['id', 'user_id', 'name', 'lastname', 'lesson_cost:url', 'currency_id', 'created_at', 'updated_ad']]);
?>

    <hr/>

    <?php 
echo Html::a('<span class="glyphicon glyphicon-trash"></span> ' . 'Delete', ['delete', 'id' => $model->id], ['class' => 'btn btn-danger', 'data-confirm' => '' . 'Are you sure to delete this item?' . '', 'data-method' => 'post']);
?>
    <?php 
$this->endBlock();
?>


    
    <?php 
echo Tabs::widget(['id' => 'relation-tabs', 'encodeLabels' => false, 'items' => [['label' => '<span class="glyphicon glyphicon-asterisk"></span> UserProfile', 'content' => $this->blocks['common\\models\\UserProfile'], 'active' => true]]]);
?>
        </div>
    </div>
</div>
开发者ID:RubenDjOn,项目名称:PrivateTeacher,代码行数:29,代码来源:view.php

示例9:

                <div class="form-group">
                    <label class="control-label col-sm-3" for="budgetitem-date">Планируемая дата</label>
                    <div class="col-sm-6">
                        <?php 
echo kartik\date\DatePicker::widget(['model' => $model, 'attribute' => 'date', 'pluginOptions' => ['format' => 'dd.mm.yyyy', 'class' => 'col-sm-6']]);
?>
                    </div>
                </div>


                <?php 
$this->endBlock();
?>

                <?php 
echo Tabs::widget(['encodeLabels' => false, 'items' => [['label' => Yii::t('app', 'Budget Item'), 'content' => $this->blocks['main'], 'active' => true]]]);
?>
                <hr/>
                <?php 
echo $form->errorSummary($model);
?>
                <?php 
echo Html::submitButton('<span class="glyphicon glyphicon-check"></span> ' . ($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Save')), ['id' => 'save-' . $model->formName(), 'class' => 'btn btn-success']);
?>

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

            </div>
开发者ID:alexus007,项目名称:budget,代码行数:30,代码来源:_form.php

示例10: count

?>
  <?php 
echo Html::a('<span class="glyphicon glyphicon-plus"></span> ' . 'New' . ' Payment', ['payment/create', 'Payment' => ['created_by' => $model->id]], ['class' => 'btn btn-success btn-xs']);
?>
</div></div><?php 
$this->endBlock();
?>


<?php 
$this->beginBlock('UserProfile');
?>
<div style='position: relative'><div style='position:absolute; right: 0px; top 0px;'>
  <?php 
echo Html::a('<span class="glyphicon glyphicon-list"></span> ' . 'List All' . ' User Profile', ['user-profile/index'], ['class' => 'btn text-muted btn-xs']);
?>
  <?php 
echo Html::a('<span class="glyphicon glyphicon-plus"></span> ' . 'New' . ' User Profile', ['user-profile/create', 'UserProfile' => ['user_id' => $model->id]], ['class' => 'btn btn-success btn-xs']);
?>
</div></div><?php 
$this->endBlock();
?>


    <?php 
echo Tabs::widget(['id' => 'relation-tabs', 'encodeLabels' => false, 'items' => [['label' => '<span class="glyphicon glyphicon-asterisk"></span> User', 'content' => $this->blocks['common\\models\\User'], 'active' => true], ['content' => $this->blocks['Students'], 'label' => '<small>Students <span class="badge badge-default">' . count($model->getStudents()->asArray()->all()) . '</span></small>', 'active' => false], ['content' => $this->blocks['Payments'], 'label' => '<small>Payments <span class="badge badge-default">' . count($model->getPayments()->asArray()->all()) . '</span></small>', 'active' => false], ['content' => $this->blocks['UserProfile'], 'label' => '<small>User Profile <span class="badge badge-default">' . count($model->getUserProfile()->asArray()->all()) . '</span></small>', 'active' => false]]]);
?>
        </div>
    </div>
</div>
开发者ID:RubenDjOn,项目名称:PrivateTeacher,代码行数:30,代码来源:view.php

示例11:

        </div>

    </div>


    <?php 
$this->beginBlock('common\\models\\location\\LocationCurrent');
?>

    
    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['id', ['format' => 'html', 'attribute' => 'user_id', 'value' => $model->getUser()->one() ? Html::a($model->getUser()->one()->id, ['user/view', 'id' => $model->getUser()->one()->id]) : '<span class="label label-warning">?</span>'], ['format' => 'html', 'attribute' => 'event_id', 'value' => $model->getEvent()->one() ? Html::a($model->getEvent()->one()->id, ['event/view', 'id' => $model->getEvent()->one()->id]) : '<span class="label label-warning">?</span>'], 'is_origin', 'title', 'latitude', 'longitude', 'occur_at', 'created_at']]);
?>

    
    <hr/>

    <?php 
echo Html::a('<span class="glyphicon glyphicon-trash"></span> ' . 'Delete', ['delete', 'id' => $model->id], ['class' => 'btn btn-danger', 'data-confirm' => '' . 'Are you sure to delete this item?' . '', 'data-method' => 'post']);
?>
    <?php 
$this->endBlock();
?>


    
    <?php 
echo Tabs::widget(['id' => 'relation-tabs', 'encodeLabels' => false, 'items' => [['label' => '<b class=""># ' . $model->id . '</b>', 'content' => $this->blocks['common\\models\\location\\LocationCurrent'], 'active' => true]]]);
?>
</div>
开发者ID:aixiaobenaixiaoben,项目名称:find,代码行数:30,代码来源:view.php

示例12: function

?>
</div></div><?php 
Pjax::begin(['id' => 'pjax-Films', 'enableReplaceState' => false, 'linkSelector' => '#pjax-Films 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->getFilmCategories(), 'pagination' => ['pageSize' => 20, 'pageParam' => 'page-filmcategories']]), 'pager' => ['class' => yii\widgets\LinkPager::className(), 'firstPageLabel' => Yii::t('app', 'First'), 'lastPageLabel' => Yii::t('app', 'Last')], 'columns' => [['class' => 'yii\\grid\\ActionColumn', 'template' => '{view} {delete}', '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] = 'film-category' . '/' . $action;
    return Url::toRoute($params);
}, 'buttons' => ['delete' => function ($url, $model) {
    return yii\helpers\Html::a('<span class="glyphicon glyphicon-remove"></span>', $url, ['class' => 'text-danger', 'title' => Yii::t('app', 'Remove'), 'data-confirm' => Yii::t('app', 'Are you sure you want to delete the related item?'), 'data-method' => 'post', 'data-pjax' => '0']);
}, 'view' => function ($url, $model) {
    return yii\helpers\Html::a('<span class="glyphicon glyphicon-cog"></span>', $url, ['data-title' => Yii::t('app', 'View Pivot Record'), 'data-toggle' => 'tooltip', 'data-pjax' => '0', 'class' => 'text-muted']);
}], 'controller' => 'film-category'], ["class" => yii\grid\DataColumn::className(), "attribute" => "film_id", "value" => function ($model) {
    if ($rel = $model->getFilm()->one()) {
        return yii\helpers\Html::a($rel->title, ["film/view", 'film_id' => $rel->film_id], ["data-pjax" => 0]);
    } else {
        return '';
    }
}, "format" => "raw"], 'last_update']]) . '</div>';
Pjax::end();
$this->endBlock();
?>


    <?php 
echo Tabs::widget(['id' => 'relation-tabs', 'encodeLabels' => false, 'items' => [['label' => '<span class="glyphicon glyphicon-asterisk"></span> Category', 'content' => $this->blocks['giiant\\sakila\\models\\Category'], 'active' => true], ['content' => $this->blocks['Films'], 'label' => '<small>Films <span class="badge badge-default">' . count($model->getFilms()->asArray()->all()) . '</span></small>', 'active' => false]]]);
?>
        </div>
    </div>
</div>
开发者ID:schmunk42,项目名称:giiant-crud-examples,代码行数:30,代码来源:view.php

示例13:

    <h3>
        <?php 
echo $model->actor_id;
?>
    </h3>


    <?php 
$this->beginBlock('app\\modules\\sakila\\models\\FilmActor');
?>

    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => [['format' => 'html', 'attribute' => 'actor_id', 'value' => $model->getActor()->one() ? Html::a($model->getActor()->one()->label, ['actor/view', 'actor_id' => $model->getActor()->one()->actor_id]) : '<span class="label label-warning">?</span>'], ['format' => 'html', 'attribute' => 'film_id', 'value' => $model->getFilm()->one() ? Html::a($model->getFilm()->one()->title, ['film/view', 'film_id' => $model->getFilm()->one()->film_id]) : '<span class="label label-warning">?</span>'], 'last_update']]);
?>

    <hr/>

    <?php 
echo Html::a('<span class="glyphicon glyphicon-trash"></span> ' . Yii::t('app', 'Delete'), ['delete', 'actor_id' => $model->actor_id, 'film_id' => $model->film_id], ['class' => 'btn btn-danger', 'data-confirm' => '' . Yii::t('app', 'Are you sure to delete this item?') . '', 'data-method' => 'post']);
?>
    <?php 
$this->endBlock();
?>


    
    <?php 
echo Tabs::widget(['id' => 'relation-tabs', 'encodeLabels' => false, 'items' => [['label' => '<span class="glyphicon glyphicon-asterisk"></span> FilmActor', 'content' => $this->blocks['app\\modules\\sakila\\models\\FilmActor'], 'active' => true]]]);
?>
</div>
开发者ID:shinkarenko,项目名称:playground,代码行数:30,代码来源:view.php

示例14: count

?>
  <?php 
echo Html::a('<span class="glyphicon glyphicon-plus"></span> ' . Yii::t('app', 'New') . ' Vidmage Category', ['vidmage-category/create', 'VidmageCategory' => ['vidmage_id' => $model->id]], ['class' => 'btn btn-success btn-xs']);
?>
</div></div><?php 
$this->endBlock();
?>


<?php 
$this->beginBlock('VidmageTags');
?>
<div style='position: relative'><div style='position:absolute; right: 0px; top 0px;'>
  <?php 
echo Html::a('<span class="glyphicon glyphicon-list"></span> ' . Yii::t('app', 'List All') . ' Vidmage Tags', ['vidmage-tag/index'], ['class' => 'btn text-muted btn-xs']);
?>
  <?php 
echo Html::a('<span class="glyphicon glyphicon-plus"></span> ' . Yii::t('app', 'New') . ' Vidmage Tag', ['vidmage-tag/create', 'VidmageTag' => ['vidmage_id' => $model->id]], ['class' => 'btn btn-success btn-xs']);
?>
</div></div><?php 
$this->endBlock();
?>


    <?php 
echo Tabs::widget(['id' => 'relation-tabs', 'encodeLabels' => false, 'items' => [['label' => '<b class=""># ' . $model->id . '</b>', 'content' => $this->blocks['common\\models\\Vidmage'], 'active' => true], ['content' => $this->blocks['MemeVidmages'], 'label' => '<small>Meme Vidmages <span class="badge badge-default">' . count($model->getMemeVidmages()->asArray()->all()) . '</span></small>', 'active' => false], ['content' => $this->blocks['VidmageAuthors'], 'label' => '<small>Vidmage Authors <span class="badge badge-default">' . count($model->getVidmageAuthors()->asArray()->all()) . '</span></small>', 'active' => false], ['content' => $this->blocks['VidmageCategories'], 'label' => '<small>Vidmage Categories <span class="badge badge-default">' . count($model->getVidmageCategories()->asArray()->all()) . '</span></small>', 'active' => false], ['content' => $this->blocks['VidmageTags'], 'label' => '<small>Vidmage Tags <span class="badge badge-default">' . count($model->getVidmageTags()->asArray()->all()) . '</span></small>', 'active' => false]]]);
?>
        </div>
    </div>
</div>
开发者ID:RubenDjOn,项目名称:originofthememes,代码行数:30,代码来源:view.php

示例15: function

?>


<?php 
$this->beginBlock('Files');
?>
<div style='position: relative'><div style='position:absolute; right: 0px; top: 0px;'>
  <?php 
echo Html::a('<span class="glyphicon glyphicon-list"></span> ' . Yii::t('app', 'List All') . ' Files', ['file/index'], ['class' => 'btn text-muted btn-xs']);
?>
  <?php 
echo Html::a('<span class="glyphicon glyphicon-plus"></span> ' . Yii::t('app', 'New') . ' File', ['file/create', 'File' => ['sensorid' => $model->id]], ['class' => 'btn btn-success btn-xs']);
?>
</div></div><?php 
Pjax::begin(['id' => 'pjax-Files', 'enableReplaceState' => false, 'linkSelector' => '#pjax-Files 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->getFiles(), 'pagination' => ['pageSize' => 20, 'pageParam' => 'page-files']]), 'pager' => ['class' => yii\widgets\LinkPager::className(), 'firstPageLabel' => Yii::t('app', 'First'), 'lastPageLabel' => Yii::t('app', '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] = 'file' . '/' . $action;
    return $params;
}, 'buttons' => [], 'controller' => 'file'], 'id', 'filelink', 'filename', 'extension', 'startdate', 'enddate', 'status']]) . '</div>';
Pjax::end();
$this->endBlock();
?>


    <?php 
echo Tabs::widget(['id' => 'relation-tabs', 'encodeLabels' => false, 'items' => [['label' => '<b class=""># ' . $model->id . '</b>', 'content' => $this->blocks['app\\models\\Sensor'], 'active' => true], ['content' => $this->blocks['Calibrations'], 'label' => '<small>Calibrations <span class="badge badge-default">' . count($model->getCalibrations()->asArray()->all()) . '</span></small>', 'active' => false], ['content' => $this->blocks['Files'], 'label' => '<small>Files <span class="badge badge-default">' . count($model->getFiles()->asArray()->all()) . '</span></small>', 'active' => false]]]);
?>
</div>
开发者ID:ICHydro,项目名称:anaconda,代码行数:30,代码来源:view.php


注:本文中的dmstr\bootstrap\Tabs类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。