Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/editor/DiffusionURIEditEngine.php
Show First 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | protected function getObjectCreateTitleText($object) { | ||||
return pht('Create Repository URI'); | return pht('Create Repository URI'); | ||||
} | } | ||||
protected function getObjectCreateButtonText($object) { | protected function getObjectCreateButtonText($object) { | ||||
return pht('Create Repository URI'); | return pht('Create Repository URI'); | ||||
} | } | ||||
protected function getObjectEditTitleText($object) { | protected function getObjectEditTitleText($object) { | ||||
return pht('Edit Repository URI: %s', $object->getDisplayURI()); | return pht('Edit Repository URI %d', $object->getID()); | ||||
} | } | ||||
protected function getObjectEditShortText($object) { | protected function getObjectEditShortText($object) { | ||||
return $object->getDisplayURI(); | return pht('URI %d', $object->getID()); | ||||
} | } | ||||
protected function getObjectCreateShortText() { | protected function getObjectCreateShortText() { | ||||
return pht('Create Repository URI'); | return pht('Create Repository URI'); | ||||
} | } | ||||
protected function getObjectName() { | protected function getObjectName() { | ||||
return pht('Repository URI'); | return pht('Repository URI'); | ||||
} | } | ||||
protected function getObjectViewURI($object) { | protected function getObjectViewURI($object) { | ||||
$repository = $this->getRepository(); | return $object->getViewURI(); | ||||
return $repository->getPathURI('manage/uris/'); | |||||
} | } | ||||
protected function buildCustomEditFields($object) { | protected function buildCustomEditFields($object) { | ||||
$viewer = $this->getViewer(); | $viewer = $this->getViewer(); | ||||
return array( | return array( | ||||
id(new PhabricatorTextEditField()) | id(new PhabricatorTextEditField()) | ||||
->setKey('uri') | ->setKey('uri') | ||||
->setLabel(pht('URI')) | ->setLabel(pht('URI')) | ||||
->setIsRequired(true) | ->setIsRequired(true) | ||||
->setTransactionType(PhabricatorRepositoryURITransaction::TYPE_URI) | ->setTransactionType(PhabricatorRepositoryURITransaction::TYPE_URI) | ||||
->setDescription(pht('The repository URI.')) | ->setDescription(pht('The repository URI.')) | ||||
->setConduitDescription(pht('Change the repository URI.')) | ->setConduitDescription(pht('Change the repository URI.')) | ||||
->setConduitTypeDescription(pht('New repository URI.')) | ->setConduitTypeDescription(pht('New repository URI.')) | ||||
->setValue($object->getURI()), | ->setValue($object->getURI()), | ||||
id(new PhabricatorSelectEditField()) | |||||
->setKey('io') | |||||
->setLabel(pht('I/O Type')) | |||||
->setTransactionType(PhabricatorRepositoryURITransaction::TYPE_IO) | |||||
->setDescription(pht('URI I/O behavior.')) | |||||
->setConduitDescription(pht('Adjust I/O behavior.')) | |||||
->setConduitTypeDescription(pht('New I/O behavior.')) | |||||
->setValue($object->getIOType()) | |||||
->setOptions($object->getAvailableIOTypeOptions()), | |||||
id(new PhabricatorSelectEditField()) | |||||
->setKey('display') | |||||
->setLabel(pht('Display Type')) | |||||
->setTransactionType(PhabricatorRepositoryURITransaction::TYPE_DISPLAY) | |||||
->setDescription(pht('URI display behavior.')) | |||||
->setConduitDescription(pht('Change display behavior.')) | |||||
->setConduitTypeDescription(pht('New display behavior.')) | |||||
->setValue($object->getDisplayType()) | |||||
->setOptions($object->getAvailableDisplayTypeOptions()), | |||||
); | ); | ||||
} | } | ||||
} | } |