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

improve calendar status editing

Summary: make it so a given user can click to edit status from calendar view. also fix bug so when editing status existing "type" is selected

Test Plan: edited status from calendar view and observed "sporadic" status sticky

Reviewers: epriestley, chad

Reviewed By: chad

CC: aran, Korvin

Maniphest Tasks: T2060, T2061

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

+23 -3
+1
src/applications/calendar/controller/PhabricatorCalendarBrowseController.php
··· 46 46 $event->setDescription( 47 47 $status->getTerseSummary($user).$details 48 48 ); 49 + $event->setEventID($status->getID()); 49 50 $month_view->addEvent($event); 50 51 } 51 52
+1
src/applications/calendar/controller/PhabricatorCalendarEditStatusController.php
··· 102 102 $status_select = id(new AphrontFormSelectControl()) 103 103 ->setLabel(pht('Status')) 104 104 ->setName('status') 105 + ->setValue($status->getStatus()) 105 106 ->setOptions($status->getStatusOptions()); 106 107 107 108 $description = id(new AphrontFormTextAreaControl())
+9
src/applications/calendar/view/AphrontCalendarEventView.php
··· 7 7 private $epochStart; 8 8 private $epochEnd; 9 9 private $description; 10 + private $eventID; 11 + 12 + public function setEventID($event_id) { 13 + $this->eventID = $event_id; 14 + return $this; 15 + } 16 + public function getEventID() { 17 + return $this->eventID; 18 + } 10 19 11 20 public function setUserPHID($user_phid) { 12 21 $this->userPHID = $user_phid;
+12 -3
src/applications/calendar/view/AphrontCalendarMonthView.php
··· 289 289 $info .= "\n\n".$event->getDescription(); 290 290 } 291 291 292 + if ($user->getPHID() == $event->getUserPHID()) { 293 + $tag = 'a'; 294 + $href = '/calendar/status/edit/'.$event->getEventID().'/'; 295 + } else { 296 + $tag = 'div'; 297 + $href = null; 298 + } 299 + 292 300 $text_div = javelin_render_tag( 293 - 'div', 301 + $tag, 294 302 array( 295 303 'sigil' => 'has-tooltip', 296 304 'meta' => array( 297 - 'tip' => $info."\n\n".implode("\n", $when), 298 - 'size' => 240, 305 + 'tip' => $info."\n\n".implode("\n", $when), 306 + 'size' => 240, 299 307 ), 300 308 'class' => 'aphront-calendar-event-text', 309 + 'href' => $href, 301 310 ), 302 311 phutil_escape_html(phutil_utf8_shorten($event->getName(), 32))); 303 312