mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-19 03:50:54 +01: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:
parent
408d71cdd3
commit
933c6317c2
1 changed files with 18 additions and 1 deletions
|
@ -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'));
|
||||
|
|
Loading…
Reference in a new issue