예제 #1
0
 function printComments($full_ui = true)
 {
     $cpt = 0;
     $my_list_pos = intval(_request('list_pos', 0));
     $obj_acc = new LcmExpenseAccess(0, 0, $this);
     if ($full_ui) {
         show_page_subtitle(_T('expenses_subtitle_comments'), 'expenses_comments');
     }
     if (!$obj_acc->getRead()) {
         echo '<p>' . "Access denied. You do not have the permission to view this information." . "</p>\n";
         // TRAD (make function!)
         return;
     }
     for ($cpt = 0, $this->getCommentStart(); !$this->getCommentDone(); $cpt++) {
         $id_comment = $this->getCommentIterator();
         $comment = new LcmExpenseCommentInfoUI($this->getDataInt('id_expense'), $id_comment);
         $comment->printGeneral();
     }
     if (!$cpt) {
         echo "<p>No comments</p>";
     }
     // TRAD
     // [ML] FIXME : show_list_end() had the habit of closing tables,
     // because everthing used to have tables. This is obviously wrong
     // and will be fixed when other lists are non-taled.
     echo "<table><tr><td></td></tr>\n";
     show_list_end($my_list_pos, $this->getCommentTotal());
     if ($full_ui) {
         if ($obj_acc->getEdit()) {
             echo '<p><a href="edit_exp.php?edit_comment=1&amp;expense=' . $this->getDataInt('id_expense') . '" class="edit_lnk">' . _T('expense_button_comment') . '</a></p>' . "\n";
         }
     }
 }