<div id="selectlesson" style="width:500px; border:1px #ff0000 solid; background-color:#ffe6c6;margin:0px 0px 8px 10px;">
  <center>
    <?php if ($tblblogentry->getEntryLesson() == -1): ?>
      [<?php echo m_link_to('Di chuyển', '/entry/selectfolder?ajax=1&cat_id='.$cat_id) ?>]
    <?php endif ?>
    <?php if ($tblblogentry->canEditEntry()): ?>
      [<?php echo link_to('Đặt lại tiêu đề', '/present/resetlesson?entry_id='.$entry_id) ?>]
    <?php endif ?>
    [<?php echo link_to('Tạo lại thumbnail', '/tool/fixthumb?entry_id='.$entry_id) ?>]
    [<?php echo link_to('Tạo lại preview', '/tool/reconvert?entry_id='.$entry_id) ?>]
    <?php if ($next = $tblblogentry->getNextUntagId()): ?>
      <div style="width:40px;float:left">&nbsp</div>
      <div style="width:40px;float:right">
        <?php echo link_to(image_tag('list_box_icon.png', array('title'=>'Danh sách các bài tương tự')), '/present/samelesson?cat_id='.$cat_id.'&entry_id='.$entry_id.'&lesson='.$tblblogentry->getEntryLesson()) ?>
        <?php echo link_to(image_tag('next_small.png', array('title'=>'Bài chưa tag tiếp theo')), '/present/show?entry_id='.$next) ?>
      </div>
    <?php endif ?>
  </center>
</div>
<script>
function updateComponentsBelongToCategory(id) {
  var url = "<?php echo url_for('/present/updatefolder?entry_id='.$entry_id) ?>/cat_id/"+id;
  new Ajax.Updater("selectlesson", url, {asynchronous:true, evalScripts:true});
}
</script>
