branches = $branches; return $this; } public function render() { $drequest = $this->getDiffusionRequest(); $current_branch = $drequest->getBranch(); $rows = array(); $rowc = array(); foreach ($this->branches as $branch) { $rows[] = array( phutil_render_tag( 'a', array( 'href' => $drequest->generateURI( array( 'action' => 'browse', 'branch' => $branch->getName(), )), ), 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( 'pri', 'wide', )); $view->setRowClasses($rowc); return $view->render(); } }