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

Don't show Conpherence controls if not in a Conpherence

Summary: We currently try to build crumbs out even if the user has no membership in any. This removes these useless controls.

Test Plan: Leave all Rooms, see NUX state with no "Edit Room", blank title, or "Collapse Column" controls.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D16546
This commit is contained in:
Chad Little 2016-09-13 10:40:47 -07:00
parent 2588b4fac0
commit 5d8b5c0ee3

View file

@ -59,12 +59,13 @@ abstract class ConpherenceController extends PhabricatorController {
$viewer = $this->getViewer();
$crumbs = $this->buildApplicationCrumbs();
if ($conpherence->getID()) {
$data = $conpherence->getDisplayData($this->getViewer());
$crumbs->addCrumb(
id(new PHUICrumbView())
->setName($data['title'])
->setHref('/'.$conpherence->getMonogram()));
$can_edit = PhabricatorPolicyFilter::hasCapability(
$viewer,
$conpherence,
@ -100,6 +101,7 @@ abstract class ConpherenceController extends PhabricatorController {
->addSigil('conpherence-widget-toggle')
->setIcon('fa-columns')
->addClass('conpherence-header-desktop-item'));
}
return hsprintf(
'%s',