<div class="row">
    <div class="col-md-3">
        <?php
        $items = [];
        $item  = [
            'href'  => $this->url('admin', ['action' => 'new']),
            'label' => _a('All'),
        ];
        if (!$m) {
            $item['active'] = 1;
        }
        $items[] = $item;
        foreach ($modules as $name => $mTitle) {
            $item = [
                'href'  => $this->url('admin', ['action' => 'new', 'm' => $name]),
                'label' => _escape($mTitle),
            ];
            if ($name == $m) {
                $item['active'] = 1;
            }
            $items[] = $item;
        }
        echo $this->navMenu($items, [
            'class' => 'nav nav-pills nav-stacked',
        ]);
        ?>
    </div>
    <div class="col-md-9">
        <table class="table table-hover table-bordered">
            <tr class="box-bordered-header">
                <th><?php echo _a('Tag name'); ?></th>
                <th class="span2"><?php echo _a('Time'); ?></th>
                <th class="span1"><?php echo _a('Action') ?></th>
            </tr>
            <?php foreach ($tags as $tag) {
                $tagFront  = sprintf('<a href="%s">%s</a>', $tag['url'], _escape($tag['term']));
                $deleteUrl = $this->url('admin', ['from' => 'new', 'action' => 'delete', 'tag' => $tag['term'], 'm' => $m]);
                $tagDelete = sprintf('<a href="%s">%s</a>', $deleteUrl, _a('Delete'));
                ?>
                <tr>
                    <td><?php echo $tagFront; ?></td>
                    <td><?php echo $tag['time']; ?></td>
                    <td><?php echo $tagDelete; ?></td>
                </tr>
            <?php } ?>
        </table>
        <div class="pagination-right">
            <?php echo $this->paginationControl($paginator, 'Sliding', 'paginator.phtml'); ?>
        </div>
    </div>
</div>


<div class="float-right">
    <a href="<?php echo $this->url('', ['controller' => 'build', 'action' => 'import']); ?>">Build</a>
    <a href="<?php echo $this->url('', ['controller' => 'build', 'action' => 'flush']); ?>">Flush</a>
</div>