コード例 #1
0
 /**
  * @todo make this a decorator
  */
 function get_item_display($column, $item)
 {
     $display = parent::get_item_display($column, $item);
     if (in_array($column, $this->page->view_columns)) {
         $target = $this->page->get_new_page(array('id' => $item->id, 'action' => 'view'), true);
         if ($target->can_do()) {
             return html_writer::link($target->url, $display);
         }
     }
     return $display;
 }
コード例 #2
0
 function get_item_display($column, $item)
 {
     $display = parent::get_item_display($column, $item);
     $tmppage = clone $this->page;
     if (in_array($column, $this->page->view_columns)) {
         $tmppage->params = array('id' => $item->id, 'action' => 'view');
         if ($tmppage->can_do()) {
             return '<a href="' . $this->viewurl->out(false, array('id' => $item->id)) . '">' . $display . '</a>';
         }
     }
     return $display;
 }