mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-10 23:01:04 +01:00
Make Workboard icon grey if not enabled
Summary: Not sure this is obvious enough, but maybe future apps will use as well? Test Plan: test a project with and without a workboard Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Differential Revision: https://secure.phabricator.com/D11371
This commit is contained in:
parent
e85dfcbeee
commit
7e78a3f906
1 changed files with 12 additions and 1 deletions
|
@ -38,15 +38,26 @@ abstract class PhabricatorProjectController extends PhabricatorController {
|
|||
}
|
||||
|
||||
public function buildIconNavView(PhabricatorProject $project) {
|
||||
$user = $this->getRequest()->getUser();
|
||||
$id = $project->getID();
|
||||
$picture = $project->getProfileImageURI();
|
||||
$name = $project->getName();
|
||||
|
||||
$columns = id(new PhabricatorProjectColumnQuery())
|
||||
->setViewer($user)
|
||||
->withProjectPHIDs(array($project->getPHID()))
|
||||
->execute();
|
||||
if ($columns) {
|
||||
$board_icon = 'fa-columns';
|
||||
} else {
|
||||
$board_icon = 'fa-columns grey';
|
||||
}
|
||||
|
||||
$nav = new AphrontSideNavFilterView();
|
||||
$nav->setIconNav(true);
|
||||
$nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
|
||||
$nav->addIcon("profile/{$id}/", $name, null, $picture);
|
||||
$nav->addIcon("board/{$id}/", pht('Workboard'), 'fa-columns');
|
||||
$nav->addIcon("board/{$id}/", pht('Workboard'), $board_icon);
|
||||
$nav->addIcon("feed/{$id}/", pht('Feed'), 'fa-newspaper-o');
|
||||
$nav->addIcon("members/{$id}/", pht('Members'), 'fa-group');
|
||||
$nav->addIcon("edit/{$id}/", pht('Edit'), 'fa-pencil');
|
||||
|
|
Loading…
Reference in a new issue