Changeset View
Changeset View
Standalone View
Standalone View
src/view/phui/PHUIObjectBoxView.php
| Show All 21 Lines | final class PHUIObjectBoxView extends AphrontTagView { | ||||
| private $showAction; | private $showAction; | ||||
| private $hideAction; | private $hideAction; | ||||
| private $showHideHref; | private $showHideHref; | ||||
| private $showHideContent; | private $showHideContent; | ||||
| private $showHideOpen; | private $showHideOpen; | ||||
| private $propertyLists = array(); | private $propertyLists = array(); | ||||
| private $tailButtons = array(); | |||||
| const COLOR_RED = 'red'; | const COLOR_RED = 'red'; | ||||
| const COLOR_BLUE = 'blue'; | const COLOR_BLUE = 'blue'; | ||||
| const COLOR_GREEN = 'green'; | const COLOR_GREEN = 'green'; | ||||
| const COLOR_YELLOW = 'yellow'; | const COLOR_YELLOW = 'yellow'; | ||||
| const BLUE = 'phui-box-blue'; | const BLUE = 'phui-box-blue'; | ||||
| const BLUE_PROPERTY = 'phui-box-blue-property'; | const BLUE_PROPERTY = 'phui-box-blue-property'; | ||||
| ▲ Show 20 Lines • Show All 110 Lines • ▼ Show 20 Lines | final class PHUIObjectBoxView extends AphrontTagView { | ||||
| } | } | ||||
| public function setValidationException( | public function setValidationException( | ||||
| PhabricatorApplicationTransactionValidationException $ex = null) { | PhabricatorApplicationTransactionValidationException $ex = null) { | ||||
| $this->validationException = $ex; | $this->validationException = $ex; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function newTailButton() { | |||||
| $button = id(new PHUIButtonView()) | |||||
| ->setTag('a') | |||||
| ->setColor(PHUIButtonView::GREY); | |||||
| $this->tailButtons[] = $button; | |||||
| return $button; | |||||
| } | |||||
| protected function getTagAttributes() { | protected function getTagAttributes() { | ||||
| $classes = array(); | $classes = array(); | ||||
| $classes[] = 'phui-box'; | $classes[] = 'phui-box'; | ||||
| $classes[] = 'phui-box-border'; | $classes[] = 'phui-box-border'; | ||||
| $classes[] = 'phui-object-box'; | $classes[] = 'phui-object-box'; | ||||
| $classes[] = 'mlt mll mlr'; | $classes[] = 'mlt mll mlr'; | ||||
| if ($this->color) { | if ($this->color) { | ||||
| ▲ Show 20 Lines • Show All 160 Lines • ▼ Show 20 Lines | $content = array( | ||||
| $pager, | $pager, | ||||
| $this->renderChildren(), | $this->renderChildren(), | ||||
| ); | ); | ||||
| if ($this->objectList) { | if ($this->objectList) { | ||||
| $content[] = $this->objectList; | $content[] = $this->objectList; | ||||
| } | } | ||||
| if ($this->tailButtons) { | |||||
| $content[] = phutil_tag( | |||||
| 'div', | |||||
| array( | |||||
| 'class' => 'phui-object-box-tail-buttons', | |||||
| ), | |||||
| $this->tailButtons); | |||||
| } | |||||
| return $content; | return $content; | ||||
| } | } | ||||
| } | } | ||||