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


PHP DetailView::widget方法代码示例

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


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

示例1:

use yii\helpers\Html;
use kartik\detail\DetailView;
/* @var $this yii\web\View */
/* @var $model app\models\User */
$this->title = $model->username;
$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Users'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="user-view">

    <h1><?php 
echo Html::encode($this->title);
?>
</h1>
    <div class="kv-panel-before">
        <p>
            <?php 
echo Html::a(Yii::t('app', 'Update'), ['update', 'id' => $model->id], ['class' => 'btn btn-primary']);
?>
            <?php 
echo Html::a('Delete', ['delete', 'id' => $model->id], ['class' => 'btn btn-danger', 'data' => ['confirm' => Yii::t('app', 'Are you sure you want to delete this item?'), 'method' => 'post']]);
?>
        </p>
    </div>
    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['id', 'username', 'lastname', 'firstname', 'email:email', 'token', 'auth_key', 'active', 'created_at', 'updated_at']]);
?>

</div>
开发者ID:hoangngk,项目名称:yii2basic,代码行数:29,代码来源:view.php

示例2: isset

<?php

use yii\helpers\ArrayHelper;
use yii\helpers\Html;
use kartik\detail\DetailView;
use common\models\Facility;
use common\models\Golfer;
use common\models\User;
use yii2mod\selectize\Selectize;
/* @var $this yii\web\View */
/* @var $model common\models\Golfer */
$this->title = $model->name;
$this->params['breadcrumbs'][] = ['label' => Yii::t('igolf', 'Golfers'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="golfer-view">

    <?php 
echo DetailView::widget(['model' => $model, 'panel' => ['heading' => '<h3>' . $model->name . '</h3>'], 'labelColOptions' => ['style' => 'width: 30%'], 'attributes' => ['name', 'email:email', 'phone', 'handicap', ['attribute' => 'gender', 'type' => DetailView::INPUT_RADIO_LIST, 'items' => ['' => Yii::t('igolf', 'Unspecified')] + Golfer::getLocalizedConstants('GENDER_')], ['attribute' => 'hand', 'type' => DetailView::INPUT_RADIO_LIST, 'items' => ['' => Yii::t('igolf', 'Unspecified')] + Golfer::getLocalizedConstants('HAND_')], 'homecourse', ['attribute' => 'facility_id', 'value' => isset($model->facility) ? $model->facility->name : '', 'type' => DetailView::INPUT_DROPDOWN_LIST, 'items' => ['' => 'Select home course...'] + ArrayHelper::map(Facility::find()->where(['>', 'id', 0])->asArray()->all(), 'id', 'name'), 'widgetOptions' => ['pluginOptions' => ['items' => ArrayHelper::map(Facility::find()->where(['>', 'id', 0])->asArray()->all(), 'id', 'name')]]], ['attribute' => 'user_id', 'label' => 'User', 'type' => DetailView::INPUT_DROPDOWN_LIST, 'items' => ArrayHelper::map(['' => ''] + User::find()->orderBy('username')->asArray()->all(), 'id', 'username'), 'value' => isset($model->user) ? $model->user->username : 'None']]]);
?>

</div>
开发者ID:kleitz,项目名称:golfleague,代码行数:22,代码来源:view.php

示例3: run

 /**
  * @inheritdoc
  * @throws \Exception
  */
 public function run()
 {
     if (!$this->_module->profileSettings['enabled']) {
         return;
     }
     echo DetailView::widget($this->widgetOptions);
 }
开发者ID:vladim1,项目名称:yii2-user,代码行数:11,代码来源:ProfileDetails.php

示例4: run

 /**
  * @inheritdoc
  */
 public function run()
 {
     if (Yii::$app->user->id != $this->model->id || !$this->_module->socialSettings['enabled']) {
         echo '';
         return;
     }
     echo DetailView::widget($this->widgetOptions);
 }
开发者ID:communityii,项目名称:yii2-user,代码行数:11,代码来源:SocialConnect.php

示例5: ActiveDataProvider

<?php

use yii\helpers\Html;
use kartik\detail\DetailView;
use yii\data\ActiveDataProvider;
/* @var $this yii\web\View */
/* @var $model common\models\Competition */
$this->title = $model->name;
$this->params['breadcrumbs'][] = ['label' => Yii::t('igolf', 'Competitions'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="competition-view">

    <?php 
echo DetailView::widget(['model' => $model, 'panel' => ['heading' => '<h3>' . Yii::t('igolf', $model->competition_type) . ' ' . $model->name . '</h3>', 'headingOptions' => ['template' => '{title}']], 'attributes' => ['description', ['attribute' => 'parent_id', 'value' => $model->parent ? $model->parent->name : ''], ['attribute' => 'course_id', 'value' => $model->course ? $model->course->name : ''], 'holes', ['attribute' => 'rule_id', 'value' => $model->rule ? $model->rule->name : ''], 'start_date', ['attribute' => 'status', 'label' => 'Status', 'value' => Yii::t('igolf', $model->status)], 'updated_at']]);
?>

	<?php 
echo $this->render('_scorecards', ['competition' => $model, 'dataProvider' => new ActiveDataProvider(['query' => $model->getScorecards()])]);
?>

</div>
开发者ID:kleitz,项目名称:golfleague,代码行数:22,代码来源:result.php

示例6: isset

Carbon::setLocale(substr(Yii::$app->language, 0, 2));
// eg. en-US to en
?>
<div class="theme-view box box-big box-light">

    <div class="pull-right" style="margin-top: -5px">
        <?php 
echo Html::a('<span class="glyphicon glyphicon-pencil"></span> ', ['update', 'id' => $themeModel->id], ['title' => Yii::t('app', 'Update Theme'), 'class' => 'btn btn-sm btn-info']);
?>
        <?php 
echo Html::a('<span class="glyphicon glyphicon-bin"></span> ', ['delete', 'id' => $themeModel->id], ['title' => Yii::t('app', 'Delete Theme'), 'class' => 'btn btn-sm btn-danger', 'data' => ['confirm' => Yii::t('app', 'Are you sure you want to delete this theme? All data related to this item will be deleted. This action cannot be undone.'), 'method' => 'post']]);
?>
    </div>

    <div class="box-header">
        <h3 class="box-title"><?php 
echo Yii::t('app', 'Theme');
?>
            <span class="box-subtitle"><?php 
echo Html::encode($this->title);
?>
</span>
        </h3>
    </div>

    <?php 
echo DetailView::widget(['model' => $themeModel, 'condensed' => false, 'hover' => true, 'mode' => DetailView::MODE_VIEW, 'enableEditMode' => false, 'hideIfEmpty' => true, 'options' => ['class' => 'kv-view-mode'], 'attributes' => ['id', 'name', 'description', ['attribute' => 'color', 'format' => 'raw', 'value' => "<span class='badge' style='background-color: {$themeModel->color}'>&nbsp;</span> <code>" . $themeModel->color . '</code>', 'type' => DetailView::INPUT_COLOR], ['attribute' => 'author', 'value' => $themeModel->author->username, 'label' => Yii::t('app', 'Created by')], ['attribute' => 'created_at', 'value' => isset($themeModel->created_at) ? Carbon::createFromTimestampUTC($themeModel->created_at)->diffForHumans() : null, 'label' => Yii::t('app', 'Created')], ['attribute' => 'lastEditor', 'value' => $themeModel->lastEditor->username, 'label' => Yii::t('app', 'Last Editor')], ['attribute' => 'updated_at', 'value' => isset($themeModel->updated_at) ? Carbon::createFromTimestampUTC($themeModel->updated_at)->diffForHumans() : null, 'label' => Yii::t('app', 'Last updated')]]]);
?>

</div>
开发者ID:ramialcheikh,项目名称:quickforms,代码行数:30,代码来源:view.php

示例7:

<?php

use yii\helpers\Html;
use yii\helpers\ArrayHelper;
// use yii\widgets\DetailView;
use kartik\detail\DetailView;
use kartik\grid\GridView;
/* @var $this yii\web\View */
/* @var $model app\models\Partner */
// Добавление моделей
use app\models\AppBankAccount;
use app\models\AppPatrnerType;
$this->title = $model->Name;
$this->params['breadcrumbs'][] = ['label' => 'Контрагенты', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
/*************************************************************************
 * Подготовка данных для представления в 
 ************************************************************************/
$attributes = [['group' => true, 'label' => 'Общая информация', 'rowOptions' => ['class' => 'info']], 'Name:ntext', 'FullName', ['group' => true, 'label' => 'Контактная информация', 'rowOptions' => ['class' => 'info']], 'MailAddress', 'ActualAddress', 'Phone', 'Fax', 'Email:email', ['group' => true, 'label' => 'Юридическая информация', 'rowOptions' => ['class' => 'info']], 'LegalAddress', ['columns' => [['attribute' => 'INN', 'valueColOptions' => ['style' => 'width:30%']], ['attribute' => 'KPP', 'valueColOptions' => ['style' => 'width:30%']]]], ['attribute' => 'ID_BankAccount', 'value' => $model->ID_BankAccount != null ? $model->iDBankAccount->Account : '', 'type' => DetailView::INPUT_SELECT2, 'widgetOptions' => ['data' => ArrayHelper::map(AppBankAccount::find()->all(), 'ID', 'Account', 'bank.Name')]], ['attribute' => 'ID_TypePatrner', 'value' => $model->ID_TypePatrner != null ? $model->iDTypePatrner->description : '', 'type' => DetailView::INPUT_SELECT2, 'widgetOptions' => ['data' => ArrayHelper::map(AppPatrnerType::find()->all(), 'ID', 'description')]]];
// View file rendering the widget
echo DetailView::widget(['model' => $model, 'condensed' => true, 'hover' => true, 'mode' => DetailView::MODE_VIEW, 'panel' => ['heading' => 'Клиент : ' . $model->FullName, 'type' => DetailView::TYPE_PRIMARY], 'attributes' => $attributes, 'deleteOptions' => ['url' => ['delete', 'id' => $model->ID], 'data' => ['confirm' => Yii::t('app', 'Are you sure you want to delete this record?'), 'method' => 'post']]]);
/*****************  Вывод грида по договорам   *************************/
echo Yii::$app->controller->renderPartial('viewcontractgrid', ['model' => $model]);
/*****************  Вывод грида по договорам   *************************/
?>
</div>
开发者ID:netscorpion,项目名称:CRM,代码行数:26,代码来源:view.php

示例8:

<?php

use yii\helpers\Html;
use kartik\detail\DetailView;
use kartik\datecontrol\DateControl;
/**
 * @var yii\web\View $this
 * @var common\models\Product $model
 */
$this->title = $model->title;
$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Products'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="product-view">
    <div class="page-header">
        <h1><?php 
echo Html::encode($this->title);
?>
</h1>
    </div>


    <?php 
echo DetailView::widget(['model' => $model, 'condensed' => false, 'hover' => true, 'mode' => Yii::$app->request->get('edit') == 't' ? DetailView::MODE_EDIT : DetailView::MODE_VIEW, 'panel' => ['heading' => $this->title, 'type' => DetailView::TYPE_INFO], 'attributes' => ['id', 'title', 'keywords', 'intro:ntext', 'body:ntext', 'icon_image', 'main_image', 'price_discount', 'price', 'results:ntext', 'group_services', 'orientation', 'tags', 'recommend:ntext', 'prepare:ntext', 'notes', 'organization_id', 'type_id'], 'deleteOptions' => ['url' => ['delete', 'id' => $model->id], 'data' => ['confirm' => Yii::t('app', 'Are you sure you want to delete this item?'), 'method' => 'post']], 'enableEditMode' => true]);
?>

</div>
开发者ID:kibercoder,项目名称:bilious-octo-fibula,代码行数:27,代码来源:view.php

示例9: is_null

echo is_null($educationDataProvider) ? 'No results found.' : ListView::widget(['dataProvider' => $educationDataProvider, 'itemView' => '_education_item', 'summary' => '', 'layout' => "{items}"]);
?>
        <?php 
Pjax::end();
?>

        <?php 
echo DetailView::widget(['model' => $educationModel, 'condensed' => true, 'hover' => true, 'mode' => DetailView::MODE_VIEW, 'hAlign' => DetailView::ALIGN_LEFT, 'vAlign' => DetailView::ALIGN_TOP, 'hideIfEmpty' => true, 'panel' => ['heading' => 'Add education', 'type' => DetailView::TYPE_INFO], 'buttons1' => '{update}', 'updateOptions' => ['label' => '<span class="glyphicon glyphicon-plus"></span>'], 'buttons2' => '{reset} {save}', 'attributes' => ['institute', 'degree', 'area', 'location', ['attribute' => 'start_date', 'type' => DetailView::INPUT_DATE, 'widgetOptions' => ['pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']]], ['attribute' => 'end_date', 'type' => DetailView::INPUT_DATE, 'widgetOptions' => ['pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']]]]]);
?>
    </div>

    <div class="page">
        <h3>Address</h3>
        <hr/>
        <?php 
Pjax::begin();
?>
        <?php 
echo is_null($addressDataProvider) ? 'No results found.' : ListView::widget(['dataProvider' => $addressDataProvider, 'itemView' => '_address_item', 'summary' => '', 'layout' => "{items}"]);
?>
        <?php 
Pjax::end();
?>

        <?php 
echo DetailView::widget(['model' => $addressModel, 'condensed' => true, 'hover' => true, 'mode' => DetailView::MODE_VIEW, 'hAlign' => DetailView::ALIGN_LEFT, 'vAlign' => DetailView::ALIGN_TOP, 'hideIfEmpty' => true, 'panel' => ['heading' => 'Add new address', 'type' => DetailView::TYPE_INFO], 'buttons1' => '{update}', 'updateOptions' => ['label' => '<span class="glyphicon glyphicon-plus"></span>'], 'buttons2' => '{reset} {save}', 'attributes' => ['address1', 'address2', 'landmark', 'city', 'state', 'country', 'pincode']]);
?>
    </div>

</div>
开发者ID:kapilbhadke,项目名称:ConnectMe,代码行数:30,代码来源:profile.php

示例10:

use common\widgets\Scorecard;
use kartik\detail\DetailView;
use yii\data\ActiveDataProvider;
use yii\helpers\Html;
use yii\helpers\Url;
/* @var $this yii\web\View */
/* @var $scorecard common\models\Scorecard */
$this->title = $scorecard->registration->golfer->name;
$this->params['breadcrumbs'][] = ['label' => Yii::t('igolf', 'Competitions'), 'url' => ['competition/index']];
$this->params['breadcrumbs'][] = ['label' => $scorecard->registration->competition->name, 'url' => ['competition', 'id' => $scorecard->registration->competition_id]];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="scorecard-view">

    <?php 
echo DetailView::widget(['model' => $scorecard->registration->competition, 'panel' => ['heading' => '<h3>' . $scorecard->registration->competition->getFullName() . ' <small>(' . Yii::t('igolf', $scorecard->registration->competition->competition_type) . ')</small></h3>', 'headingOptions' => ['template' => '{title}']], 'attributes' => ['description', ['attribute' => 'course_id', 'label' => 'Course', 'value' => $scorecard->registration->competition->course ? $scorecard->registration->competition->course->name : ''], 'holes', ['attribute' => 'rule_id', 'label' => 'Rules', 'value' => $scorecard->registration->competition->rule ? $scorecard->registration->competition->rule->name : ''], ['attribute' => 'status', 'label' => 'Scorecard Status', 'value' => Yii::t('igolf', $scorecard->status)]]]);
?>

    <?php 
echo Scorecard::widget(['scorecard' => $scorecard, 'options' => [Scorecard::LENGTH => true, Scorecard::SI => true, Scorecard::PAR => true, Scorecard::HOLES => true, Scorecard::FRONTBACK => true, Scorecard::COLOR => true, Scorecard::LEGEND => true, Scorecard::ALLOWED => true, Scorecard::ALLOWED_ICON => '•', Scorecard::SCORE => true, Scorecard::SCORE_NET => true, Scorecard::STABLEFORD => true, Scorecard::STABLEFORD_NET => true, Scorecard::TO_PAR => true, Scorecard::TO_PAR_NET => true]]);
?>

	<?php 
if (!in_array($scorecard->competition->status, [Competition::STATUS_COMPLETED, Competition::STATUS_CLOSED])) {
    ?>
		<div class="clearfix"></div>
		<?php 
    echo Html::a(Yii::t('igolf', 'Update'), Url::to(['update', 'id' => $scorecard->id]), ['class' => 'btn btn-primary']);
    ?>
	<?php 
}
开发者ID:kleitz,项目名称:golfleague,代码行数:31,代码来源:view.php

示例11:

?>
<div class="container">

    <div class="row">
        <div class="col-md-12 text-center">
            <h1><?php 
echo Html::encode($this->title);
?>
</h1>
        </div>
    </div>

    <div class="row">
        <div class="col-md-offset-5 col-md-2 text-center">
            <?php 
echo Html::a('Изменить', ['update'], ['class' => 'btn btn-primary']);
?>
        </div>
    </div>
    </br>

    <div class="row">
        <div class="col-md-6 col-md-offset-3">
            <?php 
echo DetailView::widget(['model' => $model, 'condensed' => true, 'hover' => true, 'panel' => ['heading' => $model->username, 'headingOptions' => ['class' => 'text-center', 'template' => '{title}']], 'mode' => DetailView::MODE_VIEW, 'attributes' => ['username', 'email', 'name', 'surname', 'gender', 'age', 'role']]);
?>
        </div>
    </div>

</div>
开发者ID:fosker,项目名称:sim,代码行数:30,代码来源:index.php

示例12: isset

<?php

use yii\helpers\Html;
use kartik\detail\DetailView;
use kartik\datecontrol\DateControl;
/**
 * @var yii\web\View $this
 * @var app\models\KartikCrud $model
 */
$this->title = $model->id;
$this->params['breadcrumbs'][] = ['label' => 'Kartik Cruds', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="kartik-crud-view">
    <div class="page-header">
        <h1><?php 
echo Html::encode($this->title);
?>
</h1>
    </div>


    <?php 
echo DetailView::widget(['model' => $model, 'condensed' => false, 'hover' => true, 'mode' => Yii::$app->request->get('edit') == 't' ? DetailView::MODE_EDIT : DetailView::MODE_VIEW, 'panel' => ['heading' => $this->title, 'type' => DetailView::TYPE_INFO], 'attributes' => ['id', 'thought', 'goodness', 'rank', 'censorship', ['attribute' => 'occurred', 'format' => ['date', isset(Yii::$app->modules['datecontrol']['displaySettings']['date']) ? Yii::$app->modules['datecontrol']['displaySettings']['date'] : 'd-m-Y'], 'type' => DetailView::INPUT_WIDGET, 'widgetOptions' => ['class' => DateControl::classname(), 'type' => DateControl::FORMAT_DATE]], 'email:email', 'url:url', 'filename', 'avatar'], 'deleteOptions' => ['url' => ['delete', 'id' => $model->id], 'data' => ['confirm' => Yii::t('app', 'Are you sure you want to delete this item?'), 'method' => 'post']], 'enableEditMode' => true]);
?>

</div>
开发者ID:AntoninSlejska,项目名称:yii-test,代码行数:27,代码来源:view.php

示例13:

use yii\widgets\ActiveForm;
use kartik\widgets\DepDrop;
use lukisongroup\master\models\barangalias;
use lukisongroup\master\models\Distributor;
use yii\helpers\Url;
use kartik\widgets\Select2;
use kartik\detail\DetailView;
/* @var $this yii\web\View */
/* @var $model lukisongroup\master\models\Customersalias */
/* @var $form yii\widgets\ActiveForm */
/*Customers alias info*/
$cusviewinfo = DetailView::widget(['model' => $model, 'attributes' => [['attribute' => 'KD_CUSTOMERS', 'label' => 'Kd Customer', 'labelColOptions' => ['style' => 'text-align:right;width: 30%']], ['attribute' => 'custnm', 'label' => 'Customer.NM', 'labelColOptions' => ['style' => 'text-align:right;width: 30%']], ['attribute' => 'custpnma', 'label' => 'Customers.parent', 'labelColOptions' => ['style' => 'text-align:right;width: 30%']], ['attribute' => 'disnm', 'label' => 'Nama Distributor', 'labelColOptions' => ['style' => 'text-align:right;width: 30%']], ['attribute' => 'KD_ALIAS', 'label' => 'Alias Code :', 'labelColOptions' => ['style' => 'text-align:right;width: 30%']]]]);
/*update customers alias*/
$attalias = [['group' => true, 'label' => false, 'rowOptions' => ['class' => 'info'], 'groupOptions' => ['class' => 'text-left']], ['attribute' => 'KD_PARENT', 'format' => 'raw', 'value' => $model->cusp->CUST_NM, 'type' => DetailView::INPUT_SELECT2, 'widgetOptions' => ['data' => $cus_data, 'options' => ['placeholder' => 'Select ...'], 'pluginOptions' => ['allowClear' => true]]], ['attribute' => 'KD_CUSTOMERS', 'format' => 'raw', 'value' => $model->cus->CUST_NM, 'type' => DetailView::INPUT_DEPDROP, 'widgetOptions' => ['options' => ['id' => 'customers-city_id', 'placeholder' => 'Select Kota'], 'type' => DepDrop::TYPE_SELECT2, 'select2Options' => ['pluginOptions' => ['allowClear' => true]], 'pluginOptions' => ['depends' => ['customersalias-kd_parent'], 'url' => Url::to(['/master/customers/lis-child-cus']), 'loadingText' => 'Loading data ...']]], ['attribute' => 'KD_DISTRIBUTOR', 'format' => 'raw', 'value' => $model->dis->NM_DISTRIBUTOR, 'type' => DetailView::INPUT_SELECT2, 'widgetOptions' => ['data' => $cus_dis, 'options' => ['placeholder' => 'Select ...'], 'pluginOptions' => ['allowClear' => true]]], ['attribute' => 'KD_ALIAS', 'label' => 'alias code', 'type' => DetailView::INPUT_TEXT, 'labelColOptions' => ['style' => 'text-align:right;width: 15px']]];
/* Customers alias View Editing*/
$alias = DetailView::widget(['id' => $model->formName(), 'model' => $model, 'attributes' => $attalias, 'condensed' => true, 'hover' => true, 'mode' => DetailView::MODE_VIEW, 'buttons1' => '{update}', 'buttons2' => '{view}{save}', 'panel' => ['heading' => '<div style="float:left;margin-right:10px" class="fa fa-1x fa-list-alt"></div><div><h6 class="modal-title"><b>Alias Customers</b></h6></div>', 'type' => DetailView::TYPE_INFO], 'formOptions' => ['id' => $model->formName(), 'enableAjaxValidation' => true, 'enableClientValidation' => true, 'validationUrl' => Url::toRoute('/master/customers/valid-alias-update')]]);
?>


<div style="height:100%;font-family: verdana, arial, sans-serif ;font-size: 8pt">
  <div class="row" >
    <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
      <?php 
echo $cusviewinfo;
?>
 
    </div>
    <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
    <?php 
echo $alias;
?>
开发者ID:adem-team,项目名称:advanced,代码行数:31,代码来源:alias_customers.php

示例14: strtoupper

/* @var $this yii\web\View */
/* @var $model app\models\Cuentas */
$this->title = strtoupper($model->idEmpresa->nombre);
$this->params['breadcrumbs'][] = ['label' => 'Cuentas', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="cuentas-view">

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

    <p>
        <?php 
echo Html::a('Update', ['update', 'id' => $model->id_cuenta], ['class' => 'btn btn-lg btn-primary']);
?>
        <?php 
echo Html::a('PDF', ['pdf', 'id' => $model->id_cuenta], ['class' => 'btn btn-lg btn-success']);
?>
        <?php 
echo Html::a('Delete', ['delete', 'id' => $model->id_cuenta], ['class' => 'btn btn-danger btn-lg', 'data' => ['confirm' => 'Esta seguro de eliminar este item?', 'method' => 'post']]);
?>
    </p>

    <?php 
echo DetailView::widget(['model' => $model, 'valueColOptions' => ['style' => 'text-transform: uppercase'], 'condensed' => true, 'hover' => true, 'mode' => DetailView::MODE_VIEW, 'panel' => ['heading' => 'Cuenta de cobro # ' . $model->id_cuenta, 'type' => DetailView::TYPE_INFO], 'attributes' => [['attribute' => 'id_empresa', 'value' => strtoupper($model->idEmpresa->nombre), 'label' => 'Usuario'], ['attribute' => 'id_tercero', 'value' => strtoupper($model->idTercero->nombre), 'label' => 'Tercero'], 'fecha', 'valor', 'detalle']]);
?>

</div>
开发者ID:jmcaro,项目名称:sigerapp,代码行数:30,代码来源:view.php

示例15: isset

?>
<div class="golfer-profile-index">

	<div class="row">
		<div class="col-lg-8">
			<?php 
if (!$model) {
    ?>
				<div class="alert alert-info">
					Your are not registered as a golfer.
				</div>
			<?php 
} else {
    ?>
    <?php 
    echo DetailView::widget(['model' => $model, 'panel' => ['heading' => '<h3>' . Html::encode($this->title) . '</h3>'], 'labelColOptions' => ['style' => 'width: 30%'], 'formOptions' => ['action' => Url::to(['view', 'id' => $model->id])], 'attributes' => ['name', 'email:email', 'phone', 'handicap', ['attribute' => 'gender', 'type' => DetailView::INPUT_RADIO_LIST, 'items' => ['' => Yii::t('igolf', 'Unspecified')] + Golfer::getLocalizedConstants('GENDER_')], ['attribute' => 'hand', 'type' => DetailView::INPUT_RADIO_LIST, 'items' => ['' => Yii::t('igolf', 'Unspecified')] + Golfer::getLocalizedConstants('HAND_')], ['label' => Yii::t('igolf', 'Home Course'), 'attribute' => 'facility_id', 'value' => isset($model->facility) ? $model->facility->name : '', 'type' => DetailView::INPUT_DROPDOWN_LIST, 'items' => ['' => 'Select home course...'] + ArrayHelper::map(Facility::find()->where(['>', 'id', 0])->asArray()->all(), 'id', 'name'), 'widgetOptions' => ['pluginOptions' => ['items' => ArrayHelper::map(Facility::find()->where(['>', 'id', 0])->asArray()->all(), 'id', 'name')]]]]]);
    ?>

			<?php 
}
?>
		</div>
		
		<div class="col-lg-4">
		    <h3><?php 
echo Yii::t('goflleague', 'Menu');
?>
</h3>

		    <h3><?php 
echo Yii::t('goflleague', 'Enter score');
开发者ID:kleitz,项目名称:golfleague,代码行数:31,代码来源:index.php


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