Changeset View
Changeset View
Standalone View
Standalone View
src/view/phui/PHUIWorkpanelView.php
<?php | <?php | ||||
final class PHUIWorkpanelView extends AphrontView { | final class PHUIWorkpanelView extends AphrontTagView { | ||||
private $cards = array(); | private $cards = array(); | ||||
private $header; | private $header; | ||||
private $editURI; | private $editURI; | ||||
private $footerAction; | private $footerAction; | ||||
private $headerColor = PhabricatorActionHeaderView::HEADER_GREY; | private $headerColor = PhabricatorActionHeaderView::HEADER_GREY; | ||||
public function setCards(PHUIObjectItemListView $cards) { | public function setCards(PHUIObjectItemListView $cards) { | ||||
Show All 16 Lines | public function setFooterAction(PHUIListItemView $footer_action) { | ||||
return $this; | return $this; | ||||
} | } | ||||
public function setHeaderColor($header_color) { | public function setHeaderColor($header_color) { | ||||
$this->headerColor = $header_color; | $this->headerColor = $header_color; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function render() { | public function getTagAttributes() { | ||||
return array( | |||||
'class' => 'phui-workpanel-view', | |||||
); | |||||
} | |||||
public function getTagContent() { | |||||
require_celerity_resource('phui-workpanel-view-css'); | require_celerity_resource('phui-workpanel-view-css'); | ||||
$footer = ''; | $footer = ''; | ||||
if ($this->footerAction) { | if ($this->footerAction) { | ||||
$footer_tag = $this->footerAction; | $footer_tag = $this->footerAction; | ||||
$footer = phutil_tag( | $footer = phutil_tag( | ||||
'ul', | 'ul', | ||||
array( | array( | ||||
Show All 25 Lines | $view = phutil_tag( | ||||
'class' => 'phui-workpanel-view-inner', | 'class' => 'phui-workpanel-view-inner', | ||||
), | ), | ||||
array( | array( | ||||
$header, | $header, | ||||
$body, | $body, | ||||
$footer, | $footer, | ||||
)); | )); | ||||
return phutil_tag( | return $view; | ||||
'div', | |||||
array( | |||||
'class' => 'phui-workpanel-view' | |||||
), | |||||
$view); | |||||
} | } | ||||
} | } |