<?php use_helper('I18N', 'tvtl', 'ModalBox'); ?>
<?php $sf_context->getResponse()->addJavascriptCommand('setCategory('.$cat_id.');'); ?>
<?php include_component('entry', 'listtabs', array('cat_id'=>$cat_id, 'tab'=>0)) ?>

<div id="list_content" class="docgroup nowrap">
  <h2>
    <label><?php echo blogStore::getPostLink($cat_id, 'document') ?></label>
    <?php $cache_file = "document_list_{$cat_id}_{$sort}_{$page}"; ?>
    <?php if ($page==1 && !begin_html_cache($cache_file)) return; ?>
    <?php echo blogStore::getCategoryPath($cat_id) ?>
    &nbsp;<?php echo '('.$pager->getTotalRecordCount().' bài)' ?>
  </h2>
  <?php $pageNav = showPageNav13($pager, '/document/list?cat_id=' . $cat_id . ($multiple_cat? '&same=list': '')); ?>
  <div class="content">
    <div class="pager"><?php echo $pageNav ?></div>
    <div class="document">
      <?php foreach ($pager->getResult() as $key => $tblblogcategoryentry): ?>
        <?php echo link_to('print', '/document/showprint?entry_id='.$tblblogcategoryentry->getCeEntry(), 'style="display:none"') ?>
      	<?php echo $tblblogcategoryentry->getObject()->getGlobalThumb($categoryItem->getListType($key)) ?>
      <?php endforeach ?>
    </div>
    <div class="pager"><?php echo $pageNav ?></div>
  </div>
  <?php if ($page==1) end_html_cache($cache_file); ?>
</div>