<?php
/* @var $this ForumController */
/* @var $model ForumCategories */

$this->pageTitle = 'Форум';
?>
<?php if (!$models): ?>
    <div class="info">Разделов пока нет</div>
<?php else: ?>
    <?php foreach($models as $model):?>
        <?php echo CHtml::link('<img src="/images/icons/'.($model->checkRead() ? 'forum' : 'forum_new').'.png" alt="*" /> '.FuncHelper::outputText($model->title), array('/forum/category', 'id' => $model->id_category), array('class' => 'block'))?>
    <?php endforeach;?>
<?php endif; ?>

<?php $this->widget('CLinkPager', array(
    'id'=>'link_pager',
    'pages' => $pages,
    'header' => '<center>',
    'footer' => '</center>',
    'firstPageCssClass' => 'hidden',
    'prevPageLabel' => '«',
    'nextPageLabel' => '»',
    'lastPageCssClass' => 'hidden',
    'maxButtonCount'=>4,
    'htmlOptions' => array("class" => 'pagination'),
));?>

<?php if (Yii::app()->user->checkAccess('moder')):?>
    <hr /><?php echo CHtml::link('Создать раздел', array('/forum/createCategory'), array('class' => 'block getForm'))?>
<?php endif; ?>
