mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 08:52:39 +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',
|
'$' => '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]+))?'.
|
||||||
|
|
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();
|
$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()),
|
||||||
|
|
Loading…
Reference in a new issue