/** * * @param mixed $handler_id The ID of the handler. * @param array &$data The local request data. */ public function _show_versions($handler_id, array &$data) { if ($this->_provider->count_rows() == 0) { return; } $data['grid'] = $this->_provider->get_grid('documents_grid'); midcom_show_style('show-document-grid'); }
private function _show_invoice_list($type = 'all') { $this->_list_type = $type; $provider = new org_openpsa_widgets_grid_provider($this, 'local'); if ($provider->count_rows() == 0) { return; } switch ($this->_list_type) { case 'paid': $provider->add_order('paid', 'DESC'); break; case 'unsent': $provider->add_order('index_number'); break; case 'overdue': case 'open': $provider->add_order('due'); break; } $grid_id = $type . '_invoices_grid'; if ($this->_deliverable) { $grid_id = 'd_' . $this->_deliverable->id . $grid_id; $this->_request_data['totals']['deliverable'] = 0; } $this->_request_data['grid'] = $provider->get_grid($grid_id); $this->_request_data['list_type'] = $this->_list_type; $label = $type == 'all' ? 'invoices' : $type . ' invoices'; $this->_request_data['list_label'] = $this->_l10n->get($label); midcom_show_style('show-grid'); }