'added DESC'); protected function _bindListColumns($list) { $list->addColumn('no', 'no') ->addColumn( 'date', 'added', array( 'title' => 'Submitted', 'orderBy' => 'added', 'format' => '%m/%d/%Y %I:%M %p', 'attribs' => array('width' => 250) ) ) ->addColumn('text', 'donateType', array( 'orderBy' => 'donateType', 'title' => 'Donation Type', 'defaultText' => '-')) ->addColumn('text', 'name', array( 'attribs' => array('width' => 250), 'orderBy' => 'name', 'defaultText' => '-')) ->addColumn('text', 'address', array( 'attribs' => array('width' => 250), 'orderBy' => 'address', 'defaultText' => '-')) ->addColumn('text', 'city', array( 'attribs' => array('width' => 250), 'orderBy' => 'city', 'defaultText' => '-')) ->addColumn('text', 'state', array( 'attribs' => array('width' => 250), 'orderBy' => 'state', 'defaultText' => '-')) ->addColumn('text', 'zip', array( 'orderBy' => 'zip', 'defaultText' => '-')) ->addColumn('options', 'options', array('actions' => 'view; delete')); return $this; } protected function _getDefaultLinks() { $links = parent::_getDefaultLinks(); $params = array(); if ($orderBy = Qs_Request::getGetValue('orderBy')) { $params['orderBy'] = $orderBy; } if ($query = Qs_Request::getGetValue('query')) { $params['query'] = $query; } if ($donateType = Qs_Request::getGetValue('donateType')) { $params['donateType'] = $donateType; } $params['action'] = 'exportCsv'; $links['exportCsv'] = array('title' => 'Export to .csv', 'url' => $this->url($params)); return $links; } protected function _doView() { $item = $this->dataObj->getData(); if (empty($item)) { $this->doc->displayError('Invalid submission ID'); return $this; } $item['config'] = (array) $this->getConfig(); $item['tpl'] = $this->getTemplate('view.tpl'); $item['needs'] = array_filter(explode('; ', $item['needs'])); $this->doc->addItem($item); $this->doc->addStylesheet('css/admin-print.css', array('media' => 'print')); return $this; } protected function _bindFilterFields($form) { parent::_bindFilterFields($form); $form->addElement( 'select', 'donateType', array( 'label' => 'Donation Type', 'multiOptions' => array('' => 'All') + (array) $this->_getDataObj()->getDonateTypes4Select(), ) ); return $this; } }