Changeset View
Changeset View
Standalone View
Standalone View
src/view/phui/PHUIObjectItemView.php
Show First 20 Lines • Show All 324 Lines • ▼ Show 20 Lines | protected function getTagAttributes() { | ||||
if ($this->selectableName !== null && !$this->isForbidden) { | if ($this->selectableName !== null && !$this->isForbidden) { | ||||
$item_classes[] = 'phui-oi-selectable'; | $item_classes[] = 'phui-oi-selectable'; | ||||
$sigils[] = 'phui-oi-selectable'; | $sigils[] = 'phui-oi-selectable'; | ||||
Javelin::initBehavior('phui-selectable-list'); | Javelin::initBehavior('phui-selectable-list'); | ||||
} | } | ||||
if ($this->getGrippable()) { | $is_grippable = $this->getGrippable(); | ||||
if ($is_grippable !== null) { | |||||
$item_classes[] = 'phui-oi-has-grip'; | |||||
if ($is_grippable) { | |||||
$item_classes[] = 'phui-oi-grippable'; | $item_classes[] = 'phui-oi-grippable'; | ||||
} else { | |||||
$item_classes[] = 'phui-oi-ungrippable'; | |||||
} | |||||
} | } | ||||
if ($this->getImageURI()) { | if ($this->getImageURI()) { | ||||
$item_classes[] = 'phui-oi-with-image'; | $item_classes[] = 'phui-oi-with-image'; | ||||
} | } | ||||
if ($this->getImageIcon()) { | if ($this->getImageIcon()) { | ||||
$item_classes[] = 'phui-oi-with-image-icon'; | $item_classes[] = 'phui-oi-with-image-icon'; | ||||
▲ Show 20 Lines • Show All 232 Lines • ▼ Show 20 Lines | protected function getTagContent() { | ||||
$status = null; | $status = null; | ||||
if ($this->statusIcon) { | if ($this->statusIcon) { | ||||
$icon = $this->statusIcon; | $icon = $this->statusIcon; | ||||
$status = $this->renderStatusIcon($icon['icon'], $icon['label']); | $status = $this->renderStatusIcon($icon['icon'], $icon['label']); | ||||
} | } | ||||
$grippable = null; | $grippable = null; | ||||
if ($this->getGrippable()) { | if ($this->getGrippable() !== null) { | ||||
$grippable = phutil_tag( | $grippable = phutil_tag( | ||||
'div', | 'div', | ||||
array( | array( | ||||
'class' => 'phui-oi-grip', | 'class' => 'phui-oi-grip', | ||||
), | ), | ||||
''); | ''); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 252 Lines • Show Last 20 Lines |