mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-03 19:31:02 +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',
|
'DiffusionCommitHookEngine' => 'applications/diffusion/engine/DiffusionCommitHookEngine.php',
|
||||||
'DiffusionCommitHookRejectException' => 'applications/diffusion/exception/DiffusionCommitHookRejectException.php',
|
'DiffusionCommitHookRejectException' => 'applications/diffusion/exception/DiffusionCommitHookRejectException.php',
|
||||||
'DiffusionCommitListController' => 'applications/diffusion/controller/DiffusionCommitListController.php',
|
'DiffusionCommitListController' => 'applications/diffusion/controller/DiffusionCommitListController.php',
|
||||||
|
'DiffusionCommitListView' => 'applications/diffusion/view/DiffusionCommitListView.php',
|
||||||
'DiffusionCommitMergeHeraldField' => 'applications/diffusion/herald/DiffusionCommitMergeHeraldField.php',
|
'DiffusionCommitMergeHeraldField' => 'applications/diffusion/herald/DiffusionCommitMergeHeraldField.php',
|
||||||
'DiffusionCommitMessageHeraldField' => 'applications/diffusion/herald/DiffusionCommitMessageHeraldField.php',
|
'DiffusionCommitMessageHeraldField' => 'applications/diffusion/herald/DiffusionCommitMessageHeraldField.php',
|
||||||
'DiffusionCommitPackageAuditHeraldField' => 'applications/diffusion/herald/DiffusionCommitPackageAuditHeraldField.php',
|
'DiffusionCommitPackageAuditHeraldField' => 'applications/diffusion/herald/DiffusionCommitPackageAuditHeraldField.php',
|
||||||
|
@ -728,7 +729,6 @@ phutil_register_library_map(array(
|
||||||
'DiffusionGitSSHWorkflow' => 'applications/diffusion/ssh/DiffusionGitSSHWorkflow.php',
|
'DiffusionGitSSHWorkflow' => 'applications/diffusion/ssh/DiffusionGitSSHWorkflow.php',
|
||||||
'DiffusionGitUploadPackSSHWorkflow' => 'applications/diffusion/ssh/DiffusionGitUploadPackSSHWorkflow.php',
|
'DiffusionGitUploadPackSSHWorkflow' => 'applications/diffusion/ssh/DiffusionGitUploadPackSSHWorkflow.php',
|
||||||
'DiffusionHistoryController' => 'applications/diffusion/controller/DiffusionHistoryController.php',
|
'DiffusionHistoryController' => 'applications/diffusion/controller/DiffusionHistoryController.php',
|
||||||
'DiffusionHistoryListView' => 'applications/diffusion/view/DiffusionHistoryListView.php',
|
|
||||||
'DiffusionHistoryQueryConduitAPIMethod' => 'applications/diffusion/conduit/DiffusionHistoryQueryConduitAPIMethod.php',
|
'DiffusionHistoryQueryConduitAPIMethod' => 'applications/diffusion/conduit/DiffusionHistoryQueryConduitAPIMethod.php',
|
||||||
'DiffusionHistoryTableView' => 'applications/diffusion/view/DiffusionHistoryTableView.php',
|
'DiffusionHistoryTableView' => 'applications/diffusion/view/DiffusionHistoryTableView.php',
|
||||||
'DiffusionHovercardEngineExtension' => 'applications/diffusion/engineextension/DiffusionHovercardEngineExtension.php',
|
'DiffusionHovercardEngineExtension' => 'applications/diffusion/engineextension/DiffusionHovercardEngineExtension.php',
|
||||||
|
@ -5634,6 +5634,7 @@ phutil_register_library_map(array(
|
||||||
'DiffusionCommitHookEngine' => 'Phobject',
|
'DiffusionCommitHookEngine' => 'Phobject',
|
||||||
'DiffusionCommitHookRejectException' => 'Exception',
|
'DiffusionCommitHookRejectException' => 'Exception',
|
||||||
'DiffusionCommitListController' => 'DiffusionController',
|
'DiffusionCommitListController' => 'DiffusionController',
|
||||||
|
'DiffusionCommitListView' => 'AphrontView',
|
||||||
'DiffusionCommitMergeHeraldField' => 'DiffusionCommitHeraldField',
|
'DiffusionCommitMergeHeraldField' => 'DiffusionCommitHeraldField',
|
||||||
'DiffusionCommitMessageHeraldField' => 'DiffusionCommitHeraldField',
|
'DiffusionCommitMessageHeraldField' => 'DiffusionCommitHeraldField',
|
||||||
'DiffusionCommitPackageAuditHeraldField' => 'DiffusionCommitHeraldField',
|
'DiffusionCommitPackageAuditHeraldField' => 'DiffusionCommitHeraldField',
|
||||||
|
@ -5704,7 +5705,6 @@ phutil_register_library_map(array(
|
||||||
),
|
),
|
||||||
'DiffusionGitUploadPackSSHWorkflow' => 'DiffusionGitSSHWorkflow',
|
'DiffusionGitUploadPackSSHWorkflow' => 'DiffusionGitSSHWorkflow',
|
||||||
'DiffusionHistoryController' => 'DiffusionController',
|
'DiffusionHistoryController' => 'DiffusionController',
|
||||||
'DiffusionHistoryListView' => 'AphrontView',
|
|
||||||
'DiffusionHistoryQueryConduitAPIMethod' => 'DiffusionQueryConduitAPIMethod',
|
'DiffusionHistoryQueryConduitAPIMethod' => 'DiffusionQueryConduitAPIMethod',
|
||||||
'DiffusionHistoryTableView' => 'DiffusionView',
|
'DiffusionHistoryTableView' => 'DiffusionView',
|
||||||
'DiffusionHovercardEngineExtension' => 'PhabricatorHovercardEngineExtension',
|
'DiffusionHovercardEngineExtension' => 'PhabricatorHovercardEngineExtension',
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
final class DiffusionHistoryListView extends AphrontView {
|
final class DiffusionCommitListView extends AphrontView {
|
||||||
|
|
||||||
private $commits = array();
|
private $commits = array();
|
||||||
private $noDataString;
|
private $noDataString;
|
||||||
|
@ -114,10 +114,12 @@ final class DiffusionHistoryListView extends AphrontView {
|
||||||
if ($author_phid) {
|
if ($author_phid) {
|
||||||
$author_name = $handles[$author_phid]->renderLink();
|
$author_name = $handles[$author_phid]->renderLink();
|
||||||
$author_image_uri = $handles[$author_phid]->getImageURI();
|
$author_image_uri = $handles[$author_phid]->getImageURI();
|
||||||
|
$author_image_href = $handles[$author_phid]->getURI();
|
||||||
} else {
|
} else {
|
||||||
$author_name = $commit->getCommitData()->getAuthorName();
|
$author_name = $commit->getCommitData()->getAuthorName();
|
||||||
$author_image_uri =
|
$author_image_uri =
|
||||||
celerity_get_resource_uri('/rsrc/image/people/user0.png');
|
celerity_get_resource_uri('/rsrc/image/people/user0.png');
|
||||||
|
$author_image_href = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
$commit_tag = id(new PHUITagView())
|
$commit_tag = id(new PHUITagView())
|
||||||
|
@ -132,6 +134,7 @@ final class DiffusionHistoryListView extends AphrontView {
|
||||||
->setDisabled($commit->isUnreachable())
|
->setDisabled($commit->isUnreachable())
|
||||||
->setDescription($message)
|
->setDescription($message)
|
||||||
->setImageURI($author_image_uri)
|
->setImageURI($author_image_uri)
|
||||||
|
->setImageHref($author_image_href)
|
||||||
->addByline(pht('Author: %s', $author_name))
|
->addByline(pht('Author: %s', $author_name))
|
||||||
->addIcon('none', $committed)
|
->addIcon('none', $committed)
|
||||||
->addAttribute($commit_tag);
|
->addAttribute($commit_tag);
|
|
@ -60,7 +60,7 @@ final class PhabricatorPeopleProfileCommitsController
|
||||||
->setLimit(100)
|
->setLimit(100)
|
||||||
->execute();
|
->execute();
|
||||||
|
|
||||||
$list = id(new DiffusionHistoryListView())
|
$list = id(new DiffusionCommitListView())
|
||||||
->setViewer($viewer)
|
->setViewer($viewer)
|
||||||
->setCommits($commits)
|
->setCommits($commits)
|
||||||
->setNoDataString(pht('No recent commits.'));
|
->setNoDataString(pht('No recent commits.'));
|
||||||
|
|
Loading…
Reference in a new issue