<?php use_helper('I18N', 'Object', 'Validation', 'Javascript', 'tvtl'); ?>
<?php $module = '/'.$sf_context->getModuleName(); ?>
<div id="comments" class="comments">
  <?php foreach ($pager->getResult() as $i=>$tblblogentrycomment): ?>
    <?php $tbluser = $tblblogentrycomment->getRefTbluser() ?>
    <div class="comment<?php echo $i%2+1 ?>"><a name="<?php echo $tblblogentrycomment->getCmId()?>" />
      <div class="avatar">
        <?php echo $tbluser->getObject()->getAvatar() ?>
      </div>
      <div class="text"><a name="<?php echo $tblblogentrycomment->getCmId()?>"></a>
        <?php echo htmlFilter::filterText($tblblogentrycomment->getCmContent()); ?>
      </div>
      <div>
        <div class="float-left">
          <div class="navigator">
            <?php echo $tbluser->getObject()->getHtmlName() ?>
            <?php echo '@ ', $tblblogentrycomment->getCmDate('H\h:i\p d/m/y') ?>
          </div>
        </div>
        <?php if ($tblblogentrycomment->canDelete()): ?>
        <div class="float-right">
          <div class="navigator">
            <?php $delLink = $module.'/deletecomment?cmid='.$tblblogentrycomment->getCmId() ?>
            <?php echo link_to('Xóa', $delLink, 'onclick="return confirm(\'Quý vị có chắc chắn không?\')" ') ?>
          </div>
        </div>
        <?php endif ?>
      </div>
    </div>
  <?php endforeach; ?>
  <?php echo showPageNav13($pager, $module.'/show?entry_id='.$entry_id) ?>
  <?php echo '&nbsp'.form_error('cm_content') ?>
  <?php if ($insertOk): ?>
  	<div id="insertOk" style="display:none"></div>
  <?php endif ?>
</div>
