mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-14 10:52:41 +01:00
50240eda03
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
29 lines
867 B
PHP
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;
|
|
}
|
|
|
|
}
|