Add an edit link on hover for Project profile images

Summary: Minor point of polish, but feels really nice. Hover over photo and edit a link to change the picture.

Test Plan:
hover hover, clicky clicky

{F1069179}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15109
This commit is contained in:
Chad Little
2016-01-24 13:18:42 -08:00
parent cb1c3424a8
commit 19f4e8631f
4 changed files with 77 additions and 8 deletions

View File

@@ -31,6 +31,15 @@ final class PhabricatorProjectProfileController
$header->setStatus('fa-ban', 'red', pht('Archived'));
}
$can_edit = PhabricatorPolicyFilter::hasCapability(
$viewer,
$project,
PhabricatorPolicyCapability::CAN_EDIT);
if ($can_edit) {
$header->setImageEditURL($this->getApplicationURI("picture/{$id}/"));
}
$properties = $this->buildPropertyListView($project);
$watch_action = $this->renderWatchAction($project);