Changeset View
Changeset View
Standalone View
Standalone View
src/view/phui/calendar/PHUICalendarMonthView.php
Show First 20 Lines • Show All 183 Lines • ▼ Show 20 Lines | return phutil_tag( | ||||
), | ), | ||||
$cell_data_div); | $cell_data_div); | ||||
} | } | ||||
private function getDayNumberCell($event_list) { | private function getDayNumberCell($event_list) { | ||||
$class = $event_list['class']; | $class = $event_list['class']; | ||||
$date = $event_list['date']; | $date = $event_list['date']; | ||||
$cell_day_secret_link = null; | $cell_day_secret_link = null; | ||||
$week_number = null; | |||||
if ($date) { | if ($date) { | ||||
$uri = $event_list['uri']; | $uri = $event_list['uri']; | ||||
$cell_day_secret_link = $this->getHiddenDayLink($uri); | $cell_day_secret_link = $this->getHiddenDayLink($uri); | ||||
$cell_day = phutil_tag( | $cell_day = phutil_tag( | ||||
'a', | 'a', | ||||
array( | array( | ||||
'class' => 'phui-calendar-date-number', | 'class' => 'phui-calendar-date-number', | ||||
'href' => $uri, | 'href' => $uri, | ||||
), | ), | ||||
$date->format('j')); | $date->format('j')); | ||||
if ($date->format('w') == 1) { | |||||
$week_number = phutil_tag( | |||||
'a', | |||||
array( | |||||
'class' => 'phui-calendar-week-number', | |||||
'href' => $uri, | |||||
), | |||||
$date->format('W')); | |||||
} | |||||
} else { | } else { | ||||
$cell_day = null; | $cell_day = null; | ||||
} | } | ||||
if ($date && $date->format('j') == $this->day) { | if ($date && $date->format('j') == $this->day) { | ||||
$today_class = 'phui-calendar-today-slot phui-calendar-today'; | $today_class = 'phui-calendar-today-slot phui-calendar-today'; | ||||
} else { | } else { | ||||
$today_class = 'phui-calendar-today-slot'; | $today_class = 'phui-calendar-today-slot'; | ||||
Show All 17 Lines | private function getDayNumberCell($event_list) { | ||||
$cell_div = phutil_tag( | $cell_div = phutil_tag( | ||||
'div', | 'div', | ||||
array( | array( | ||||
'class' => 'phui-calendar-month-cell-div', | 'class' => 'phui-calendar-month-cell-div', | ||||
), | ), | ||||
array( | array( | ||||
$cell_day_secret_link, | $cell_day_secret_link, | ||||
$week_number, | |||||
$cell_day, | $cell_day, | ||||
$today_slot, | $today_slot, | ||||
)); | )); | ||||
return phutil_tag( | return phutil_tag( | ||||
'td', | 'td', | ||||
array( | array( | ||||
'class' => 'phui-calendar-date-number-container '.$class, | 'class' => 'phui-calendar-date-number-container '.$class, | ||||
▲ Show 20 Lines • Show All 305 Lines • Show Last 20 Lines |