Build a basic calendar view
Summary:
This is a very small step toward building a Status and possibly an Oncall tool.
Build a calendar view which renders months.
Much of my hesitance to bang these tools out is that dealing with
dates/calendaring is basically horrible, so I'm trying to ease into it.
This calendar is locale-aware and all that jazz.
Test Plan:
- See:
https://secure.phabricator.com/file/view/PHID-FILE-c07a9c663a7d040d2529/
- Verified that months have the right number of days, today is the right day
of the week, months begin on the day after previous months end on, etc.
Reviewed By: aran
Reviewers: jungejason, tuomaspelkonen, aran
Commenters: cwbeck, jungejason
CC: blair, aran, epriestley, cwbeck, jungejason
Differential Revision: 791
2011-08-08 03:26:31 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
abstract class PhabricatorCalendarController extends PhabricatorController {
|
|
|
|
|
2015-01-06 21:34:58 +01:00
|
|
|
protected function buildApplicationCrumbs() {
|
2014-02-18 01:08:50 +01:00
|
|
|
$crumbs = parent::buildApplicationCrumbs();
|
|
|
|
|
2015-05-27 20:11:11 +02:00
|
|
|
$actions = id(new PhabricatorActionListView())
|
|
|
|
->setUser($this->getViewer())
|
|
|
|
->addAction(
|
|
|
|
id(new PhabricatorActionView())
|
|
|
|
->setName(pht('Create Private Event'))
|
|
|
|
->setHref('/calendar/event/create/?mode=private'))
|
|
|
|
->addAction(
|
|
|
|
id(new PhabricatorActionView())
|
|
|
|
->setName(pht('Create Public Event'))
|
|
|
|
->setHref('/calendar/event/create/?mode=public'));
|
|
|
|
|
2014-02-18 01:08:50 +01:00
|
|
|
$crumbs->addAction(
|
|
|
|
id(new PHUIListItemView())
|
|
|
|
->setName(pht('Create Event'))
|
2015-05-01 02:09:45 +02:00
|
|
|
->setHref($this->getApplicationURI().'event/create/')
|
2015-05-27 20:11:11 +02:00
|
|
|
->setIcon('fa-plus-square')
|
|
|
|
->setDropdownMenu($actions));
|
2014-02-18 01:08:50 +01:00
|
|
|
|
|
|
|
return $crumbs;
|
|
|
|
}
|
|
|
|
|
Build a basic calendar view
Summary:
This is a very small step toward building a Status and possibly an Oncall tool.
Build a calendar view which renders months.
Much of my hesitance to bang these tools out is that dealing with
dates/calendaring is basically horrible, so I'm trying to ease into it.
This calendar is locale-aware and all that jazz.
Test Plan:
- See:
https://secure.phabricator.com/file/view/PHID-FILE-c07a9c663a7d040d2529/
- Verified that months have the right number of days, today is the right day
of the week, months begin on the day after previous months end on, etc.
Reviewed By: aran
Reviewers: jungejason, tuomaspelkonen, aran
Commenters: cwbeck, jungejason
CC: blair, aran, epriestley, cwbeck, jungejason
Differential Revision: 791
2011-08-08 03:26:31 +02:00
|
|
|
}
|