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' => 'document-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'columns' => array(array('name' => 'catid', 'type' => 'raw', 'value' => 'DocumentCategory::getCategoryName($data->catid)', 'filter' => DocumentCategory::get_category_new('Document', 'catid'), 'htmlOptions' => array('style' => "text-align:left;", 'title' => 'Document Category')), array('name' => 'title', 'type' => 'raw', 'value' => 'CHtml::link(CHtml::encode($data->title),array("document/download","id"=>$data->id))'), 'doc_type', array('name' => 'doc_size', 'header' => "Size", 'value' => 'Document::byteToMbyte($data->doc_size)'), array('name' => 'published', 'value' => '$data->published?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('header' => 'Actions', 'class' => 'bootstrap.widgets.TbButtonColumn'))));
?>
        </div>
    </div><!--/.widget-body -->
</div><!--/.widget-box -->
Ejemplo n.º 2
0
        <h5>Manage Document Categories</h5>
        <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' => 'document-category-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'columns' => array(array('name' => 'parent', 'type' => 'raw', 'value' => 'DocumentCategory::getCategoryName($data->parent)', 'filter' => DocumentCategory::get_category_new('DocumentCategory', 'parent'), 'htmlOptions' => array('style' => "text-align:left;", 'title' => 'Document Category')), array('name' => 'title', 'type' => 'raw', 'value' => '$data->title', 'htmlOptions' => array('style' => "text-align:left;", 'title' => 'Title')), array('name' => 'published', 'value' => '$data->published?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; width:100px;")), array('header' => 'Actions', 'class' => 'bootstrap.widgets.TbButtonColumn'))));
?>
        </div>
    </div><!--/.widget-body -->
</div><!--/.widget-box -->
Ejemplo n.º 3
0
<?php

$form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array('id' => 'document-form', 'enableAjaxValidation' => false, 'htmlOptions' => array('enctype' => 'multipart/form-data')));
?>

<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 DocumentCategory::get_category_new('Document', 'catid');
} else {
    echo DocumentCategory::get_category_update('Document', 'catid', $model->catid);
}
?>
    </div>
</div>
<?php 
echo $form->textFieldControlGroup($model, 'title', array('class' => 'span5', 'maxlength' => 255));
?>
<div class="row-fluid">
    <div class="span5">
        <?php 
echo $form->fileFieldControlGroup($model, 'doc_file', array('maxlength' => 255, 'class' => 'span12'));
?>
    </div>
</div>
Ejemplo n.º 4
0
<?php

$form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array('id' => 'document-category-form', 'enableAjaxValidation' => false));
?>
<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 DocumentCategory::get_category_new('DocumentCategory', 'parent');
} else {
    echo DocumentCategory::get_category_update('DocumentCategory', 'parent', $model->parent);
}
?>
    </div>
</div>
<?php 
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;', 'placeholder' => 'Description')));
echo $form->dropDownListControlGroup($model, 'published', array('1' => 'Yes', '0' => 'No'), array('class' => 'span2'));
?>
<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));