예제 #1
0
<?php

/**
 * Display attributes list
 **/
$this->pageHeader = Yii::t('StoreModule.admin', 'Атрибуты');
$this->breadcrumbs = array('Home' => $this->createUrl('/admin'), Yii::t('StoreModule.admin', 'Атрибуты'));
$this->topButtons = $this->widget('application.modules.admin.widgets.SAdminTopButtons', array('template' => array('create'), 'elements' => array('create' => array('link' => $this->createUrl('create'), 'title' => Yii::t('StoreModule.admin', 'Создать атрибут'), 'options' => array('icons' => array('primary' => 'ui-icon-plus'))))));
$this->widget('ext.sgridview.SGridView', array('dataProvider' => $dataProvider, 'id' => 'productsListGrid', 'filter' => $model, 'columns' => array(array('class' => 'CCheckBoxColumn'), array('class' => 'SGridIdColumn', 'name' => 'id'), array('name' => 'title', 'type' => 'raw', 'value' => 'CHtml::link(CHtml::encode($data->title), array("/store/admin/attribute/update", "id"=>$data->id))'), 'name', array('name' => 'type', 'filter' => StoreAttribute::getTypesList(), 'value' => 'CHtml::encode(StoreAttribute::getTypeTitle($data->type))'), 'position', array('class' => 'CButtonColumn', 'template' => '{update}{delete}'))));
예제 #2
0
<?php

return array('id' => 'attributeUpdateForm', 'showErrorSummary' => true, 'elements' => array('content' => array('type' => 'form', 'title' => Yii::t('StoreModule.admin', 'Параметры'), 'elements' => array('title' => array('type' => 'text'), 'name' => array('type' => 'text', 'hint' => Yii::t('StoreModule.admin', 'Укажите уникальный идентификатор')), 'required' => array('type' => 'checkbox'), 'type' => array('type' => 'dropdownlist', 'items' => StoreAttribute::getTypesList()), 'display_on_front' => array('type' => 'dropdownlist', 'items' => array(1 => Yii::t('StoreModule.admin', 'Да'), 0 => Yii::t('StoreModule.admin', 'Нет'))), 'use_in_filter' => array('type' => 'dropdownlist', 'items' => array(1 => Yii::t('StoreModule.admin', 'Да'), 0 => Yii::t('StoreModule.admin', 'Нет')), 'hint' => Yii::t('StoreModule.admin', 'Использовать свойство для поиска продуктов')), 'select_many' => array('type' => 'dropdownlist', 'items' => array(0 => Yii::t('StoreModule.admin', 'Нет'), 1 => Yii::t('StoreModule.admin', 'Да')), 'hint' => Yii::t('StoreModule.admin', 'Позволяет искать продукты по более чем одному параметру одновременно')), 'use_in_variants' => array('type' => 'dropdownlist', 'items' => array(0 => Yii::t('StoreModule.admin', 'Нет'), 1 => Yii::t('StoreModule.admin', 'Да'))), 'use_in_compare' => array('type' => 'dropdownlist', 'items' => array(1 => Yii::t('StoreModule.admin', 'Да'), 0 => Yii::t('StoreModule.admin', 'Нет'))), 'position' => array('type' => 'text')))));