mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-13 10:22:42 +01:00
b2f3001ec4
Summary: The removes the sprite sheet 'icons' and replaces it with FontAwesome fonts. Test Plan: - Grep for SPRITE_ICONS and replace - Grep for sprite-icons and replace - Grep for PhabricatorActionList and choose all new icons - Grep for Crumbs and fix icons - Test/Replace PHUIList Icon support - Test/Replace ObjectList Icon support (foot, epoch, etc) - Browse as many pages as I could get to - Remove sprite-icons and move remarkup to own sheet - Review this diff in Differential Reviewers: btrahan, epriestley Reviewed By: epriestley Subscribers: epriestley, Korvin, hach-que Differential Revision: https://secure.phabricator.com/D9052
45 lines
1.2 KiB
PHP
45 lines
1.2 KiB
PHP
<?php
|
|
|
|
abstract class PhabricatorMacroController
|
|
extends PhabricatorController {
|
|
|
|
protected function buildSideNavView($for_app = false) {
|
|
$nav = new AphrontSideNavFilterView();
|
|
$nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
|
|
|
|
if ($for_app) {
|
|
$nav->addLabel(pht('Create'));
|
|
$nav->addFilter('',
|
|
pht('Create Macro'),
|
|
$this->getApplicationURI('/create/'));
|
|
}
|
|
|
|
id(new PhabricatorMacroSearchEngine())
|
|
->setViewer($this->getRequest()->getUser())
|
|
->addNavigationItems($nav->getMenu());
|
|
|
|
return $nav;
|
|
}
|
|
|
|
public function buildApplicationMenu() {
|
|
return $this->buildSideNavView($for_app = true)->getMenu();
|
|
}
|
|
|
|
protected function buildApplicationCrumbs() {
|
|
$crumbs = parent::buildApplicationCrumbs();
|
|
|
|
$can_manage = $this->hasApplicationCapability(
|
|
PhabricatorMacroCapabilityManage::CAPABILITY);
|
|
|
|
$crumbs->addAction(
|
|
id(new PHUIListItemView())
|
|
->setName(pht('Create Macro'))
|
|
->setHref($this->getApplicationURI('/create/'))
|
|
->setIcon('fa-plus-square')
|
|
->setDisabled(!$can_manage)
|
|
->setWorkflow(!$can_manage));
|
|
|
|
return $crumbs;
|
|
}
|
|
|
|
}
|