Exemplo n.º 1
0
 protected function render_rows(array $rows)
 {
     $view_ids = $this->module->model('contents')->select('pageid, content')->where('contentid = "body" AND editor = "view"')->pairs;
     $rendered_rows = parent::render_rows($rows);
     $records = array_values($this->records);
     foreach ($rendered_rows as $i => $row) {
         $row->add_class('entry');
         $row->add_class('draggable');
         $record = $records[$i];
         $nid = $record->nid;
         if ($this->expand_highlight && $record->parentid == $this->expand_highlight) {
             $row->add_class('volatile-highlight');
         }
         if (isset($view_ids[$nid])) {
             $row->add_class('view');
         }
         if ($record->pattern) {
             $row->add_class('pattern');
         }
         if ($record->locationid) {
             $row->add_class('location');
         }
         $row['id'] = "nid:{$nid}";
         // TODO-20130627: deprecate this, or use 'data-nid' or maybe move this to manager with a data-key on the TR.
     }
     return $rendered_rows;
 }