Changeset View
Changeset View
Standalone View
Standalone View
src/applications/dashboard/editor/PhabricatorDashboardEditEngine.php
Show First 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | protected function getObjectName() { | ||||
return pht('Dashboard'); | return pht('Dashboard'); | ||||
} | } | ||||
protected function getObjectViewURI($object) { | protected function getObjectViewURI($object) { | ||||
return $object->getURI(); | return $object->getURI(); | ||||
} | } | ||||
protected function buildCustomEditFields($object) { | protected function buildCustomEditFields($object) { | ||||
$layout_options = PhabricatorDashboardLayoutMode::getLayoutModeMap(); | |||||
$fields = array( | $fields = array( | ||||
id(new PhabricatorTextEditField()) | id(new PhabricatorTextEditField()) | ||||
->setKey('name') | ->setKey('name') | ||||
->setLabel(pht('Name')) | ->setLabel(pht('Name')) | ||||
->setDescription(pht('Name of the dashboard.')) | ->setDescription(pht('Name of the dashboard.')) | ||||
->setConduitDescription(pht('Rename the dashboard.')) | ->setConduitDescription(pht('Rename the dashboard.')) | ||||
->setConduitTypeDescription(pht('New dashboard name.')) | ->setConduitTypeDescription(pht('New dashboard name.')) | ||||
->setTransactionType( | ->setTransactionType( | ||||
Show All 13 Lines | $fields = array( | ||||
id(new PhabricatorSelectEditField()) | id(new PhabricatorSelectEditField()) | ||||
->setKey('layout') | ->setKey('layout') | ||||
->setLabel(pht('Layout')) | ->setLabel(pht('Layout')) | ||||
->setDescription(pht('Dashboard layout mode.')) | ->setDescription(pht('Dashboard layout mode.')) | ||||
->setConduitDescription(pht('Change the dashboard layout mode.')) | ->setConduitDescription(pht('Change the dashboard layout mode.')) | ||||
->setConduitTypeDescription(pht('New dashboard layout mode.')) | ->setConduitTypeDescription(pht('New dashboard layout mode.')) | ||||
->setTransactionType( | ->setTransactionType( | ||||
PhabricatorDashboardLayoutTransaction::TRANSACTIONTYPE) | PhabricatorDashboardLayoutTransaction::TRANSACTIONTYPE) | ||||
->setOptions( | ->setOptions($layout_options) | ||||
PhabricatorDashboardLayoutConfig::getLayoutModeSelectOptions()) | |||||
->setValue($object->getRawLayoutMode()), | ->setValue($object->getRawLayoutMode()), | ||||
); | ); | ||||
return $fields; | return $fields; | ||||
} | } | ||||
} | } |