1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-22 10:18:48 +02:00
phorge-phorge/src/applications/calendar/controller/PhabricatorCalendarController.php
lkassianik 50240eda03 Create button should be a dropdown with public and private options
Summary: Ref T8026, Create button should be a dropdown with public and private options

Test Plan: Create both a public and private event. Confirm view policies apply correctly.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8026

Differential Revision: https://secure.phabricator.com/D13033
2015-05-27 11:11:11 -07:00

29 lines
867 B
PHP

<?php
abstract class PhabricatorCalendarController extends PhabricatorController {
protected function buildApplicationCrumbs() {
$crumbs = parent::buildApplicationCrumbs();
$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'));
$crumbs->addAction(
id(new PHUIListItemView())
->setName(pht('Create Event'))
->setHref($this->getApplicationURI().'event/create/')
->setIcon('fa-plus-square')
->setDropdownMenu($actions));
return $crumbs;
}
}