@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.

Use action list and property list elements in Ponder

Summary: This is sort of silly as-is, but automatically exposes flagging and will give subscribe/unsubscribe and "Subscribers" a place to plug into shortly. For context, see D3637 and T1808.

Test Plan: {F20550}

Reviewers: pieter, btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1808

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

+41 -12
+36
src/applications/ponder/controller/PonderQuestionViewController.php
··· 52 52 } 53 53 54 54 $handles = $this->loadViewerHandles($object_phids); 55 + $this->loadHandles($object_phids); 55 56 56 57 $detail_panel = new PonderQuestionDetailView(); 57 58 $detail_panel ··· 72 73 ->setUser($user) 73 74 ->setActionURI("/ponder/answer/add/"); 74 75 76 + $header = id(new PhabricatorHeaderView()) 77 + ->setObjectName('Q'.$question->getID()) 78 + ->setHeader($question->getTitle()); 79 + 80 + $actions = $this->buildActionListView($question); 81 + $properties = $this->buildPropertyListView($question); 82 + 75 83 $nav = $this->buildSideNavView($question); 76 84 $nav->appendChild( 77 85 array( 86 + $header, 87 + $actions, 88 + $properties, 78 89 $detail_panel, 79 90 $responses_panel, 80 91 $answer_add_panel ··· 88 99 'device' => true, 89 100 'title' => 'Q'.$question->getID().' '.$question->getTitle() 90 101 )); 102 + } 103 + 104 + private function buildActionListView(PonderQuestion $question) { 105 + $viewer = $this->getRequest()->getUser(); 106 + $view = new PhabricatorActionListView(); 107 + 108 + $view->setUser($viewer); 109 + $view->setObject($question); 110 + 111 + return $view; 112 + } 113 + 114 + private function buildPropertyListView(PonderQuestion $question) { 115 + $viewer = $this->getRequest()->getUser(); 116 + $view = new PhabricatorPropertyListView(); 117 + 118 + $view->addProperty( 119 + pht('Author'), 120 + $this->getHandle($question->getAuthorPHID())->renderLink()); 121 + 122 + $view->addProperty( 123 + pht('Created'), 124 + phabricator_datetime($question->getDateCreated(), $viewer)); 125 + 126 + return $view; 91 127 } 92 128 }
+1 -12
src/applications/ponder/view/PonderQuestionDetailView.php
··· 45 45 $user = $this->user; 46 46 47 47 $panel = id(new AphrontPanelView()) 48 - ->addClass("ponder-panel") 49 - ->setHeader( 50 - $this->renderObjectLink().' '. 51 - phutil_escape_html($question->getTitle())); 48 + ->addClass("ponder-panel"); 52 49 53 50 $contentview = new PonderPostBodyView(); 54 51 $contentview ··· 71 68 $panel->appendChild($commentview); 72 69 73 70 return $panel->render(); 74 - } 75 - 76 - private function renderObjectLink() { 77 - return phutil_render_tag( 78 - 'a', 79 - array('href' => '/Q' . $this->question->getID()), 80 - "Q". phutil_escape_html($this->question->getID()) 81 - ); 82 71 } 83 72 84 73 }
+4
src/view/layout/PhabricatorActionListView.php
··· 53 53 54 54 $actions = $event->getValue('actions'); 55 55 56 + if (!$actions) { 57 + return null; 58 + } 59 + 56 60 require_celerity_resource('phabricator-action-list-view-css'); 57 61 return phutil_render_tag( 58 62 'ul',