Changeset View
Changeset View
Standalone View
Standalone View
src/view/phui/calendar/PHUICalendarListView.php
Show First 20 Lines • Show All 66 Lines • ▼ Show 20 Lines | foreach ($this->events as $event) { | ||||
$class = 'phui-calendar-list-item'; | $class = 'phui-calendar-list-item'; | ||||
if ($event->getViewerIsInvited()) { | if ($event->getViewerIsInvited()) { | ||||
$class = $class.' phui-calendar-viewer-invited'; | $class = $class.' phui-calendar-viewer-invited'; | ||||
} | } | ||||
if ($event->getIsAllDay()) { | if ($event->getIsAllDay()) { | ||||
$class = $class.' all-day'; | $class = $class.' all-day'; | ||||
} | } | ||||
$singletons[] = phutil_tag( | $content = phutil_tag( | ||||
'li', | 'a', | ||||
array( | array( | ||||
'class' => $class, | 'href' => '/E'.$event->getEventID(), | ||||
), | ), | ||||
epriestley: (I don't think this ended up being used, it was just some junk I added.) | |||||
array( | array( | ||||
$dot, | $dot, | ||||
$time, | $time, | ||||
$title, | $title, | ||||
)); | )); | ||||
$singletons[] = phutil_tag( | |||||
'li', | |||||
array( | |||||
'class' => $class, | |||||
), | |||||
$content); | |||||
} | } | ||||
if (empty($singletons)) { | if (empty($singletons)) { | ||||
$singletons[] = phutil_tag( | $singletons[] = phutil_tag( | ||||
'li', | 'li', | ||||
array( | array( | ||||
'class' => 'phui-calendar-list-item-empty', | 'class' => 'phui-calendar-list-item-empty', | ||||
), | ), | ||||
▲ Show 20 Lines • Show All 49 Lines • ▼ Show 20 Lines | private function renderEventLink($event) { | ||||
$description = $event->getDescription(); | $description = $event->getDescription(); | ||||
if (strlen($description) == 0) { | if (strlen($description) == 0) { | ||||
$description = pht('(%s)', $event->getName()); | $description = pht('(%s)', $event->getName()); | ||||
} | } | ||||
$class = 'phui-calendar-item'; | $class = 'phui-calendar-item'; | ||||
$anchor = javelin_tag( | $anchor = javelin_tag( | ||||
'a', | 'span', | ||||
array( | array( | ||||
'sigil' => 'has-tooltip', | 'sigil' => 'has-tooltip', | ||||
'class' => $class, | 'class' => $class, | ||||
'href' => '/E'.$event->getEventID(), | |||||
'meta' => array( | 'meta' => array( | ||||
'tip' => $tip, | 'tip' => $tip, | ||||
'size' => 200, | 'size' => 200, | ||||
), | ), | ||||
), | ), | ||||
$event->getName()); | $event->getName()); | ||||
return $anchor; | return $anchor; | ||||
Show All 11 Lines |
(I don't think this ended up being used, it was just some junk I added.)