1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 01:08:50 +02:00

Revert "Remove PHUICalendarWidgetView"

Summary: This reverts commit 8ce8a761ef.

Test Plan: N/A

Reviewers: chad, #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D12573
This commit is contained in:
Joshua Spence 2015-04-27 23:42:32 +10:00
parent 5b56aa3c6d
commit 14ae5eee1c
2 changed files with 41 additions and 0 deletions

View file

@ -1150,6 +1150,7 @@ phutil_register_library_map(array(
'PHUIButtonView' => 'view/phui/PHUIButtonView.php',
'PHUICalendarListView' => 'view/phui/calendar/PHUICalendarListView.php',
'PHUICalendarMonthView' => 'view/phui/calendar/PHUICalendarMonthView.php',
'PHUICalendarWidgetView' => 'view/phui/calendar/PHUICalendarWidgetView.php',
'PHUIColorPalletteExample' => 'applications/uiexample/examples/PHUIColorPalletteExample.php',
'PHUICrumbView' => 'view/phui/PHUICrumbView.php',
'PHUICrumbsView' => 'view/phui/PHUICrumbsView.php',
@ -4448,6 +4449,7 @@ phutil_register_library_map(array(
'PHUIButtonView' => 'AphrontTagView',
'PHUICalendarListView' => 'AphrontTagView',
'PHUICalendarMonthView' => 'AphrontView',
'PHUICalendarWidgetView' => 'AphrontTagView',
'PHUIColorPalletteExample' => 'PhabricatorUIExample',
'PHUICrumbView' => 'AphrontView',
'PHUICrumbsView' => 'AphrontView',

View file

@ -0,0 +1,39 @@
<?php
final class PHUICalendarWidgetView extends AphrontTagView {
private $header;
private $list;
public function setHeader($date) {
$this->header = $date;
return $this;
}
public function setCalendarList(PHUICalendarListView $list) {
$this->list = $list;
return $this;
}
protected function getTagName() {
return 'div';
}
protected function getTagAttributes() {
require_celerity_resource('phui-calendar-list-css');
return array('class' => 'phui-calendar-list-container');
}
protected function getTagContent() {
$header = id(new PHUIHeaderView())
->setHeader($this->header);
$box = id(new PHUIObjectBoxView())
->setHeader($header)
->setFlush(true)
->appendChild($this->list);
return $box;
}
}