1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-22 05:20:56 +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', '$' => 'DiffusionHomeController',
'(?P<callsign>[A-Z]+)/' => array( '(?P<callsign>[A-Z]+)/' => array(
'$' => 'DiffusionRepositoryController', '$' => 'DiffusionRepositoryController',
'repository/'.
'(?P<path>[^/]+)/'.
'$'
=> 'DiffusionRepositoryController',
'change/'. 'change/'.
'(?P<path>.*?)'. '(?P<path>.*?)'.
'(?:[;](?P<commit>[a-z0-9]+))?'. '(?:[;](?P<commit>[a-z0-9]+))?'.

View file

@ -29,11 +29,20 @@ final class DiffusionBranchTableView extends DiffusionView {
$drequest = $this->getDiffusionRequest(); $drequest = $this->getDiffusionRequest();
$current_branch = $drequest->getBranch(); $current_branch = $drequest->getBranch();
$callsign = $drequest->getRepository()->getCallsign();
$rows = array(); $rows = array();
$rowc = array(); $rowc = array();
foreach ($this->branches as $branch) { foreach ($this->branches as $branch) {
$branch_uri = $drequest->getBranchURIComponent($branch->getName());
$rows[] = array( $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( self::linkCommit(
$drequest->getRepository(), $drequest->getRepository(),
$branch->getHeadCommitIdentifier()), $branch->getHeadCommitIdentifier()),