Esempio n. 1
0
<?php

/** Display pages list **/
$this->pageHeader = Yii::t('Poll.core', 'Опросы');
$this->breadcrumbs = array('Home' => $this->createUrl('/admin'), Yii::t('Poll.core', 'Опросы'));
$this->topButtons = $this->widget('application.modules.admin.widgets.SAdminTopButtons', array('template' => array('create'), 'elements' => array('create' => array('link' => $this->createUrl('create'), 'title' => Yii::t('Poll.core', 'Создать Опросы'), 'options' => array('icons' => array('primary' => 'ui-icon-plus'))))));
$this->widget('ext.sgridview.SGridView', array('dataProvider' => $dataProvider, 'id' => 'pagesListGrid', 'filter' => $model, 'columns' => array(array('class' => 'CCheckBoxColumn'), array('class' => 'SGridIdColumn', 'name' => 'id'), array('name' => 'name', 'type' => 'raw', 'value' => 'CHtml::link(CHtml::encode($data->name), array("update", "id"=>$data->id))'), array('name' => 'status', 'value' => 'CHtml::encode($data->statusLabel)', 'filter' => Poll::statuses()), array('class' => 'CButtonColumn', 'template' => '{update}{delete}'))));
Esempio n. 2
0
<?php

return array('id' => 'pageUpdateForm', 'showErrorSummary' => true, 'elements' => array('content' => array('type' => 'form', 'title' => Yii::t('Poll.core', 'Содержимое'), 'elements' => array('name' => array('type' => 'textarea'), 'description' => array('type' => 'textarea'), 'status' => array('type' => 'dropdownlist', 'items' => Poll::statuses())))));