Location: PHPKode > projects > AModules3 > amodules-3.0.1/mini-apps/03-DocAssistant/ListProjects.php
<?php
/*
 * Created on 21.03.2006 by *Camper*
 */
class ListProjects extends TGrid{
	private $types = array(1=>'Library', 2=>'Application');
	
	function init(){
		parent::init();
		$this
			->addColumn('text', 'type', 'Type')->makeSortable()
			->addColumn('expander', 'name', 'Project name')->makeSortable()
			->addColumn('text', 'description', 'Description');
		if($this->api->isAuthenticated()){
			$this
				->addColumn('expander', 'parse', 'Parse')
				->addColumn('expander', 'edit', 'Edit')
				->addColumn('delete', 'delete_project', 'Delete');
		}			
		$this->setSource('project');
		$this->add('Paginator', null, 'paginator');
		if($this->api->recall('editable'))$this->addButton('Add project')->redirect('AddProject');
	}
}

?>
Return current item: AModules3