addColumn('no', 'no'); $this->addColumn('date', 'added', array('title' => 'Registered', 'orderBy' => 'User.added')); $this->addColumn('text', 'firstName', array('orderBy' => 'firstName')); $this->addColumn('text', 'lastName', array('orderBy' => 'lastName')); $this->addColumn('email', 'email', array('orderBy' => 'email')); $this->addColumn('text', 'phone', array('orderBy' => 'phone')); $this->addColumn('link_enum', 'enabled', array('orderBy' => 'enabled')); $this->addColumn('link_enum', 'approved', array('orderBy' => 'approved')); $this->addOptionsColumn(); return $this; } public function addOptionsColumn() { $options = array( 'actions' => array( 'edit' => array(), 'delete' => array(), ) ); if (($logBaseUrl = Qs_SiteMap::findFirst(null, array('type' => 'ViewControllerLog_Admin_'), null, 'url'))) { $options['actions']['viewLog'] = array( 'formattedLink' => $logBaseUrl . '/user?roleId=%d', 'linkTitle' => "View this " . $this->getConfig('itemName') . "'s Log" ); } $this->addColumn('options', 'options', $options); return $this; } }