view->query->add_field('versioncontrol_operations', 'date'); } function render() { if (empty($this->row_plugin)) { vpr('versioncontrol_plugin_style_operations: Missing row plugin'); } $group_alias = ''; foreach ($this->view->query->fields as $alias => $data) { if ($data['field'] == 'date') { $group_alias = $alias; } } $groups = array(); foreach ($this->view->result as $index => $row) { $date = format_date($row->{$group_alias}, 'custom', $this->formatting); $groups[$date][] = array($this->row_plugin->render($row)); } foreach ($groups as $date => $rows) { $groups[$date] = theme('table', array(), $rows); } return theme($this->theme_functions(), $this->view, $this->options, $groups, $title); } }