mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-25 00:02:41 +01:00
39e252caf5
Summary: Ref T7986, Ability to join or decline an event. Test Plan: Open Calendar event, join event, Invitee list should update. Decline event, invitee list should remove you. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: Korvin, epriestley Maniphest Tasks: T7986 Differential Revision: https://secure.phabricator.com/D12618
75 lines
1.9 KiB
PHP
75 lines
1.9 KiB
PHP
<?php
|
|
|
|
final class PhabricatorCalendarApplication extends PhabricatorApplication {
|
|
|
|
public function getName() {
|
|
return pht('Calendar');
|
|
}
|
|
|
|
public function getShortDescription() {
|
|
return pht('Upcoming Events');
|
|
}
|
|
|
|
public function getFlavorText() {
|
|
return pht('Never miss an episode ever again.');
|
|
}
|
|
|
|
public function getBaseURI() {
|
|
return '/calendar/';
|
|
}
|
|
|
|
public function getFontIcon() {
|
|
return 'fa-calendar';
|
|
}
|
|
|
|
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";
|
|
}
|
|
|
|
public function isPrototype() {
|
|
return true;
|
|
}
|
|
|
|
public function getRemarkupRules() {
|
|
return array(
|
|
new PhabricatorCalendarRemarkupRule(),
|
|
);
|
|
}
|
|
|
|
public function getRoutes() {
|
|
return array(
|
|
'/E(?P<id>[1-9]\d*)' => 'PhabricatorCalendarEventViewController',
|
|
'/calendar/' => array(
|
|
'' => 'PhabricatorCalendarViewController',
|
|
'all/' => 'PhabricatorCalendarBrowseController',
|
|
'event/' => array(
|
|
'(?:query/(?P<queryKey>[^/]+)/)?'
|
|
=> 'PhabricatorCalendarEventListController',
|
|
'create/'
|
|
=> 'PhabricatorCalendarEventEditController',
|
|
'edit/(?P<id>[1-9]\d*)/'
|
|
=> 'PhabricatorCalendarEventEditController',
|
|
'cancel/(?P<id>[1-9]\d*)/'
|
|
=> 'PhabricatorCalendarEventCancelController',
|
|
'join/(?P<id>[1-9]\d*)/'
|
|
=> 'PhabricatorCalendarEventJoinController',
|
|
),
|
|
),
|
|
);
|
|
}
|
|
|
|
public function getQuickCreateItems(PhabricatorUser $viewer) {
|
|
$items = array();
|
|
|
|
$item = id(new PHUIListItemView())
|
|
->setName(pht('Calendar Event'))
|
|
->setIcon('fa-calendar')
|
|
->setHref($this->getBaseURI().'event/create/');
|
|
$items[] = $item;
|
|
|
|
return $items;
|
|
}
|
|
|
|
}
|