Changeset View
Changeset View
Standalone View
Standalone View
src/view/phui/PHUIHeaderView.php
Show First 20 Lines • Show All 247 Lines • ▼ Show 20 Lines | if ($this->image) { | ||||
} | } | ||||
} | } | ||||
$viewer = $this->getUser(); | $viewer = $this->getUser(); | ||||
$left = array(); | $left = array(); | ||||
$right = array(); | $right = array(); | ||||
$space_header = null; | |||||
if ($viewer) { | if ($viewer) { | ||||
$left[] = id(new PHUISpacesNamespaceContextView()) | $space_header = id(new PHUISpacesNamespaceContextView()) | ||||
->setUser($viewer) | ->setUser($viewer) | ||||
->setObject($this->policyObject); | ->setObject($this->policyObject); | ||||
} | } | ||||
if ($this->actionLinks) { | if ($this->actionLinks) { | ||||
$actions = array(); | $actions = array(); | ||||
foreach ($this->actionLinks as $button) { | foreach ($this->actionLinks as $button) { | ||||
$button->setColor(PHUIButtonView::GREY); | $button->setColor(PHUIButtonView::GREY); | ||||
▲ Show 20 Lines • Show All 64 Lines • ▼ Show 20 Lines | if ($href !== null) { | ||||
$header_content); | $header_content); | ||||
} | } | ||||
$left[] = phutil_tag( | $left[] = phutil_tag( | ||||
'span', | 'span', | ||||
array( | array( | ||||
'class' => 'phui-header-header', | 'class' => 'phui-header-header', | ||||
), | ), | ||||
$header_content); | array( | ||||
$space_header, | |||||
$header_content, | |||||
)); | |||||
if ($this->subheader || $this->badges) { | if ($this->subheader || $this->badges) { | ||||
$badges = null; | $badges = null; | ||||
if ($this->badges) { | if ($this->badges) { | ||||
$badges = new PHUIBadgeBoxView(); | $badges = new PHUIBadgeBoxView(); | ||||
$badges->addItems($this->badges); | $badges->addItems($this->badges); | ||||
$badges->setCollapsed(true); | $badges->setCollapsed(true); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 177 Lines • Show Last 20 Lines |