Add PhabricatorBadgeArchiveController
Summary: Allows archive and activate on badges from action list. Ref T9414 Test Plan: Archive, Activate, New, Edit Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Maniphest Tasks: T9414 Differential Revision: https://secure.phabricator.com/D14727
This commit is contained in:
@@ -24,7 +24,7 @@ final class PhabricatorBadgesViewController
|
||||
$crumbs->addTextCrumb($badge->getName());
|
||||
$title = $badge->getName();
|
||||
|
||||
if ($badge->isClosed()) {
|
||||
if ($badge->isArchived()) {
|
||||
$status_icon = 'fa-ban';
|
||||
$status_color = 'dark';
|
||||
} else {
|
||||
@@ -138,9 +138,26 @@ final class PhabricatorBadgesViewController
|
||||
->setName(pht('Edit Badge'))
|
||||
->setIcon('fa-pencil')
|
||||
->setDisabled(!$can_edit)
|
||||
->setWorkflow(!$can_edit)
|
||||
->setHref($this->getApplicationURI("/edit/{$id}/")));
|
||||
|
||||
if ($badge->isArchived()) {
|
||||
$view->addAction(
|
||||
id(new PhabricatorActionView())
|
||||
->setName(pht('Activate Badge'))
|
||||
->setIcon('fa-check')
|
||||
->setDisabled(!$can_edit)
|
||||
->setWorkflow($can_edit)
|
||||
->setHref($this->getApplicationURI("/archive/{$id}/")));
|
||||
} else {
|
||||
$view->addAction(
|
||||
id(new PhabricatorActionView())
|
||||
->setName(pht('Archive Badge'))
|
||||
->setIcon('fa-ban')
|
||||
->setDisabled(!$can_edit)
|
||||
->setWorkflow($can_edit)
|
||||
->setHref($this->getApplicationURI("/archive/{$id}/")));
|
||||
}
|
||||
|
||||
$view->addAction(
|
||||
id(new PhabricatorActionView())
|
||||
->setName('Manage Recipients')
|
||||
|
||||
Reference in New Issue
Block a user