Changeset View
Changeset View
Standalone View
Standalone View
src/view/phui/calendar/PHUICalendarMonthView.php
Show First 20 Lines • Show All 199 Lines • ▼ Show 20 Lines | final class PHUICalendarMonthView extends AphrontView { | ||||
} | } | ||||
private function renderCalendarHeader(DateTime $date) { | private function renderCalendarHeader(DateTime $date) { | ||||
$button_bar = null; | $button_bar = null; | ||||
// check for a browseURI, which means we need "fancy" prev / next UI | // check for a browseURI, which means we need "fancy" prev / next UI | ||||
$uri = $this->getBrowseURI(); | $uri = $this->getBrowseURI(); | ||||
if ($uri) { | if ($uri) { | ||||
$uri = new PhutilURI($uri); | |||||
list($prev_year, $prev_month) = $this->getPrevYearAndMonth(); | list($prev_year, $prev_month) = $this->getPrevYearAndMonth(); | ||||
$query = array('year' => $prev_year, 'month' => $prev_month); | $prev_uri = $uri.$prev_year.'/'.$prev_month.'/'; | ||||
$prev_uri = (string) $uri->setQueryParams($query); | |||||
list($next_year, $next_month) = $this->getNextYearAndMonth(); | list($next_year, $next_month) = $this->getNextYearAndMonth(); | ||||
$query = array('year' => $next_year, 'month' => $next_month); | $next_uri = $uri.$next_year.'/'.$next_month.'/'; | ||||
$next_uri = (string) $uri->setQueryParams($query); | |||||
$button_bar = new PHUIButtonBarView(); | $button_bar = new PHUIButtonBarView(); | ||||
$left_icon = id(new PHUIIconView()) | $left_icon = id(new PHUIIconView()) | ||||
->setIconFont('fa-chevron-left bluegrey'); | ->setIconFont('fa-chevron-left bluegrey'); | ||||
$left = id(new PHUIButtonView()) | $left = id(new PHUIButtonView()) | ||||
->setTag('a') | ->setTag('a') | ||||
->setColor(PHUIButtonView::GREY) | ->setColor(PHUIButtonView::GREY) | ||||
▲ Show 20 Lines • Show All 96 Lines • Show Last 20 Lines |