1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 09:18:48 +02:00

Add Quicklinks to Project List elements

Summary: Adds some basic links to Project ObjectItems, Workboards and Members. Assume these will be configurable by CustomFields off in the future, but this makes Projects on Dashboards much more useful.

Test Plan:
Tested /projects/ and /dashboards/, click on links to make sure they go where expected.

{F164972}

{F164973}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9483
This commit is contained in:
Chad Little 2014-06-12 15:25:04 -07:00
parent 408d71cdd3
commit 933c6317c2

View file

@ -141,11 +141,28 @@ final class PhabricatorProjectSearchEngine
$list->setUser($viewer);
foreach ($projects as $project) {
$id = $project->getID();
$workboards_uri = $this->getApplicationURI("board/{$id}/");
$members_uri = $this->getApplicationURI("members/{$id}/");
$workboards_url = phutil_tag(
'a',
array(
'href' => $workboards_uri
),
pht('Workboards'));
$members_url = phutil_tag(
'a',
array(
'href' => $members_uri
),
pht('Members'));
$item = id(new PHUIObjectItemView())
->setHeader($project->getName())
->setHref($this->getApplicationURI("view/{$id}/"))
->setImageURI($project->getProfileImageURI());
->setImageURI($project->getProfileImageURI())
->addAttribute($workboards_url)
->addAttribute($members_url);
if ($project->getStatus() == PhabricatorProjectStatus::STATUS_ARCHIVED) {
$item->addIcon('delete-grey', pht('Archived'));