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


PHP Tabs::widget方法代码示例

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


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

示例1: function

    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 
echo Tabs::widget(['id' => 'relation-tabs', 'encodeLabels' => false, 'items' => [['label' => '<b class=""># ' . $model->id . '</b>', 'content' => $this->blocks['RgnDistrict'], 'active' => true], ['content' => $this->blocks['RgnSubdistricts'], 'label' => '<small>Region Subdistricts <span class="badge badge-default">' . count($model->getRgnSubdistricts()->asArray()->all()) . '</span></small>', 'active' => false], ['content' => $this->blocks['RgnPostcodes'], 'label' => '<small>Region Postcodes <span class="badge badge-default">' . count($model->getRgnPostcodes()->asArray()->all()) . '</span></small>', 'active' => false]]]);
?>

			<hr/>
			<div id="map" style="margin-top: 50px;">

				<?php 
$address = "{$model->name}, " . ($model->city ? $model->city->name : "");
$title = $model->name;
?>
				<h3>Map</h3>

				<style>
					#map-canvas {
						width:100%;
						height:400px;
开发者ID:AlvaCorp,项目名称:yii2-boilerplate,代码行数:31,代码来源:view.php

示例2:

			<?php 
echo $form->field($model, 'Language')->textInput(['maxlength' => true]);
?>
			<?php 
echo $form->field($model, 'IsOfficial')->dropDownList(['T' => 'T', 'F' => 'F'], ['prompt' => '']);
?>
			<?php 
echo $form->field($model, 'Percentage')->textInput();
?>
                </p>
                <?php 
$this->endBlock();
?>
                
                <?php 
echo Tabs::widget(['encodeLabels' => false, 'items' => [['label' => 'CountryLanguage', 'content' => $this->blocks['main'], 'active' => true]]]);
?>
                <hr/>

                <?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>

        </div>
开发者ID:schmunk42,项目名称:giiant-crud-examples,代码行数:30,代码来源:_form.php

示例3:

    </div>

    <hr />

    <?php 
$this->beginBlock('dmstr\\modules\\prototype\\models\\Twig');
?>


    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['id', 'key', ['attribute' => 'value', 'format' => 'raw', 'value' => "<pre>{$model->value}</pre>"]]]);
?>


    <hr/>

    <?php 
echo Html::a('<span class="glyphicon glyphicon-trash"></span> ' . Yii::t('prototype', 'Delete'), ['delete', 'id' => $model->id], ['class' => 'btn btn-danger', 'data-confirm' => '' . Yii::t('prototype', '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['dmstr\\modules\\prototype\\models\\Twig'], 'active' => true]]]);
?>
</div>
开发者ID:dmstr,项目名称:yii2-prototype-module,代码行数:29,代码来源:view.php

示例4: function

echo Html::a('<span class="glyphicon glyphicon-list"></span> ' . Yii::t('app', 'List All') . ' Stores', ['store/index'], ['class' => 'btn text-muted btn-xs']);
?>
  <?php 
echo Html::a('<span class="glyphicon glyphicon-plus"></span> ' . Yii::t('app', 'New') . ' Store', ['store/create', 'Store' => ['address_id' => $model->address_id]], ['class' => 'btn btn-success btn-xs']);
?>
</div></div><?php 
Pjax::begin(['id' => 'pjax-Stores', 'enableReplaceState' => false, 'linkSelector' => '#pjax-Stores 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->getStores(), 'pagination' => ['pageSize' => 20, 'pageParam' => 'page-stores']]), '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] = 'store' . '/' . $action;
    return Url::toRoute($params);
}, 'buttons' => [], 'controller' => 'store'], 'store_id', ["class" => yii\grid\DataColumn::className(), "attribute" => "manager_staff_id", "value" => function ($model) {
    if ($rel = $model->getManagerStaff()->one()) {
        return yii\helpers\Html::a($rel->staff_id, ["staff/view", 'staff_id' => $rel->staff_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> Address', 'content' => $this->blocks['giiant\\sakila\\models\\Address'], 'active' => true], ['content' => $this->blocks['Customers'], 'label' => '<small>Customers <span class="badge badge-default">' . count($model->getCustomers()->asArray()->all()) . '</span></small>', 'active' => false], ['content' => $this->blocks['Staff'], 'label' => '<small>Staff <span class="badge badge-default">' . count($model->getStaff()->asArray()->all()) . '</span></small>', 'active' => false], ['content' => $this->blocks['Stores'], 'label' => '<small>Stores <span class="badge badge-default">' . count($model->getStores()->asArray()->all()) . '</span></small>', 'active' => false]]]);
?>
        </div>
    </div>
</div>
开发者ID:schmunk42,项目名称:giiant-crud-examples,代码行数:30,代码来源:view.php

示例5:

    <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

示例6:

        </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

示例7: 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

示例8: function

echo Html::a('<span class="glyphicon glyphicon-list"></span> ' . 'List All' . ' Role Menuses', ['role-menu/index'], ['class' => 'btn text-muted btn-xs']);
?>
  <?php 
echo Html::a('<span class="glyphicon glyphicon-plus"></span> ' . 'New' . ' Role Menus', ['role-menu/create', 'RoleMenus' => ['menu_id' => $model->id]], ['class' => 'btn btn-success btn-xs']);
?>
</div></div><?php 
Pjax::begin(['id' => 'pjax-RoleMenuses', 'enableReplaceState' => false, 'linkSelector' => '#pjax-RoleMenuses 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->getRoleMenuses(), 'pagination' => ['pageSize' => 20, 'pageParam' => 'page-rolemenuses']]), '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] = 'role-menu' . '/' . $action;
    return $params;
}, 'buttons' => [], 'controller' => 'role-menu'], 'id', ['class' => yii\grid\DataColumn::className(), 'attribute' => 'role_id', 'value' => function ($model) {
    if ($rel = $model->getRole()->one()) {
        return Html::a($rel->name, ['role/view', 'id' => $rel->id], ['data-pjax' => 0]);
    } else {
        return '';
    }
}, 'format' => 'raw']]]) . '</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\\Menu'], 'active' => true], ['content' => $this->blocks['Menuses'], 'label' => '<small>Menuses <span class="badge badge-default">' . count($model->getMenuses()->asArray()->all()) . '</span></small>', 'active' => false], ['content' => $this->blocks['RoleMenuses'], 'label' => '<small>Role Menuses <span class="badge badge-default">' . count($model->getRoleMenuses()->asArray()->all()) . '</span></small>', 'active' => false]]]);
?>
        </div>
    </div>
</div>
开发者ID:harryandriyan,项目名称:simkos,代码行数:30,代码来源:view.php

示例9: function

?>
</div></div><?php 
Pjax::begin(['id' => 'pjax-Rentals', 'enableReplaceState' => false, 'linkSelector' => '#pjax-Rentals 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->getRentals(), 'pagination' => ['pageSize' => 20, 'pageParam' => 'page-rentals']]), '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] = 'rental' . '/' . $action;
    return Url::toRoute($params);
}, 'buttons' => [], 'controller' => 'rental'], 'rental_id', 'rental_date', ["class" => yii\grid\DataColumn::className(), "attribute" => "inventory_id", "value" => function ($model) {
    if ($rel = $model->getInventory()->one()) {
        return yii\helpers\Html::a($rel->label, ["inventory/view", 'inventory_id' => $rel->inventory_id], ["data-pjax" => 0]);
    } else {
        return '';
    }
}, "format" => "raw"], 'return_date', ["class" => yii\grid\DataColumn::className(), "attribute" => "staff_id", "value" => function ($model) {
    if ($rel = $model->getStaff()->one()) {
        return yii\helpers\Html::a($rel->label, ["staff/view", 'staff_id' => $rel->staff_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> Customer', 'content' => $this->blocks['app\\modules\\sakila\\models\\Customer'], 'active' => true], ['label' => '<small><span class="glyphicon glyphicon-paperclip"></span> Payments</small>', 'content' => $this->blocks['Payments'], 'active' => false], ['label' => '<small><span class="glyphicon glyphicon-paperclip"></span> Rentals</small>', 'content' => $this->blocks['Rentals'], 'active' => false]]]);
?>
</div>
开发者ID:shinkarenko,项目名称:playground,代码行数:30,代码来源:view.php

示例10: 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

示例11:

                <p>
                    
			<?php 
echo $form->field($model, 'vidmage_id')->dropDownList(Vidmage::getMappedArray());
?>
			<?php 
echo $form->field($model, 'category_id')->dropDownList(Category::getMappedArray());
?>
                </p>
                <?php 
$this->endBlock();
?>
                
                <?php 
echo Tabs::widget(['encodeLabels' => false, 'items' => [['label' => 'VidmageCategory', '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:RubenDjOn,项目名称:originofthememes,代码行数:29,代码来源:_form.php

示例12:

					<?php 
echo $form->field($model, 'city_id')->widget(DepDrop::classname(), ['data' => [], 'type' => DepDrop::TYPE_SELECT2, 'select2Options' => ['pluginOptions' => ['multiple' => FALSE, 'allowClear' => TRUE, 'tags' => TRUE, 'maximumInputLength' => 255]], 'pluginOptions' => ['initialize' => TRUE, 'placeholder' => 'Select or type city', 'depends' => ['rgnsubdistrictform-province_id'], 'url' => Url::to(['/rgn-city/depdrop-options', 'selected' => $model->city_id]), 'loadingText' => 'Loading cities ...']]);
?>
					<?php 
echo $form->field($model, 'province_id')->widget(DepDrop::classname(), ['data' => [], 'type' => DepDrop::TYPE_SELECT2, 'select2Options' => ['pluginOptions' => ['multiple' => FALSE, 'allowClear' => TRUE, 'tags' => TRUE, 'maximumInputLength' => 255]], 'pluginOptions' => ['initialize' => TRUE, 'placeholder' => 'Select or type province', 'depends' => ['rgnsubdistrictform-country_id'], 'url' => Url::to(['/rgn-province/depdrop-options', 'selected' => $model->province_id]), 'loadingText' => 'Loading provinces ...']]);
?>
					<?php 
echo $form->field($model, 'country_id')->widget(Select2::classname(), ['data' => RgnCountry::asOption(), 'pluginOptions' => ['placeholder' => 'Select or type Country', 'multiple' => FALSE, 'allowClear' => TRUE, 'tags' => TRUE, 'maximumInputLength' => 255]]);
?>
                </p>
				<?php 
$this->endBlock();
?>

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

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

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

示例13:

        <div class="panel-body">



    <?php 
$this->beginBlock('app\\models\\base\\Kamarkos');
?>

    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['id', 'kamar', 'harga', ['attribute' => 'status', 'value' => app\models\base\Kamarkos::getStatusValueLabel($model->status)], 'tanggal_add', 'tanggal_update']]);
?>

    <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['app\\models\\base\\Kamarkos'], 'active' => true]]]);
?>
        </div>
    </div>
</div>
开发者ID:harryandriyan,项目名称:simkos,代码行数:29,代码来源:view.php

示例14:

        <div class="panel-body">



    <?php 
$this->beginBlock('giiant\\world\\models\\CountryLanguage');
?>

    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => [['format' => 'html', 'attribute' => 'CountryCode', 'value' => $model->getCountryCode()->one() ? Html::a($model->getCountryCode()->one()->Name, ['country/view', 'Code' => $model->getCountryCode()->one()->Code]) : '<span class="label label-warning">?</span>'], 'Language', 'IsOfficial', 'Percentage']]);
?>

    <hr/>

    <?php 
echo Html::a('<span class="glyphicon glyphicon-trash"></span> ' . Yii::t('app', 'Delete'), ['delete', 'CountryCode' => $model->CountryCode, 'Language' => $model->Language], ['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> CountryLanguage', 'content' => $this->blocks['giiant\\world\\models\\CountryLanguage'], 'active' => true]]]);
?>
        </div>
    </div>
</div>
开发者ID:schmunk42,项目名称:giiant-crud-examples,代码行数:29,代码来源:view.php

示例15:

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


    <?php 
$this->beginBlock('dmstr\\modules\\news\\models\\Video');
?>

    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['id', ['format' => 'html', 'attribute' => 'video_gallery_id', 'value' => $model->getVideoGallery()->one() ? Html::a($model->getVideoGallery()->one()->name, ['video-gallery/view', 'id' => $model->getVideoGallery()->one()->id]) : '<span class="label label-warning">?</span>'], 'title', 'youtube_url:url', 'published_at', 'created_at', 'updated_at']]);
?>

    <hr/>

    <?php 
echo Html::a('<span class="glyphicon glyphicon-trash"></span> ' . Yii::t('app', 'Delete'), ['delete', 'id' => $model->id, 'returnUrl' => $returnUrl], ['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> Video', 'content' => $this->blocks['dmstr\\modules\\news\\models\\Video'], 'active' => true]]]);
?>
</div>
开发者ID:dmstr,项目名称:yii2-news-module,代码行数:30,代码来源:view.php


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