Differential D20902 Diff 49821 src/applications/dashboard/engine/PhabricatorDashboardPanelRenderingEngine.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/dashboard/engine/PhabricatorDashboardPanelRenderingEngine.php
| Show First 20 Lines • Show All 323 Lines • ▼ Show 20 Lines | private function addPanelHeaderActions( | ||||
| $viewer = $this->getViewer(); | $viewer = $this->getViewer(); | ||||
| $panel = $this->getPanel(); | $panel = $this->getPanel(); | ||||
| $context_phid = $this->getContextPHID(); | $context_phid = $this->getContextPHID(); | ||||
| $actions = array(); | $actions = array(); | ||||
| if ($panel) { | if ($panel) { | ||||
| try { | |||||
| $panel_actions = $panel->newHeaderEditActions( | $panel_actions = $panel->newHeaderEditActions( | ||||
| $viewer, | $viewer, | ||||
| $context_phid); | $context_phid); | ||||
| } catch (Exception $ex) { | |||||
| $error_action = id(new PhabricatorActionView()) | |||||
| ->setIcon('fa-exclamation-triangle red') | |||||
| ->setName(pht('<Rendering Exception>')); | |||||
| $panel_actions[] = $error_action; | |||||
| } | |||||
| if ($panel_actions) { | if ($panel_actions) { | ||||
| foreach ($panel_actions as $panel_action) { | foreach ($panel_actions as $panel_action) { | ||||
| $actions[] = $panel_action; | $actions[] = $panel_action; | ||||
| } | } | ||||
| $actions[] = id(new PhabricatorActionView()) | $actions[] = id(new PhabricatorActionView()) | ||||
| ->setType(PhabricatorActionView::TYPE_DIVIDER); | ->setType(PhabricatorActionView::TYPE_DIVIDER); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 103 Lines • Show Last 20 Lines | |||||