2012-10-24 13:22:24 -07:00
|
|
|
<?php
|
|
|
|
|
|
|
|
final class PhabricatorApplicationCalendar extends PhabricatorApplication {
|
|
|
|
|
|
|
|
public function getShortDescription() {
|
|
|
|
return pht('Dates and Stuff');
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getFlavorText() {
|
|
|
|
return pht('Never miss an episode ever again.');
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getBaseURI() {
|
|
|
|
return '/calendar/';
|
|
|
|
}
|
|
|
|
|
2013-01-15 16:12:36 -08:00
|
|
|
public function getIconName() {
|
|
|
|
return 'calendar';
|
|
|
|
}
|
|
|
|
|
2012-10-24 13:22:24 -07:00
|
|
|
public function getTitleGlyph() {
|
|
|
|
// Unicode has a calendar character but it's in some distant code plane,
|
|
|
|
// use "keyboard" since it looks vaguely similar.
|
|
|
|
return "\xE2\x8C\xA8";
|
|
|
|
}
|
|
|
|
|
2013-01-15 15:41:22 -08:00
|
|
|
public function getApplicationGroup() {
|
|
|
|
return self::GROUP_COMMUNICATION;
|
|
|
|
}
|
|
|
|
|
2013-01-19 10:12:44 -08:00
|
|
|
public function isBeta() {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2012-10-24 13:22:24 -07:00
|
|
|
public function getRoutes() {
|
|
|
|
return array(
|
|
|
|
'/calendar/' => array(
|
|
|
|
'' => 'PhabricatorCalendarBrowseController',
|
2014-02-06 10:10:07 -08:00
|
|
|
'event/' => array(
|
2014-02-06 10:10:18 -08:00
|
|
|
'(?:query/(?P<queryKey>[^/]+)/)?' =>
|
|
|
|
'PhabricatorCalendarEventListController',
|
2012-10-24 13:22:24 -07:00
|
|
|
'create/' =>
|
2014-02-06 10:10:07 -08:00
|
|
|
'PhabricatorCalendarEventEditController',
|
2012-10-24 13:22:24 -07:00
|
|
|
'edit/(?P<id>[1-9]\d*)/' =>
|
2014-02-06 10:10:07 -08:00
|
|
|
'PhabricatorCalendarEventEditController',
|
|
|
|
'delete/(?P<id>[1-9]\d*)/' =>
|
|
|
|
'PhabricatorCalendarEventDeleteController',
|
2014-02-06 10:10:27 -08:00
|
|
|
'view/(?P<id>[1-9]\d*)/' =>
|
|
|
|
'PhabricatorCalendarEventViewController',
|
2012-10-24 13:22:24 -07:00
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2014-01-29 15:41:30 -08:00
|
|
|
public function getQuickCreateItems(PhabricatorUser $viewer) {
|
|
|
|
$items = array();
|
|
|
|
|
|
|
|
$item = id(new PHUIListItemView())
|
|
|
|
->setName(pht('Calendar Event'))
|
2014-01-31 15:19:39 -08:00
|
|
|
->setAppIcon('calendar-dark')
|
2014-02-06 10:10:07 -08:00
|
|
|
->setHref($this->getBaseURI().'event/create/');
|
2014-01-29 15:41:30 -08:00
|
|
|
$items[] = $item;
|
|
|
|
|
|
|
|
return $items;
|
|
|
|
}
|
|
|
|
|
2012-10-24 13:22:24 -07:00
|
|
|
}
|