Ejemplo n.º 1
0
 /**
  * init
  */
 public function init()
 {
     $this->term = $this->getPage()->getTerm();
     $this->setup = \coa\Db\CoaSetup::getMapper()->findByCourseId($this->term->courseId);
     // Create Tk_Table structure
     $ff = \Form\Factory::getInstance();
     $tf = \Table\Factory::getInstance();
     $this->table = $tf->createTable('CompanyManager');
     //$this->table->addCell($tf->createCellCheckbox());
     $this->table->addCell($tf->createCellString('name'))->setKey();
     $this->table->addCell($tf->createCellString('status'));
     $this->table->addCell($tf->createCellEmail('email'));
     $this->table->addCell($tf->createCellString('country'));
     $this->table->addCell($tf->createCellString('totalUnits'));
     $this->table->addCell($tf->createCellString('totalPlaces'));
     $this->table->addAction($tf->createActionCsv());
     $this->table->addFilter($ff->createFieldText('keywords')->setPlaceholder('Keywords'))->setLabel('');
     $now = \Tk\Date::create();
     $this->table->addFilter($ff->createFieldDate('dateFrom')->setPlaceholder('Date From')->setValue(\Tk\Date::create($now->getYear() . '-01-01')->floor()));
     $this->table->addFilter($ff->createFieldDate('dateTo')->setPlaceholder('Date To')->setValue(\Tk\Date::create($now->getYear() . '-12-31')->ceil()));
     $list = \Ext\Db\PlacementType::getMapper()->findByTermId($this->term->id);
     $this->table->addFilter($ff->createFieldSelectMulti('placementTypeId', $list))->addStyle('width', '200px');
     $list = \Ext\Db\Term::getMapper()->findByCourseId($this->term->courseId);
     $this->table->addFilter($ff->createFieldSelect('termId', $list)->prependOption('-- All Terms --', ''))->addStyle('width', '200px');
     $this->addChild($tf->createTableRenderer($this->table), 'Table');
 }
Ejemplo n.º 2
0
 /**
  * init
  */
 public function init()
 {
     $this->tool = $this->getConfig()->getLtiToolProvider();
     // Create Table structure
     $ff = \Form\Factory::getInstance();
     $tf = \Table\Factory::getInstance();
     $this->table = $tf->createTable('Manager');
     $this->table->addCell(Checkbox::create());
     $this->table->addCell(NameCell::create('name'))->setKey()->setUrl(\Tk\Url::createHomeUrl('/consumer/edit.html'));
     $this->table->addCell(KeyCell::create('key'));
     $this->table->addCell($tf->createCellString('secret'));
     //$this->table->addCell($tf->createCellString('consumer_version'))->setLabel('Version');
     $this->table->addCell($tf->createCellBoolean('enabled'));
     $this->table->addCell($tf->createCellBoolean('protected'));
     $this->table->addCell(DateCell::create('updated'));
     $this->table->addCell(DateCell::create('created'));
     $this->table->addAction(DeleteAction::create());
     $this->addChild($tf->createTableRenderer($this->table), 'Manager');
 }