mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +01:00
Move DiffusionHistoryListView to DiffusionCommitListView
Summary: I think this name is more accurate, also add proper links to author image. Test Plan: Review commits in sandbox, see new URL on image. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D18026
This commit is contained in:
parent
b27c2ed6d1
commit
aefc006ba5
3 changed files with 7 additions and 4 deletions
|
@ -661,6 +661,7 @@ phutil_register_library_map(array(
|
|||
'DiffusionCommitHookEngine' => 'applications/diffusion/engine/DiffusionCommitHookEngine.php',
|
||||
'DiffusionCommitHookRejectException' => 'applications/diffusion/exception/DiffusionCommitHookRejectException.php',
|
||||
'DiffusionCommitListController' => 'applications/diffusion/controller/DiffusionCommitListController.php',
|
||||
'DiffusionCommitListView' => 'applications/diffusion/view/DiffusionCommitListView.php',
|
||||
'DiffusionCommitMergeHeraldField' => 'applications/diffusion/herald/DiffusionCommitMergeHeraldField.php',
|
||||
'DiffusionCommitMessageHeraldField' => 'applications/diffusion/herald/DiffusionCommitMessageHeraldField.php',
|
||||
'DiffusionCommitPackageAuditHeraldField' => 'applications/diffusion/herald/DiffusionCommitPackageAuditHeraldField.php',
|
||||
|
@ -728,7 +729,6 @@ phutil_register_library_map(array(
|
|||
'DiffusionGitSSHWorkflow' => 'applications/diffusion/ssh/DiffusionGitSSHWorkflow.php',
|
||||
'DiffusionGitUploadPackSSHWorkflow' => 'applications/diffusion/ssh/DiffusionGitUploadPackSSHWorkflow.php',
|
||||
'DiffusionHistoryController' => 'applications/diffusion/controller/DiffusionHistoryController.php',
|
||||
'DiffusionHistoryListView' => 'applications/diffusion/view/DiffusionHistoryListView.php',
|
||||
'DiffusionHistoryQueryConduitAPIMethod' => 'applications/diffusion/conduit/DiffusionHistoryQueryConduitAPIMethod.php',
|
||||
'DiffusionHistoryTableView' => 'applications/diffusion/view/DiffusionHistoryTableView.php',
|
||||
'DiffusionHovercardEngineExtension' => 'applications/diffusion/engineextension/DiffusionHovercardEngineExtension.php',
|
||||
|
@ -5634,6 +5634,7 @@ phutil_register_library_map(array(
|
|||
'DiffusionCommitHookEngine' => 'Phobject',
|
||||
'DiffusionCommitHookRejectException' => 'Exception',
|
||||
'DiffusionCommitListController' => 'DiffusionController',
|
||||
'DiffusionCommitListView' => 'AphrontView',
|
||||
'DiffusionCommitMergeHeraldField' => 'DiffusionCommitHeraldField',
|
||||
'DiffusionCommitMessageHeraldField' => 'DiffusionCommitHeraldField',
|
||||
'DiffusionCommitPackageAuditHeraldField' => 'DiffusionCommitHeraldField',
|
||||
|
@ -5704,7 +5705,6 @@ phutil_register_library_map(array(
|
|||
),
|
||||
'DiffusionGitUploadPackSSHWorkflow' => 'DiffusionGitSSHWorkflow',
|
||||
'DiffusionHistoryController' => 'DiffusionController',
|
||||
'DiffusionHistoryListView' => 'AphrontView',
|
||||
'DiffusionHistoryQueryConduitAPIMethod' => 'DiffusionQueryConduitAPIMethod',
|
||||
'DiffusionHistoryTableView' => 'DiffusionView',
|
||||
'DiffusionHovercardEngineExtension' => 'PhabricatorHovercardEngineExtension',
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
final class DiffusionHistoryListView extends AphrontView {
|
||||
final class DiffusionCommitListView extends AphrontView {
|
||||
|
||||
private $commits = array();
|
||||
private $noDataString;
|
||||
|
@ -114,10 +114,12 @@ final class DiffusionHistoryListView extends AphrontView {
|
|||
if ($author_phid) {
|
||||
$author_name = $handles[$author_phid]->renderLink();
|
||||
$author_image_uri = $handles[$author_phid]->getImageURI();
|
||||
$author_image_href = $handles[$author_phid]->getURI();
|
||||
} else {
|
||||
$author_name = $commit->getCommitData()->getAuthorName();
|
||||
$author_image_uri =
|
||||
celerity_get_resource_uri('/rsrc/image/people/user0.png');
|
||||
$author_image_href = null;
|
||||
}
|
||||
|
||||
$commit_tag = id(new PHUITagView())
|
||||
|
@ -132,6 +134,7 @@ final class DiffusionHistoryListView extends AphrontView {
|
|||
->setDisabled($commit->isUnreachable())
|
||||
->setDescription($message)
|
||||
->setImageURI($author_image_uri)
|
||||
->setImageHref($author_image_href)
|
||||
->addByline(pht('Author: %s', $author_name))
|
||||
->addIcon('none', $committed)
|
||||
->addAttribute($commit_tag);
|
|
@ -60,7 +60,7 @@ final class PhabricatorPeopleProfileCommitsController
|
|||
->setLimit(100)
|
||||
->execute();
|
||||
|
||||
$list = id(new DiffusionHistoryListView())
|
||||
$list = id(new DiffusionCommitListView())
|
||||
->setViewer($viewer)
|
||||
->setCommits($commits)
|
||||
->setNoDataString(pht('No recent commits.'));
|
||||
|
|
Loading…
Reference in a new issue