true, 'defaultOrderBy' => 'sorter'); /** * @param Qs_ViewController_List $list * * @return $this */ protected function _bindListColumns($list) { $list->addColumn('no', 'no', array('title' => '#', 'orderBy' => 'sorter', 'attribs' => 'class=text-center')); $list->addColumn( 'date', 'changed', array( 'title' => 'Submit Date', 'orderBy' => 'ApplicationDocument.changed', 'attribs' => 'class=text-center', 'format' => '%b %e, %Y', ) ); $list->addColumn( 'text', 'title', array( 'title' => 'Document Name', 'orderBy' => 'title', 'truncateLength' => 256, ) ); $list->addColumn( 'text', 'description', array( 'title' => 'Document Description', 'defaultText' => '-', 'truncateLength' => 2048, ) ); return $this; } protected function _bindReviewerListColumns($list) { $list->addColumn('download', 'download', array('title' => 'Download
Document', 'attribs' => 'class="text-center"')); $list->addColumn('reviewed', 'reviewed', array('title' => 'Review
Completed?', 'attribs' => 'class="text-center"')); return $this; } protected function _doChangeReviewed() { $this->_doc->display404(); return $this; } protected function _doChangeReviewedAjax() { $reviewed = (bool) Qs_Request::getRequestValue('reviewed'); $this->_getDataObj()->setReviewed($reviewed); $reviewed = ('y' == $this->_getDataObj()->clearData()->getData('reviewed')); $response = array( 'documentReviewed' => $reviewed, 'documentStatus' => ($reviewed) ? App_Application_Document_Obj::STATUS_REVIEW_COMPLETED : App_Application_Document_Obj::STATUS_AWAITING_REVIEW, ); $this->_displayJson($response); return $this; } protected function _addListScripts() { $options = array( 'ajaxUrl' => $this->url(), ); $this->_doc->addScript('js/app/application/document/list.js'); $this->_doc->addInitObject('app.application.document.List', array($options)); return $this; } protected function _addListItem($list = null, $template = 'list.tpl') { if (null == $list) { $list = $this->list; } $list->userType = $this->_getDataObj()->getUserType(); $this->_addListScripts(); return parent::_addListItem($list, $template); } }