Differential D20474 Diff 48879 src/applications/dashboard/paneltype/PhabricatorDashboardQueryPanelType.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/dashboard/paneltype/PhabricatorDashboardQueryPanelType.php
Show First 20 Lines • Show All 230 Lines • ▼ Show 20 Lines | if (!$engine->canUseInPanelContext()) { | ||||
'Application search engines of class "%s" can not be used to build '. | 'Application search engines of class "%s" can not be used to build '. | ||||
'dashboard panels.', | 'dashboard panels.', | ||||
$class)); | $class)); | ||||
} | } | ||||
return $engine; | return $engine; | ||||
} | } | ||||
public function newHeaderEditActions( | |||||
PhabricatorDashboardPanel $panel, | |||||
PhabricatorUser $viewer, | |||||
$context_phid) { | |||||
$actions = array(); | |||||
$engine = $this->getSearchEngine($panel); | |||||
$customize_uri = $engine->getCustomizeURI( | |||||
$panel->getProperty('key'), | |||||
$panel->getPHID(), | |||||
$context_phid); | |||||
$actions[] = id(new PhabricatorActionView()) | |||||
->setIcon('fa-pencil-square-o') | |||||
->setName(pht('Customize Query')) | |||||
->setWorkflow(true) | |||||
->setHref($customize_uri); | |||||
return $actions; | |||||
} | |||||
} | } |