diffusionRequest; $content = array(); $crumbs = $this->buildCrumbs(); $content[] = $crumbs; $history_query = DiffusionHistoryQuery::newFromDiffusionRequest( $drequest); $history_query->setLimit(15); $history = $history_query->loadHistory(); $history_table = new DiffusionHistoryTableView(); $history_table->setDiffusionRequest($drequest); $history_table->setHistory($history); $panel = new AphrontPanelView(); $panel->setHeader('Recent Commits'); $panel->appendChild($history_table); $content[] = $panel; $browse_query = DiffusionBrowseQuery::newFromDiffusionRequest($drequest); $results = $browse_query->loadPaths(); $browse_table = new DiffusionBrowseTableView(); $browse_table->setDiffusionRequest($drequest); $browse_table->setPaths($results); $browse_panel = new AphrontPanelView(); $browse_panel->setHeader('Browse Repository'); $browse_panel->appendChild($browse_table); $content[] = $browse_panel; if ($drequest->getBranch() !== null) { $branch_query = DiffusionBranchQuery::newFromDiffusionRequest($drequest); $branches = $branch_query->loadBranches(); $branch_table = new DiffusionBranchTableView(); $branch_table->setDiffusionRequest($drequest); $branch_table->setBranches($branches); $branch_panel = new AphrontPanelView(); $branch_panel->setHeader('Branches'); $branch_panel->appendChild($branch_table); $content[] = $branch_panel; } return $this->buildStandardPageResponse( $content, array( 'title' => 'Diffusion', )); } }