1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-18 12:52:42 +01:00

Make the branch table somewhat more useful.

This commit is contained in:
epriestley 2011-03-31 01:07:51 -07:00
parent 0bfb472be1
commit c795aaea29
2 changed files with 14 additions and 1 deletions

View file

@ -189,6 +189,10 @@ class AphrontDefaultApplicationConfiguration
'$' => 'DiffusionHomeController',
'(?P<callsign>[A-Z]+)/' => array(
'$' => 'DiffusionRepositoryController',
'repository/'.
'(?P<path>[^/]+)/'.
'$'
=> 'DiffusionRepositoryController',
'change/'.
'(?P<path>.*?)'.
'(?:[;](?P<commit>[a-z0-9]+))?'.

View file

@ -29,11 +29,20 @@ final class DiffusionBranchTableView extends DiffusionView {
$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_escape_html($branch->getName()), // TODO: link
phutil_render_tag(
'a',
array(
'href' => "/diffusion/{$callsign}/repository/{$branch_uri}",
),
phutil_escape_html($branch->getName())),
self::linkCommit(
$drequest->getRepository(),
$branch->getHeadCommitIdentifier()),