Changeset View
Changeset View
Standalone View
Standalone View
src/applications/maniphest/editor/ManiphestEditEngine.php
Show First 20 Lines • Show All 63 Lines • ▼ Show 20 Lines | final class ManiphestEditEngine | ||||
protected function getCommentViewHeaderText($object) { | protected function getCommentViewHeaderText($object) { | ||||
return pht('Weigh In'); | return pht('Weigh In'); | ||||
} | } | ||||
protected function getCommentViewButtonText($object) { | protected function getCommentViewButtonText($object) { | ||||
return pht('Set Sail for Adventure'); | return pht('Set Sail for Adventure'); | ||||
} | } | ||||
/** | |||||
* Set a placeholder text in the comment field. | |||||
* | |||||
* @param string PHID of the current object the comment field is | |||||
* displayed in to allow defining rendering conditions | |||||
* @return string Placeholder text to display in comment field | |||||
*/ | |||||
public function getCommentFieldPlaceholderText($object_phid) { | |||||
$viewer = $this->getViewer(); | |||||
$query = id(new ManiphestTaskQuery()) | |||||
->setViewer($viewer) | |||||
->needSubscriberPHIDs(false) | |||||
->needProjectPHIDs(false); | |||||
$query->withPHIDs(array($object_phid)); | |||||
$task = $query->executeOne(); | |||||
if ($task->getStatus() === ManiphestTaskStatus::STATUS_CLOSED_DUPLICATE) { | |||||
return pht('This task is closed as a duplicate. '. | |||||
'Only comment here if you think that this task is not a duplicate.'); | |||||
} | |||||
return ''; | |||||
} | |||||
protected function getObjectViewURI($object) { | protected function getObjectViewURI($object) { | ||||
return '/'.$object->getMonogram(); | return '/'.$object->getMonogram(); | ||||
} | } | ||||
protected function buildCustomEditFields($object) { | protected function buildCustomEditFields($object) { | ||||
$status_map = $this->getTaskStatusMap($object); | $status_map = $this->getTaskStatusMap($object); | ||||
$priority_map = $this->getTaskPriorityMap($object); | $priority_map = $this->getTaskPriorityMap($object); | ||||
▲ Show 20 Lines • Show All 470 Lines • Show Last 20 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0