Changeset View
Changeset View
Standalone View
Standalone View
src/view/phui/PHUIHovercardView.php
Show First 20 Lines • Show All 106 Lines • ▼ Show 20 Lines | protected function getTagContent() { | ||||
if ($this->tags) { | if ($this->tags) { | ||||
foreach ($this->tags as $tag) { | foreach ($this->tags as $tag) { | ||||
$header->addActionItem($tag); | $header->addActionItem($tag); | ||||
} | } | ||||
} | } | ||||
$body = array(); | $body = array(); | ||||
$body_title = null; | |||||
if ($this->detail) { | if ($this->detail) { | ||||
$body_title = $this->detail; | $body_title = $this->detail; | ||||
} else { | } else if (!$this->fields) { | ||||
// Fallback for object handles | // Fallback for object handles | ||||
$body_title = $handle->getFullName(); | $body_title = $handle->getFullName(); | ||||
} | } | ||||
if ($body_title) { | |||||
epriestley: What about common and useful title "0"?! | |||||
chadAuthorUnsubmitted Not Done Inline Actionsdammit chad: dammit | |||||
$body[] = phutil_tag_div('phui-hovercard-body-header', $body_title); | $body[] = phutil_tag_div('phui-hovercard-body-header', $body_title); | ||||
} | |||||
foreach ($this->fields as $field) { | foreach ($this->fields as $field) { | ||||
$item = array( | $item = array( | ||||
phutil_tag('strong', array(), $field['label']), | phutil_tag('strong', array(), $field['label']), | ||||
': ', | ': ', | ||||
phutil_tag('span', array(), $field['value']), | phutil_tag('span', array(), $field['value']), | ||||
); | ); | ||||
$body[] = phutil_tag_div('phui-hovercard-body-item', $item); | $body[] = phutil_tag_div('phui-hovercard-body-item', $item); | ||||
▲ Show 20 Lines • Show All 77 Lines • Show Last 20 Lines |
What about common and useful title "0"?!