コード例 #1
0
<?php

return array(array('header' => '#', 'value' => '$this->grid->dataProvider->pagination->currentPage * $this->grid->dataProvider->pagination->pageSize + ($row+1)', 'htmlOptions' => array('style' => 'width:30px;')), array('name' => 'name', 'type' => 'raw', 'value' => '$data->parent != 0 ?
		       $data->selfParent->name ." <i class=\'fa fa-angle-double-right\'></i> ". $data->name."<br><small class=muted>Slug : ".$data->slug." | ".count($data->photos)." Posts</small>":
		       $data->name."<br><small class=muted>Slug : ".$data->slug." | ".count($data->photos)." Posts</small>"'), array('name' => 'parent', 'type' => 'raw', 'filter' => PhotoCategory::makeDropDown(), 'value' => '$data->parent != 0 ? "<span class=muted>".$data->selfParent->name."</span>" : "<span class=\'muted\'>---</span>"'));
コード例 #2
0
<p>
	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 
$form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array('action' => Yii::app()->createUrl($this->route), 'method' => 'get'));
echo $form->textFieldRow($model, 'post_name', array('class' => 'span5', 'maxlength' => 255));
echo $form->dropDownListRow($model, 'authorSearch', $this->listUser('author'), array('class' => 'span3', 'prompt' => ''));
echo $form->dropDownListRow($model, 'editorSearch', $this->listUser('editor'), array('class' => 'span3', 'prompt' => ''));
echo $form->dropDownListRow($model, 'categorySearch', Category::makeDropDown(), array('class' => 'span3', 'prompt' => ''));
echo $form->dropDownListRow($model, 'photocategorySearch', PhotoCategory::makeDropDown(), array('class' => 'span3', 'prompt' => ''));
?>
 
<?php 
echo $form->dropDownListRow($model, 'tagSearch', Tag::makeList(), array('class' => 'span3', 'prompt' => ''));
echo $form->dropDownListRow($model, 'post_status', $this->listAllStatus(), array('class' => 'span3', 'prompt' => ''));
?>

<?php 
/*echo $form->datepickerRow($model,'post_date',
         array('options'=>array('format' => 'yyyy-mm-dd','viewformat' => 'yyyy-mm-dd')),
  array('prepend' => '<i class="icon-calendar"></i>',)); */
echo $form->datepickerRow($model, 'post_modified', array('options' => array('format' => 'yyyy-mm-dd', 'viewformat' => 'yyyy-mm-dd')), array('prepend' => '<i class="icon-calendar"></i>'));
?>

<?php 
echo $form->textFieldRow($model, 'post_hits', array('class' => 'span2'));
?>
コード例 #3
0
      
	
	<?php 
echo $form->textFieldRow($model, 'name', array('class' => 'span12'));
?>
	<p class='muted'>Nama Yang akan tampil</p><hr>
	
	<?php 
echo $form->textFieldRow($model, 'slug', array('class' => 'span12'));
?>
	<p class=' muted'>'slug' adalah versi URL dari nama.
Dalam hal ini berupa huruf kecil semua dan hanya mengandung huruf,
angka, dan tanda (-). <br>(Jika Kosong maka akan di isi otomatis.)</p><hr>
	
	 <?php 
echo $form->dropDownListRow($model, 'parent', PhotoCategory::makeDropDown(), array('empty' => '-- none --'));
?>
	 <p class='muted'>
		Kategori dapat memiliki hirarki.
		Contoh anda memiliki kategori Musik,
		dan kategori tersebut memiliki anak kategori yaitu Rock dan
		Metal.<br> (Kosongkan jika tidak mempunyai hirarki)
		
	 </p><hr>
	
	
        <?php 
echo $form->textAreaRow($model, 'description', array('class' => 'span12', 'rows' => '3'));
?>
        <hr>
	
コード例 #4
0
<?php

return array(array('value' => '$this->grid->dataProvider->pagination->currentPage * $this->grid->dataProvider->pagination->pageSize + ($row+1)', 'htmlOptions' => array('style' => 'width:20px;')), array('name' => 'post_name', 'type' => 'raw', 'value' => array($this, 'Post')), array('name' => 'photocategorySearch', 'filter' => PhotoCategory::makeDropDown(), 'type' => 'raw', 'value' => 'PhotoCategory::makeValue($data)'), array('name' => 'categorySearch', 'filter' => Category::makeDropDown(), 'type' => 'raw', 'value' => 'Category::makeValue($data)'), array('name' => 'post_status', 'filter' => array('draft' => 'Draft', 'publish' => 'Publish'), 'type' => 'raw', 'value' => array($this, 'Status'), 'htmlOptions' => array('style' => 'width:100px;')));