本文整理汇总了PHP中GxHtml类的典型用法代码示例。如果您正苦于以下问题:PHP GxHtml类的具体用法?PHP GxHtml怎么用?PHP GxHtml使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了GxHtml类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getMultiModelForm
public function getMultiModelForm()
{
$criteria = new CDbCriteria();
$criteria->order = 'nombre ASC';
$memberFormConfig = array('elements' => array('id_detalle_reparacion' => array('type' => 'dropdownlist', 'items' => array('' => '---') + GxHtml::listDataEx(DetalleReparacion::model()->findAllAttributes(null, true, $criteria))), 'id_marca' => array('type' => 'dropdownlist', 'items' => array('' => '---') + GxHtml::listDataEx(MarcasRepuestos::model()->findAllAttributes(null, true))), 'precio_unitario' => array('type' => 'text', 'maxlength' => 11, 'size' => 12, 'onblur' => 'subtotal()', 'onkeypress' => 'if (event.keyCode == 13){subtotal()};'), 'cantidad' => array('type' => 'text', 'maxlength' => 7, 'size' => 7, 'onblur' => 'subtotal();', 'onkeypress' => 'if (event.keyCode == 13){subtotal()};'), 'subtotal' => array('type' => 'text', 'maxlength' => 11, 'size' => 11), 'observacion' => array('type' => 'textarea', 'cols' => 15, 'row' => 3)));
return $memberFormConfig;
}
示例2: getMultiModelForm
public function getMultiModelForm()
{
$criteria = new CDbCriteria();
$criteria->order = 'patente ASC';
$detfactcomb = array('elements' => array('id_vehiculo' => array('type' => 'dropdownlist', 'items' => array('' => '---') + GxHtml::listDataEx(Vehiculos::model()->findAllAttributes(null, true, $criteria))), 'nro_guia' => array('type' => 'text'), 'litros' => array('type' => 'text', 'onblur' => 'totallitros(),calcularTotal();', 'onkeypress' => 'if (event.keyCode == 13){totallitros(),calcularTotal()};')));
return $detfactcomb;
}
示例3: related_opts
/**
* Returns options for the related model multiple select
* @param string $model
* @return string options for relate model multiple select
* @since 1.0
*/
public function related_opts($model)
{
$relatedPKs = Student::extractPkValue($model->students);
$options = '';
$products = GxHtml::listDataEx(Student::model()->findAllAttributes(null, true));
foreach ($products as $value => $text) {
if (!$model->isNewRecord) {
in_array($value, $relatedPKs) ? $options .= '<option selected="selected" value=' . $value . '>' . $text . '</option>\\n' : ($options .= '<option value=' . $value . '>' . $text . '</option>\\n');
} else {
$options .= '<option value=' . $value . '>' . $text . '</option>\\n';
}
}
echo $options;
}
示例4:
echo $form->textArea($model, 'slogan_en');
?>
<?php
echo $form->error($model, 'slogan_en');
?>
</div><!-- row -->
<div class="row">
<?php
echo $form->labelEx($model, 'slogan_ar');
?>
<?php
echo $form->textArea($model, 'slogan_ar');
?>
<?php
echo $form->error($model, 'slogan_ar');
?>
</div><!-- row -->
<label><?php
echo GxHtml::encode($model->getRelationLabel('distributions'));
?>
</label>
<?php
echo $form->checkBoxList($model, 'distributions', GxHtml::encodeEx(GxHtml::listDataEx(Distribution::model()->findAllAttributes(null, true)), false, true));
?>
<?php
echo GxHtml::submitButton(Yii::t('app', 'Save'));
$this->endWidget();
?>
</div><!-- form -->
示例5: array
<?php
$this->breadcrumbs = array($model->label(2) => array('index'), Yii::t('app', 'Manage'));
Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\t\$('.search-form').toggle();\n\treturn false;\n});\n\$('.search-form form').submit(function(){\n\t\$.fn.yiiGridView.update('user-grid', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n");
$this->menu = array(array('label' => Yii::t('app', 'Manage') . ' ' . $model->label(2), 'url' => array('admin')));
$this->beginWidget('zii.widgets.CPortlet', array('htmlOptions' => array('class' => '')));
$this->widget('bootstrap.widgets.TbMenu', array('type' => 'pills', 'items' => array(array('label' => 'Create', 'icon' => 'icon-plus', 'url' => Yii::app()->controller->createUrl('createAdmin'), 'linkOptions' => array()), array('label' => 'List', 'icon' => 'icon-th-list', 'url' => Yii::app()->controller->createUrl('index'), 'linkOptions' => array()), array('label' => 'Manage', 'icon' => 'icon-search', 'url' => Yii::app()->controller->createUrl('admin'), 'active' => true, 'linkOptions' => array('class' => 'search-button')), array('label' => 'Export to PDF', 'icon' => 'icon-download', 'url' => Yii::app()->controller->createUrl('GeneratePdf'), 'linkOptions' => array('target' => '_blank'), 'visible' => true), array('label' => 'Export to Excel', 'icon' => 'icon-download', 'url' => Yii::app()->controller->createUrl('GenerateExcel'), 'linkOptions' => array('target' => '_blank'), 'visible' => true))));
$this->endWidget();
?>
<h3><?php
echo Yii::t('app', 'Manage') . ' ' . GxHtml::encode($model->label(2));
?>
</h3>
<?php
echo GxHtml::link(Yii::t('app', 'Advanced Search'), '#', array('class' => 'search-button'));
?>
<div class="search-form" style='display:none'>
<?php
$this->renderPartial('_search', array('model' => $model));
?>
</div><!-- search-form -->
<?php
$this->widget('zii.widgets.grid.CGridView', array('id' => 'user-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'columns' => array('id', 'username', 'status', array('class' => 'CButtonColumn'))));
示例6: array
//'htmlOptions' => array(
// 'style' => 'overflow-y:auto;'
// .'table-layout:fixed;'
// .'white-space:nowrap;'
// ),
'columns' => array(
array(
'name' => 'id',
//'header'=>'id',
//'value' => '($model->id',
//'htmlOptions'=>array('style'=>'min-width: 50px; max-width: 100px; white-space:nowrap;'),
),
array(
'name'=>'categoria_id',
'value'=>'GxHtml::valueEx($data->categoria)',
'filter'=>GxHtml::listDataEx(Categoria::model()->findAllAttributes(null, true)),
//'htmlOptions'=>array('style'=>'min-width: 50px; max-width: 100px; white-space:nowrap;'),
),
array(
'name' => 'nombre',
//'header'=>'nombre',
//'value' => '($model->nombre',
//'htmlOptions'=>array('style'=>'min-width: 50px; max-width: 100px; white-space:nowrap;'),
),
array(
'name' => 'descripcion',
//'header'=>'descripcion',
//'value' => '($model->descripcion',
//'htmlOptions'=>array('style'=>'min-width: 50px; max-width: 100px; white-space:nowrap;'),
),
array(
示例7: array
<?php
$this->breadcrumbs = array($model->label(2) => array('index'), GxHtml::valueEx($model));
$this->menu = array(array('label' => Yii::t('app', 'List') . ' ' . $model->label(2), 'url' => array('index')), array('label' => Yii::t('app', 'Create') . ' ' . $model->label(), 'url' => array('create')), array('label' => Yii::t('app', 'Update') . ' ' . $model->label(), 'url' => array('update', 'id' => $model->id)), array('label' => Yii::t('app', 'Delete') . ' ' . $model->label(), 'url' => '#', 'linkOptions' => array('submit' => array('delete', 'id' => $model->id), 'confirm' => 'Are you sure you want to delete this item?')), array('label' => Yii::t('app', 'Manage') . ' ' . $model->label(2), 'url' => array('admin')));
?>
<h1><?php
echo Yii::t('app', 'View') . ' ' . GxHtml::encode($model->label()) . ' ' . GxHtml::encode(GxHtml::valueEx($model));
?>
</h1>
<?php
$this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => array('id', 'name', 'email', 'tel', 'birthday', array('name' => 'class', 'type' => 'raw', 'value' => $model->class !== null ? GxHtml::link(GxHtml::encode(GxHtml::valueEx($model->class)), array('classGuitar/view', 'id' => GxActiveRecord::extractPkValue($model->class, true))) : null), 'user_id', 'comment')));
?>
示例8: array
<?php
$this->breadcrumbs = array('Pah Sub Aktivitases' => array('index'), GxHtml::valueEx($model) => array('view', 'id' => GxActiveRecord::extractPkValue($model, true)), Yii::t('app', 'Update'));
$this->menu = array(array('label' => Yii::t('app', 'List') . ' PahSubAktivitas', 'url' => array('index')), array('label' => Yii::t('app', 'Create') . ' PahSubAktivitas', 'url' => array('create')), array('label' => Yii::t('app', 'View') . ' PahSubAktivitas', 'url' => array('view', 'id' => GxActiveRecord::extractPkValue($model, true))));
?>
<h1><?php
echo Yii::t('app', 'Update');
?>
PahSubAktivitas #<?php
echo GxHtml::encode(GxHtml::valueEx($model));
?>
</h1>
<?php
$this->renderPartial('_form', array('model' => $model));
示例9: array
<div class="span-8 last">
<?php
echo $form->label($model, 'pah_bank_accounts_id');
?>
<?php
echo $form->dropDownList($model, 'pah_bank_accounts_id', GxHtml::listDataEx(PahBankAccounts::model()->findAllAttributes(null, true)), array('prompt' => Yii::t('app', 'All')));
?>
</div>
<div class="span-8 last">
<?php
echo $form->label($model, 'users_id');
?>
<?php
echo $form->dropDownList($model, 'users_id', GxHtml::listDataEx(Users::model()->findAllAttributes(null, true)), array('prompt' => Yii::t('app', 'All')));
?>
</div>
<div class="row buttons">
<?php
echo GxHtml::submitButton(Yii::t('app', 'Search'));
?>
</div>
<?php
$this->endWidget();
?>
</div><!-- search-form -->
示例10: array
?>
</div><!-- row -->
<div class="row">
<?php
echo $form->labelEx($model, 'total');
?>
<?php
echo $form->textField($model, 'total');
?>
<?php
echo $form->error($model, 'total');
?>
</div><!-- row -->
<div class="row">
<?php
echo $form->labelEx($model, 'estado');
?>
<?php
echo $form->textField($model, 'estado', array('maxlength' => 45));
?>
<?php
echo $form->error($model, 'estado');
?>
</div><!-- row -->
<?php
echo GxHtml::submitButton(Yii::t('app', 'Save'), array('onClick' => "this.disabled=true;this.value='" . Yii::t('app', 'Enviando') . "';this.form.submit();"));
$this->endWidget();
?>
</div><!-- form -->
示例11: array
<?php
$this->breadcrumbs = array($model->label(2) => array('index'), Yii::t('app', 'Manage'));
$this->menu = array(array('label' => Yii::t('app', 'List') . ' ' . $model->label(2), 'url' => array('index')), array('label' => Yii::t('app', 'Create') . ' ' . $model->label(), 'url' => array('create')));
Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\t\$('.search-form').toggle();\n\treturn false;\n});\n\$('.search-form form').submit(function(){\n\t\$.fn.yiiGridView.update('district-grid', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n");
?>
<h1><?php
echo Yii::t('app', 'Manage') . ' ' . GxHtml::encode($model->label(2));
?>
</h1>
<p>
You may optionally enter a comparison operator (<, <=, >, >=, <> or =) at the beginning of each of your search values to specify how the comparison should be done.
</p>
<?php
echo GxHtml::link(Yii::t('app', 'Advanced Search'), '#', array('class' => 'search-button'));
?>
<div class="search-form">
<?php
$this->renderPartial('_search', array('model' => $model));
?>
</div><!-- search-form -->
<?php
$this->widget('zii.widgets.grid.CGridView', array('id' => 'district-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'columns' => array('id', 'code', 'ar_name', 'en_name', array('name' => 'governerate_id', 'value' => 'GxHtml::valueEx($data->governerate)', 'filter' => GxHtml::listDataEx(Governorate::model()->findAllAttributes(null, true))), array('class' => 'CButtonColumn'))));
示例12: array
<?php
echo GxHtml::link(GxHtml::encode($data->id), array('view', 'id' => $data->id));
?>
<br />
<?php
echo GxHtml::encode($data->getAttributeLabel('idclient'));
?>
:
<?php
echo GxHtml::encode(GxHtml::valueEx($data->idclient0));
?>
<br />
<?php
echo GxHtml::encode($data->getAttributeLabel('datepaiement'));
?>
:
<?php
echo GxHtml::encode($data->datepaiement);
?>
<br />
<?php
echo GxHtml::encode($data->getAttributeLabel('vouchernumber'));
?>
:
<?php
echo GxHtml::encode($data->vouchernumber);
?>
<br />
</div>
示例13: array
<?php
$this->breadcrumbs = array('Pe Kas Keluars' => array('index'), GxHtml::valueEx($model));
$this->menu = array(array('label' => Yii::t('app', 'List') . ' PeKasKeluar', 'url' => array('index')), array('label' => Yii::t('app', 'Create') . ' PeKasKeluar', 'url' => array('create')), array('label' => Yii::t('app', 'Update') . ' PeKasKeluar', 'url' => array('update', 'id' => $model->kas_keluar_id)), array('label' => Yii::t('app', 'Delete') . ' PeKasKeluar', 'url' => '#', 'linkOptions' => array('submit' => array('delete', 'id' => $model->kas_keluar_id), 'confirm' => 'Are you sure you want to delete this item?')));
?>
<h1><?php
echo Yii::t('app', 'View');
?>
PeKasKeluar #<?php
echo GxHtml::encode(GxHtml::valueEx($model));
?>
</h1>
<?php
$this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => array('kas_keluar_id', 'doc_ref', 'no_bukti', 'amount', 'entry_time', 'trans_date', 'trans_via', array('label' => 'PeSuppliers', 'type' => 'raw', 'value' => GxHtml::link(GxHtml::encode(GxHtml::valueEx($model->peSupplier)), array('peSuppliers/view', 'id' => GxActiveRecord::extractPkValue($model->peSupplier, true)))), array('label' => 'PeChartMaster', 'type' => 'raw', 'value' => GxHtml::link(GxHtml::encode(GxHtml::valueEx($model->peAccountCode)), array('peChartMaster/view', 'id' => GxActiveRecord::extractPkValue($model->peAccountCode, true)))), array('label' => 'PeBankAccounts', 'type' => 'raw', 'value' => GxHtml::link(GxHtml::encode(GxHtml::valueEx($model->peBankAccounts)), array('peBankAccounts/view', 'id' => GxActiveRecord::extractPkValue($model->peBankAccounts, true)))), array('label' => 'Users', 'type' => 'raw', 'value' => GxHtml::link(GxHtml::encode(GxHtml::valueEx($model->users)), array('users/view', 'id' => GxActiveRecord::extractPkValue($model->users, true))))), 'itemTemplate' => "<tr class=\"{class}\"><td style=\"width: 120px\"><b>{label}</b></td><td>{value}</td></tr>\n", 'htmlOptions' => array('class' => 'table')));
?>
示例14: checkBoxList
/**
* Renders a checkbox list for a model attribute.
* This method is a wrapper of {@link GxHtml::activeCheckBoxList}.
* #MethodTracker
* This method is based on {@link CActiveForm::checkBoxList}, from version 1.1.7 (r3135). Changes:
* <ul>
* <li>Uses GxHtml.</li>
* </ul>
* @see CActiveForm::checkBoxList
* @param CModel $model The data model.
* @param string $attribute The attribute.
* @param array $data Value-label pairs used to generate the check box list.
* @param array $htmlOptions Addtional HTML options.
* @return string The generated check box list.
*/
public function checkBoxList($model, $attribute, $data, $htmlOptions = array())
{
return GxHtml::activeCheckBoxList($model, $attribute, $data, $htmlOptions);
}
示例15: array
/* @var $this AntraegeController */
/* @var $model Antrag */
$this->breadcrumbs = array(Yii::t('app', 'Administration') => $this->createUrl('/admin/index'), $model->label(2) => array('index'), "Durchsuchen");
$this->menu = array(array('label' => $model->label(2), 'url' => array('index'), "icon" => "home"));
Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\t\$('.search-form').toggle();\n\treturn false;\n});\n\$('.search-form form').submit(function(){\n\t\$.fn.yiiGridView.update('antrag-grid', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n");
?>
<h1><?php
echo GxHtml::encode($model->label(2)) . ' ' . Yii::t('app', 'Manage');
?>
</h1>
<p>
<?php
Yii::t('app', 'You may optionally enter a comparison operator (<, <=, >, >=, <> or =) at the beginning of each of your search values to specify how the comparison should be done.');
?>
</p>
<?php
echo GxHtml::link(Yii::t('app', 'Advanced Search'), '#', array('class' => 'search-button'));
?>
<div class="search-form">
<?php
$this->renderPartial('_search', array('model' => $model));
?>
</div><!-- search-form -->
<?php
$this->widget('zii.widgets.grid.CGridView', array('id' => 'antrag-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'columns' => array('id', array('name' => 'veranstaltung', 'value' => 'GxHtml::valueEx($data->veranstaltung)', 'filter' => GxHtml::listDataEx(Veranstaltung::model()->findAllAttributes(null, true))), array('name' => 'abgeleitet_von', 'value' => 'GxHtml::valueEx($data->abgeleitetVon)', 'filter' => GxHtml::listDataEx(Antrag::model()->findAllAttributes(null, true))), 'typ', 'name', 'revision_name', array('class' => 'CButtonColumn', 'template' => '{update}'))));