mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-21 21:10:56 +01: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:
parent
2588b4fac0
commit
5d8b5c0ee3
1 changed files with 40 additions and 38 deletions
|
@ -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',
|
||||
|
|
Loading…
Reference in a new issue