diff --git a/src/applications/ponder/constants/PonderQuestionStatus.php b/src/applications/ponder/constants/PonderQuestionStatus.php index 917539f81b..61a446353e 100644 --- a/src/applications/ponder/constants/PonderQuestionStatus.php +++ b/src/applications/ponder/constants/PonderQuestionStatus.php @@ -7,9 +7,6 @@ final class PonderQuestionStatus extends PonderConstants { const STATUS_CLOSED_OBSOLETE = 'obsolete'; const STATUS_CLOSED_DUPLICATE = 'duplicate'; - const ANSWER_STATUS_VISIBLE = 'visible'; - const ANSWER_STATUS_HIDDEN = 'hidden'; - public static function getQuestionStatusMap() { return array( self::STATUS_OPEN => pht('Open'), @@ -89,20 +86,4 @@ final class PonderQuestionStatus extends PonderConstants { ); } - public static function getAnswerStatusMap() { - return array( - self::ANSWER_STATUS_VISIBLE => pht('Visible'), - self::ANSWER_STATUS_HIDDEN => pht('Hidden'), - ); - } - - public static function getAnswerStatusName($status) { - $map = array( - self::ANSWER_STATUS_VISIBLE => pht('Visible'), - self::ANSWER_STATUS_HIDDEN => pht('Hidden'), - ); - return idx($map, $status, pht('Unknown')); - } - - } diff --git a/src/applications/ponder/controller/PonderQuestionEditController.php b/src/applications/ponder/controller/PonderQuestionEditController.php index 71b9615cca..41123d6049 100644 --- a/src/applications/ponder/controller/PonderQuestionEditController.php +++ b/src/applications/ponder/controller/PonderQuestionEditController.php @@ -68,9 +68,11 @@ final class PonderQuestionEditController extends PonderController { ->setTransactionType(PonderQuestionTransaction::TYPE_CONTENT) ->setNewValue($v_content); - $xactions[] = id(clone $template) - ->setTransactionType(PonderQuestionTransaction::TYPE_STATUS) - ->setNewValue($v_status); + if (!$is_new) { + $xactions[] = id(clone $template) + ->setTransactionType(PonderQuestionTransaction::TYPE_STATUS) + ->setNewValue($v_status); + } $xactions[] = id(clone $template) ->setTransactionType(PhabricatorTransactions::TYPE_VIEW_POLICY) diff --git a/src/applications/ponder/controller/PonderQuestionViewController.php b/src/applications/ponder/controller/PonderQuestionViewController.php index a1e526648d..06f924510f 100644 --- a/src/applications/ponder/controller/PonderQuestionViewController.php +++ b/src/applications/ponder/controller/PonderQuestionViewController.php @@ -171,23 +171,26 @@ final class PonderQuestionViewController extends PonderController { $view->invokeWillRenderEvent(); - $view->addSectionHeader( + $details = PhabricatorMarkupEngine::renderOneObject( + $question, + $question->getMarkupField(), + $viewer); + + if ($details) { + $view->addSectionHeader( pht('Details'), PHUIPropertyListView::ICON_SUMMARY); - $view->addTextContent( - array( - phutil_tag( - 'div', - array( - 'class' => 'phabricator-remarkup', - ), - PhabricatorMarkupEngine::renderOneObject( - $question, - $question->getMarkupField(), - $viewer)), - )); - + $view->addTextContent( + array( + phutil_tag( + 'div', + array( + 'class' => 'phabricator-remarkup', + ), + $details), + )); + } return $view; }