예제 #1
0
파일: _form.php 프로젝트: yasirgit/hotmall
echo $form->labelEx($model, 'type');
?>
		<?php 
echo $form->dropDownList($model, 'type', CHtml::listData(UserType::findAll(), 'id', 'name'));
?>
		<?php 
echo $form->error($model, 'type');
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'status');
?>
		<?php 
echo $form->dropDownList($model, 'status', CHtml::listData(UserStatus::findAll(), 'id', 'name'));
?>
		<?php 
echo $form->error($model, 'status');
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'first_name');
?>
		<?php 
echo $form->textField($model, 'first_name', array('size' => 50, 'maxlength' => 50));
?>
		<?php 
echo $form->error($model, 'first_name');
예제 #2
0
파일: index.php 프로젝트: yasirgit/hotmall
<?php

$this->breadcrumbs = array('Users' => array('index'), 'Manage');
$this->menu = array(array('label' => 'List User', 'url' => array('index')), array('label' => 'Create User', 'url' => array('create')));
?>

<h1>Manage Users</h1>

<?php 
$this->widget('zii.widgets.grid.CGridView', array('id' => 'user-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'columns' => array('user_id', 'wlabel_id', 'username', array('name' => 'type', 'filter' => CHtml::listData(UserType::findAll(), 'id', 'name'), 'value' => '$data->getType($data->type)'), array('name' => 'status', 'filter' => CHtml::listData(UserStatus::findAll(), 'id', 'name'), 'value' => '$data->getStatus($data->status)'), 'date_created', array('class' => 'CButtonColumn', 'template' => '{update}{delete}', 'afterDelete' => 'function(link,success,data){ if(success) alert("Delete completed successfuly"); }'))));