<?php
/**
 * @var MessageController $this
 * @var array $categories
 */
?>
<table class="table table-bordered">

    <?php foreach ($categories as $category): ?>
    <tr>
        <th colspan="2"><?php echo $this->categories[$category['category']]['title']?></th>
        <!--        <td colspan="2">--><?php //= $this->categories[$category['category']]['description']?><!--</td>-->
    </tr>
    <tr>
        <!--        <td></td>-->
        <th>Всего собщений в категории</th>
        <td><?php echo $category['all_messages']?></td>
    </tr>
    <?php foreach ($this->categories[$category['category']]['languages'] as $lang => $name): ?>
        <tr>
            <!--            <td></td>-->
            <th><?php echo CHtml::link("Переведено на «{$name}»", array('edit', 'category' => $category['category'], 'new' => false, 'language' => $lang))?></th>
            <td><?php echo$category[$lang]?>/<?php echo$category['all_messages']?></td>
        </tr>
        <?php endforeach; ?>
    <?php endforeach; ?>
</table>
