Exemplo n.º 1
0
<?php

/** @var TabletController $this */
/** @var Tablet $model */
$this->breadcrumbs = array('Tablets' => array('index'), Yii::t('AweCrud.app', 'Manage'));
$this->menu = array(array('label' => Yii::t('AweCrud.app', 'List') . ' ' . Tablet::label(2), 'icon' => 'list', 'url' => array('index')), array('label' => Yii::t('AweCrud.app', 'Create') . ' ' . Tablet::label(), 'icon' => 'plus', 'url' => array('create')));
Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\t\$('.search-form').toggle();\n\treturn false;\n});\n\$('.search-form form').submit(function(){\n\t\$.fn.yiiGridView.update('tablet-grid', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n");
?>

<fieldset>
    <legend>
        <?php 
echo Yii::t('AweCrud.app', 'Manage');
?>
 <?php 
echo Tablet::label(2);
?>
    </legend>

<?php 
$this->widget('bootstrap.widgets.TbGridView', array('id' => 'tablet-grid', 'type' => 'striped condensed', 'dataProvider' => $model->search(), 'filter' => $model, 'afterAjaxUpdate' => 'reInstallDatepicker', 'columns' => array('nombre', array('name' => 'imagen', 'type' => 'image', 'value' => 'isset($data->imagen) ? $data->imagen : null', 'htmlOptions' => array('width' => '50'), 'filter' => false), 'alt_imagen', array('name' => 'visible', 'value' => '($data->visible == 0) ? Yii::t(\'AweCrud.app\', \'No\') : Yii::t(\'AweCrud.app\', \'Yes\')', 'filter' => array('0' => Yii::t('AweCrud.app', 'No'), '1' => Yii::t('AweCrud.app', 'Yes'))), array('class' => 'bootstrap.widgets.TbButtonColumn'))));
Yii::app()->clientScript->registerScript('for-date-picker', "\n    function reInstallDatepicker(id, data){\n        \n    }\n\n    ");
?>
</fieldset>
Exemplo n.º 2
0

<?php 
/** @var TabletController $this */
/** @var Tablet $model */
$this->breadcrumbs = array($model->label(2) => array('index'), Yii::t('AweCrud.app', 'Create'));
$this->menu = array(array('label' => Yii::t('AweCrud.app', 'Manage'), 'icon' => 'list-alt', 'url' => array('admin')));
?>

<fieldset>
    <legend><?php 
echo Yii::t('AweCrud.app', 'Create') . ' ' . Tablet::label();
?>
</legend>
    <?php 
echo $this->renderPartial('_form', array('model' => $model));
?>
</fieldset>
Exemplo n.º 3
0
<?php

/** @var TabletController $this */
/** @var Tablet $model */
$this->breadcrumbs = array('Tablets' => array('index'), $model->id);
$this->menu = array(array('label' => Yii::t('AweCrud.app', 'Create') . ' ' . Tablet::label(), 'icon' => 'plus', 'url' => array('create')), array('label' => Yii::t('AweCrud.app', 'Update'), 'icon' => 'pencil', 'url' => array('update', 'id' => $model->id)), array('label' => Yii::t('AweCrud.app', 'Delete'), 'icon' => 'trash', 'url' => '#', 'linkOptions' => array('submit' => array('delete', 'id' => $model->id), 'confirm' => Yii::t('AweCrud.app', 'Are you sure you want to delete this item?'))), array('label' => Yii::t('AweCrud.app', 'Manage'), 'icon' => 'list-alt', 'url' => array('admin')));
?>

<fieldset>
    <legend><?php 
echo Yii::t('AweCrud.app', 'View') . ' ' . Tablet::label();
?>
 <?php 
echo CHtml::encode($model);
?>
</legend>

<?php 
$this->widget('bootstrap.widgets.TbDetailView', array('data' => $model, 'attributes' => array('id', 'nombre', array('name' => 'imagen', 'type' => 'image'), 'alt_imagen', array('name' => 'visible', 'type' => 'boolean'))));
?>
</fieldset>