Exemple #1
0
$this->breadcrumbs = array('Saoperative Margins' => array('index'), 'Manage');
$this->menu = array(array('label' => Yii::t('operativemargin', 'List SAOperativeMargin'), 'url' => array('index')), array('label' => Yii::t('operativemargin', 'Create SAOperativeMargin'), '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('saoperative-margin-grid', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n");
?>

<h1><?php 
echo Yii::t('operativemargin', 'Manage SAOperativeMargin');
?>
</h1>

<p>

<?php 
echo Yii::t('operativemargin', 'You may optionally enter a comparison operator (<b>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, <b>&gt;=</b>, <b>&lt;&gt;</b> or <b>=</b>) at the beginning of each of your search values to specify how the comparison should be done.');
?>

</p>

<?php 
echo CHtml::link('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' => 'saoperative-margin-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'columns' => array('id', 'area', array('header' => Yii::t('waterrequest', 'City State'), 'name' => 'area', 'filter' => CHtml::listData(ServiceArea::model()->findAll(), 'area', 'desc_area'), 'value' => '$data->city_state->desc_area'), 'margin', 'scenario', array('class' => 'CButtonColumn'))));
Exemple #2
0
$form = $this->beginWidget('CActiveForm', array('id' => 'saoperative-margin-form', 'enableAjaxValidation' => false));
?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php 
echo $form->errorSummary($model);
?>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'area');
?>
		<?php 
//echo $form->textField($model,'area',array('size'=>60,'maxlength'=>254));
echo $form->dropdownList($model, 'area', CHtml::listData(ServiceArea::model()->findAll(), 'area', 'desc_area'));
?>
		<?php 
echo $form->error($model, 'area');
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'margin');
?>
		<?php 
echo $form->textField($model, 'margin');
?>
		<?php 
echo $form->error($model, 'margin');