Changeset View
Changeset View
Standalone View
Standalone View
src/applications/settings/editor/PhabricatorSettingsEditEngine.php
Show First 20 Lines • Show All 57 Lines • ▼ Show 20 Lines | protected function getObjectCreateTitleText($object) { | ||||
return pht('Create Settings'); | return pht('Create Settings'); | ||||
} | } | ||||
protected function getObjectCreateButtonText($object) { | protected function getObjectCreateButtonText($object) { | ||||
return pht('Create Settings'); | return pht('Create Settings'); | ||||
} | } | ||||
protected function getObjectEditTitleText($object) { | protected function getObjectEditTitleText($object) { | ||||
$user = $object->getUser(); | $page = $this->getSelectedPage(); | ||||
if ($user) { | |||||
return pht('Edit Settings (%s)', $user->getUserName()); | if ($page) { | ||||
} else { | return $page->getLabel(); | ||||
return pht('Edit Global Settings'); | |||||
} | } | ||||
return pht('Settings'); | |||||
} | } | ||||
protected function getObjectEditShortText($object) { | protected function getObjectEditShortText($object) { | ||||
if (!$object->getUser()) { | if (!$object->getUser()) { | ||||
return pht('Global Defaults'); | return pht('Global Defaults'); | ||||
} else { | } else { | ||||
if ($this->getIsSelfEdit()) { | if ($this->getIsSelfEdit()) { | ||||
return pht('Personal Settings'); | return pht('Personal Settings'); | ||||
Show All 12 Lines | protected function getObjectName() { | ||||
if ($page) { | if ($page) { | ||||
return $page->getLabel(); | return $page->getLabel(); | ||||
} | } | ||||
return pht('Settings'); | return pht('Settings'); | ||||
} | } | ||||
protected function getPageHeader($object) { | |||||
$user = $object->getUser(); | |||||
if ($user) { | |||||
$text = pht('Edit Settings (%s)', $user->getUserName()); | |||||
} else { | |||||
$text = pht('Edit Global Settings'); | |||||
} | |||||
$header = id(new PHUIHeaderView()) | |||||
->setHeader($text); | |||||
return $header; | |||||
} | |||||
protected function getEditorURI() { | protected function getEditorURI() { | ||||
throw new PhutilMethodNotImplementedException(); | throw new PhutilMethodNotImplementedException(); | ||||
} | } | ||||
protected function getObjectCreateCancelURI($object) { | protected function getObjectCreateCancelURI($object) { | ||||
return '/settings/'; | return '/settings/'; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 134 Lines • Show Last 20 Lines |