branches = $branches; return $this; } public function render() { $drequest = $this->getDiffusionRequest(); $current_branch = $drequest->getBranch(); $callsign = $drequest->getRepository()->getCallsign(); $rows = array(); $rowc = array(); foreach ($this->branches as $branch) { $branch_uri = $drequest->getBranchURIComponent($branch->getName()); $rows[] = array( phutil_render_tag( 'a', array( 'href' => "/diffusion/{$callsign}/repository/{$branch_uri}", ), phutil_escape_html($branch->getName())), self::linkCommit( $drequest->getRepository(), $branch->getHeadCommitIdentifier()), // TODO: etc etc ); if ($branch->getName() == $current_branch) { $rowc[] = 'highlighted'; } else { $rowc[] = null; } } $view = new AphrontTableView($rows); $view->setHeaders( array( 'Branch', 'Head', )); $view->setColumnClasses( array( 'wide', )); $view->setRowClasses($rowc); return $view->render(); } }