Changeset View
Changeset View
Standalone View
Standalone View
src/view/phui/PHUIWorkpanelView.php
<?php | <?php | ||||
final class PHUIWorkpanelView extends AphrontView { | final class PHUIWorkpanelView extends AphrontView { | ||||
private $cards = array(); | private $cards = array(); | ||||
private $header; | private $header; | ||||
private $headerAction; | private $editURI; | ||||
private $footerAction; | private $footerAction; | ||||
public function setCards(PHUIObjectItemListView $cards) { | public function setCards(PHUIObjectItemListView $cards) { | ||||
$this->cards[] = $cards; | $this->cards[] = $cards; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function setHeader($header) { | public function setHeader($header) { | ||||
$this->header = $header; | $this->header = $header; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function setHeaderAction($header_action) { | public function setEditURI($edit_uri) { | ||||
// TODO: This doesn't do anything? | $this->editURI = $edit_uri; | ||||
$this->headerAction = $header_action; | |||||
return $this; | return $this; | ||||
} | } | ||||
public function setFooterAction(PHUIListItemView $footer_action) { | public function setFooterAction(PHUIListItemView $footer_action) { | ||||
$this->footerAction = $footer_action; | $this->footerAction = $footer_action; | ||||
return $this; | return $this; | ||||
} | } | ||||
Show All 9 Lines | if ($this->footerAction) { | ||||
'class' => 'phui-workpanel-footer-action mst ps' | 'class' => 'phui-workpanel-footer-action mst ps' | ||||
), | ), | ||||
$footer_tag); | $footer_tag); | ||||
} | } | ||||
$header_edit = id(new PHUIIconView()) | $header_edit = id(new PHUIIconView()) | ||||
->setSpriteSheet(PHUIIconView::SPRITE_ACTIONS) | ->setSpriteSheet(PHUIIconView::SPRITE_ACTIONS) | ||||
->setSpriteIcon('settings-grey') | ->setSpriteIcon('settings-grey') | ||||
->setHref('#'); | ->setHref($this->editURI); | ||||
$header = id(new PhabricatorActionHeaderView()) | $header = id(new PhabricatorActionHeaderView()) | ||||
->setHeaderTitle($this->header) | ->setHeaderTitle($this->header) | ||||
->setHeaderColor(PhabricatorActionHeaderView::HEADER_GREY) | ->setHeaderColor(PhabricatorActionHeaderView::HEADER_GREY) | ||||
->addAction($header_edit); | ->addAction($header_edit); | ||||
$body = phutil_tag( | $body = phutil_tag( | ||||
'div', | 'div', | ||||
Show All 24 Lines |