1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-27 09:12:41 +01:00

made DiffusionHomeController use commit summaries

Summary: Latest commit in repositories are displayed together with their summaries if available

Test Plan:
Diffusion did not crash - a good sign

commit summaries also only appear on Diffusion Home //only// - as expected

Reviewers: epriestley, btrahan, chad

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5117
This commit is contained in:
Anh Nhan Nguyen 2013-02-26 07:12:44 -08:00 committed by epriestley
parent 5de7774412
commit 58ef3be1c6
2 changed files with 9 additions and 7 deletions

View file

@ -130,7 +130,6 @@ final class DiffusionHomeController extends DiffusionController {
'href' => '/diffusion/'.$repository->getCallsign().'/', 'href' => '/diffusion/'.$repository->getCallsign().'/',
), ),
$repository->getName()), $repository->getName()),
$repository->getDetail('description'),
PhabricatorRepositoryType::getNameForRepositoryType( PhabricatorRepositoryType::getNameForRepositoryType(
$repository->getVersionControlSystem()), $repository->getVersionControlSystem()),
$size, $size,
@ -138,7 +137,8 @@ final class DiffusionHomeController extends DiffusionController {
$commit $commit
? DiffusionView::linkCommit( ? DiffusionView::linkCommit(
$repository, $repository,
$commit->getCommitIdentifier()) $commit->getCommitIdentifier(),
$commit->getSummary())
: '-', : '-',
$date, $date,
$time, $time,
@ -166,7 +166,6 @@ final class DiffusionHomeController extends DiffusionController {
$table->setHeaders( $table->setHeaders(
array( array(
'Repository', 'Repository',
'Description',
'VCS', 'VCS',
'Commits', 'Commits',
'Lint', 'Lint',
@ -177,11 +176,10 @@ final class DiffusionHomeController extends DiffusionController {
$table->setColumnClasses( $table->setColumnClasses(
array( array(
'pri', 'pri',
'wide',
'', '',
'n', 'n',
'n', 'n',
'n', 'wide',
'', '',
'right', 'right',
)); ));
@ -190,7 +188,6 @@ final class DiffusionHomeController extends DiffusionController {
true, true,
true, true,
true, true,
true,
$show_lint, $show_lint,
true, true,
true, true,

View file

@ -113,11 +113,16 @@ abstract class DiffusionView extends AphrontView {
final public static function linkCommit( final public static function linkCommit(
PhabricatorRepository $repository, PhabricatorRepository $repository,
$commit) { $commit,
$summary = '') {
$commit_name = self::nameCommit($repository, $commit); $commit_name = self::nameCommit($repository, $commit);
$callsign = $repository->getCallsign(); $callsign = $repository->getCallsign();
if (strlen($summary)) {
$commit_name .= ': ' . $summary;
}
return phutil_tag( return phutil_tag(
'a', 'a',
array( array(