Ejemplo n.º 1
0
        <div class="widget-toolbar">
            <a data-action="settings" href="#"><i class="icon-cog"></i></a>
            <a data-action="reload" href="#"><i class="icon-refresh"></i></a>
            <a data-action="collapse" href="#"><i class="icon-chevron-up"></i></a>
            <a data-action="close" href="#"><i class="icon-remove"></i></a>
        </div>
        <div class="widget-toolbar">
            <?php 
echo CHtml::link('<i class="icon-plus"></i>', array('create'), array('data-rel' => 'tooltip', 'title' => 'Add', 'data-placement' => 'bottom'));
?>
        </div>
        <div class="widget-toolbar">
            <?php 
echo CHtml::link('<i class="icon-search"></i>', '#', array('class' => 'search-button', 'data-rel' => 'tooltip', 'title' => 'Search', 'data-placement' => 'bottom'));
?>
        </div>
    </div><!--/.widget-header -->
    <div class="widget-body">
        <div class="widget-main">
            <div class="search-form" style="display:none">
                <?php 
$this->renderPartial('_search', array('model' => $model));
?>
            </div><!-- search-form -->
            <?php 
$this->widget('bootstrap.widgets.TbGridView', array('type' => TbHtml::GRID_TYPE_HOVER, 'id' => 'content-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'columns' => array(array('name' => 'id', 'type' => 'raw', 'value' => '$data->id', 'htmlOptions' => array('style' => "text-align:center;width:100px;", 'title' => 'ID')), array('name' => 'title', 'type' => 'raw', 'value' => '$data->title', 'htmlOptions' => array('style' => "text-align:left;", 'title' => 'Title')), array('name' => 'catid', 'type' => 'raw', 'value' => 'ContentCategory::getCategoryName($data->catid)', 'filter' => ContentCategory::get_category_new('Content', 'catid'), 'htmlOptions' => array('style' => "text-align:left;", 'title' => 'Parent Category')), array('name' => 'state', 'value' => '$data->state?Yii::t(\'app\',\'Yes\'):Yii::t(\'app\', \'No\')', 'filter' => array('' => Yii::t('app', 'All'), '0' => Yii::t('app', 'No'), '1' => Yii::t('app', 'Yes')), 'htmlOptions' => array('style' => "text-align:center;")), array('name' => 'featured', 'value' => '$data->featured?Yii::t(\'app\',\'Yes\'):Yii::t(\'app\', \'No\')', 'filter' => array('' => Yii::t('app', 'All'), '0' => Yii::t('app', 'No'), '1' => Yii::t('app', 'Yes')), 'htmlOptions' => array('style' => "text-align:center;")), array('name' => 'created', 'value' => 'UserAdmin::get_date($data->created)', 'filter' => $this->widget('zii.widgets.jui.CJuiDatePicker', array('model' => $model, 'attribute' => 'created', 'htmlOptions' => array('id' => 'datepicker2', 'size' => '10'), 'i18nScriptFile' => 'jquery.ui.datepicker-en.js', 'defaultOptions' => array('showOn' => 'focus', 'dateFormat' => 'yy-mm-dd', 'showOtherMonths' => true, 'selectOtherMonths' => true, 'changeMonth' => true, 'changeYear' => true, 'showButtonPanel' => false)), true), 'htmlOptions' => array('style' => "text-align:center;")), array('name' => 'ordering', 'type' => 'raw', 'value' => '$data->ordering', 'htmlOptions' => array('style' => "text-align:center; width:50px;", 'title' => 'Ordering')), array('name' => 'hits', 'type' => 'raw', 'value' => '$data->hits', 'htmlOptions' => array('style' => "text-align:center; width:50px;", 'title' => 'Hits')), array('header' => 'Actions', 'class' => 'bootstrap.widgets.TbButtonColumn'))));
?>
        </div>
    </div><!--/.widget-body -->
</div><!--/.widget-box -->
Ejemplo n.º 2
0
<?php

$form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array('id' => 'content-category-form', 'enableAjaxValidation' => false));
?>
<p class="help-block">Fields with <span class="required">*</span> are required.</p>
<?php 
echo $form->errorSummary($model);
//echo $form->dropDownListControlGroup($model, 'parent_id', CHtml::listData(ContentCategory::model()->findAll(array('condition' => 'parent_id=0 AND published=1', "order" => "title")), 'id', 'title'), array('empty' => '--please select--', 'class' => 'span5'));
if ($model->isNewRecord) {
    echo ContentCategory::get_category_new('ContentCategory', 'parent_id');
} else {
    echo ContentCategory::get_category_update('ContentCategory', 'parent_id', $model->parent_id);
}
echo $form->textFieldControlGroup($model, 'title', array('class' => 'span5', 'maxlength' => 255));
echo $form->labelEx($model, 'description');
$this->widget('application.extensions.xheditor.JXHEditor', array('model' => $model, 'attribute' => 'description', 'htmlOptions' => array('class' => 'xheditor', 'style' => 'width: 100%; height: 150px;')));
echo $form->dropDownListControlGroup($model, 'published', array('1' => 'Yes', '0' => 'No'));
?>
<div class="form-actions">
    <?php 
echo TbHtml::submitButton($model->isNewRecord ? 'Create' : 'Save', array('color' => TbHtml::BUTTON_COLOR_PRIMARY));
?>
    <?php 
echo TbHtml::resetButton('Reset', array('color' => TbHtml::BUTTON_COLOR_INFO));
?>
</div>

<?php 
$this->endWidget();
Ejemplo n.º 3
0
        <div class="widget-toolbar">
            <a data-action="settings" href="#"><i class="icon-cog"></i></a>
            <a data-action="reload" href="#"><i class="icon-refresh"></i></a>
            <a data-action="collapse" href="#"><i class="icon-chevron-up"></i></a>
            <a data-action="close" href="#"><i class="icon-remove"></i></a>
        </div>
        <div class="widget-toolbar">
            <?php 
echo CHtml::link('<i class="icon-plus"></i>', array('create'), array('data-rel' => 'tooltip', 'title' => 'Add', 'data-placement' => 'bottom'));
?>
        </div>
        <div class="widget-toolbar">
            <?php 
echo CHtml::link('<i class="icon-search"></i>', '#', array('class' => 'search-button', 'data-rel' => 'tooltip', 'title' => 'Search', 'data-placement' => 'bottom'));
?>
        </div>
    </div><!--/.widget-header -->
    <div class="widget-body">
        <div class="widget-main">
            <div class="search-form" style="display:none">
                <?php 
$this->renderPartial('_search', array('model' => $model));
?>
            </div><!-- search-form -->
            <?php 
$this->widget('bootstrap.widgets.TbGridView', array('type' => TbHtml::GRID_TYPE_HOVER, 'id' => 'content-category-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'columns' => array(array('name' => 'parent_id', 'type' => 'raw', 'value' => 'ContentCategory::getCategoryName($data->parent_id)', 'filter' => ContentCategory::get_category_new('ContentCategory', 'parent_id'), 'htmlOptions' => array('style' => "text-align:left;", 'title' => 'Parent Category')), 'title', array('name' => 'description', 'type' => 'raw', 'value' => '$data->description', 'htmlOptions' => array('style' => "text-align:left;", 'title' => 'Description')), array('name' => 'published', 'header' => "Status", 'value' => '$data->published?Yii::t(\'app\',\'Active\'):Yii::t(\'app\', \'Inactive\')', 'filter' => array('' => Yii::t('app', 'All'), '0' => Yii::t('app', 'Inactive'), '1' => Yii::t('app', 'Active')), 'htmlOptions' => array('style' => "text-align:center;")), array('class' => 'bootstrap.widgets.TbButtonColumn'))));
?>
        </div>
    </div><!--/.widget-body -->
</div><!--/.widget-box -->
Ejemplo n.º 4
0
<?php

$form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array('id' => 'content-form', 'enableAjaxValidation' => false, 'htmlOptions' => array('enctype' => 'multipart/form-data')));
Yii::app()->clientScript->registerScript('search', "\n    \$('#Content_images').ace_file_input({\n        no_file: 'No Image ...',\n        btn_choose: 'Choose',\n        btn_change: 'Change',\n        droppable: false,\n        onchange: null,\n        thumbnail: false //| true | large\n                //whitelist:'gif|png|jpg|jpeg'\n                //blacklist:'exe|php'\n                //onchange:''\n                //\n    });\n");
?>
<p class="help-block">Fields with <span class="required">*</span> are required.</p>
<?php 
echo $form->errorSummary($model);
?>
<div class="row-fluid">
    <div class="span12">
        <?php 
if ($model->isNewRecord) {
    echo ContentCategory::get_category_new('Content', 'catid');
} else {
    echo ContentCategory::get_category_update('Content', 'catid', $model->catid);
}
?>
    </div>
</div>
<?php 
echo $form->textFieldControlGroup($model, 'title', array('class' => 'span12', 'maxlength' => 255));
?>
<div class="control-group">
    <label for="form-field-1" class="control-label"><?php 
echo $form->labelEx($model, 'introtext');
?>
</label>
    <div class="controls">
        <?php 
$this->widget('application.extensions.yii-ckeditor.CKEditorWidget', array('model' => $model, 'attribute' => 'introtext', 'config' => array('language' => 'en')));