@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Hide answer box if you asked the question in Ponder

Summary: Fixes T9241. Users have a tendancy to assume Ponder is a "forum", make replying to your own question take an additional click.

Test Plan:
View my own question, see notice, click open answer box, reply. Visit not my question, see box as normal.

{F743412}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: cspeckmim, Korvin

Maniphest Tasks: T9241

Differential Revision: https://secure.phabricator.com/D13957

+40 -2
+40 -2
src/applications/ponder/view/PonderAddAnswerView.php
··· 34 34 $info_panel = null; 35 35 if ($question->getStatus() != PonderQuestionStatus::STATUS_OPEN) { 36 36 $info_panel = id(new PHUIInfoView()) 37 - ->setSeverity(PHUIInfoView::SEVERITY_WARNING) 37 + ->setSeverity(PHUIInfoView::SEVERITY_NOTICE) 38 38 ->appendChild( 39 39 pht( 40 40 'This question has been marked as closed, 41 41 but you can still leave a new answer.')); 42 42 } 43 43 44 + $box_style = null; 45 + $own_question = null; 46 + $hide_action_id = celerity_generate_unique_node_id(); 47 + $show_action_id = celerity_generate_unique_node_id(); 48 + if ($question->getAuthorPHID() == $viewer->getPHID()) { 49 + $box_style = 'display: none;'; 50 + $open_link = javelin_tag( 51 + 'a', 52 + array( 53 + 'sigil' => 'reveal-content', 54 + 'class' => 'mml', 55 + 'id' => $hide_action_id, 56 + 'href' => '#', 57 + 'meta' => array( 58 + 'showIDs' => array($show_action_id), 59 + 'hideIDs' => array($hide_action_id), 60 + ), 61 + ), 62 + pht('Add an answer.')); 63 + $own_question = id(new PHUIInfoView()) 64 + ->setSeverity(PHUIInfoView::SEVERITY_WARNING) 65 + ->setID($hide_action_id) 66 + ->appendChild( 67 + pht( 68 + 'This is your own question. You are welcome to provide 69 + an answer if you have found a resolution.')) 70 + ->appendChild($open_link); 71 + } 72 + 44 73 $header = id(new PHUIHeaderView()) 45 74 ->setHeader(pht('Add Answer')); 46 75 ··· 69 98 $box->setInfoView($info_panel); 70 99 } 71 100 72 - return $box; 101 + $box = phutil_tag( 102 + 'div', 103 + array( 104 + 'style' => $box_style, 105 + 'class' => 'mlt', 106 + 'id' => $show_action_id, 107 + ), 108 + $box); 109 + 110 + return array($own_question, $box); 73 111 } 74 112 }