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:
parent
0bfb472be1
commit
c795aaea29
2 changed files with 14 additions and 1 deletions
4
src/aphront/default/configuration/AphrontDefaultApplicationConfiguration.php
Normal file → Executable file
4
src/aphront/default/configuration/AphrontDefaultApplicationConfiguration.php
Normal file → Executable 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]+))?'.
|
||||
|
|
11
src/applications/diffusion/view/branchtable/DiffusionBranchTableView.php
Normal file → Executable file
11
src/applications/diffusion/view/branchtable/DiffusionBranchTableView.php
Normal file → Executable 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()),
|
||||
|
|
Loading…
Reference in a new issue