Example #1
0
<?php

$this->breadcrumbs = array('Manage Posts');
?>
<h1>Manage Posts</h1>

<?php 
$this->widget('zii.widgets.grid.CGridView', array('dataProvider' => $model->search(), 'filter' => $model, 'columns' => array(array('name' => 'title', 'type' => 'raw', 'value' => 'CHtml::link(CHtml::encode($data->title), $data->url)'), array('name' => 'status', 'value' => 'Bloglookup::item("PostStatus",$data->status)', 'filter' => Bloglookup::items('PostStatus')), array('name' => 'create_time', 'type' => 'datetime', 'filter' => false), array('class' => 'CButtonColumn'))));
Example #2
0
?>
		<?php 
$this->widget('CAutoComplete', array('model' => $model, 'attribute' => 'tags', 'url' => array('suggestTags'), 'multiple' => true, 'htmlOptions' => array('size' => 50)));
?>
		<p class="hint">Please separate different tags with commas.</p>
		<?php 
echo $form->error($model, 'tags');
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'status');
?>
		<?php 
echo $form->dropDownList($model, 'status', Bloglookup::items('PostStatus'));
?>
		<?php 
echo $form->error($model, 'status');
?>
	</div>

	<div class="row buttons">
		<?php 
echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save');
?>
	</div>

<?php 
$this->endWidget();
?>