<?php
$this->pageTitle = $category->title;
?>
<?php if (!$models): ?>
    <div class="info">Список тем в данном разделе пуст</div>
<?php else: ?>
    <?php foreach($models as $model):?>
        <?php echo CHtml::link('<img src="/images/icons/'.(ForumThemesForUsers::checkRead($model->id_theme) ? 'forum' : 'forum_new').'.png" alt="*" /> '.FuncHelper::outputText($model->title), array('/forum/theme', 'id' => $model->id_theme), 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'),
));?>
<hr>
<?php if (Yii::app()->user->level > 9 && Yii::app()->user->mute < time()):?>
    <?php if (Yii::app()->user->checkAccess('moder')):?>
        <?php echo CHtml::link('<img src="/images/icons/dot.png" alt="*" /> Новая тема', array('/forum/createTheme', 'id'=>$category->id_category), array('class' => 'block'))?>
        <?php echo CHtml::link('<img src="/images/icons/dot.png" alt="*" /> Редактировать раздел', array('/forum/updateCategory', 'id'=>$category->id_category), array('class' => 'block getForm'))?>
    <?php elseif($category->id_category > 1): ?>
        <?php echo CHtml::link('<img src="/images/icons/dot.png" alt="*" /> Новая тема', array('/forum/createTheme', 'id'=>$category->id_category), array('class' => 'block'))?>
    <?php endif; ?>
<?php endif; ?>
<?php echo CHtml::link('<img src="/images/icons/dot.png" alt="*" /> Отметить все как прочитанное', array('/forum/markAsRead', 'id'=>$category->id_category), array('class' => 'block'))?>
<?php echo CHtml::link('<img src="/images/icons/dot.png" alt="*" /> Форум', array('/forum/index'), array('class' => 'block'))?>