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

Show event icons in header instead of property list

Summary:
Ref T11326. Currently, events show the icon as a property, like this:

> Icon: Default

This is boring and terrible. Show the icon in the header instead:

{F1723530}

Also minor cleanup on active/cancel states.

Test Plan: Viewed an event, saw icon.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11326

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

+11 -12
+11 -12
src/applications/calendar/controller/PhabricatorCalendarEventViewController.php
··· 68 68 $viewer = $this->getViewer(); 69 69 $id = $event->getID(); 70 70 71 - $is_cancelled = $event->getIsCancelled(); 72 - $icon = $is_cancelled ? ('fa-ban') : ('fa-check'); 73 - $color = $is_cancelled ? ('red') : ('bluegrey'); 74 - $status = $is_cancelled ? pht('Cancelled') : pht('Active'); 71 + if ($event->isCancelledEvent()) { 72 + $icon = 'fa-ban'; 73 + $color = 'red'; 74 + $status = pht('Cancelled'); 75 + } else { 76 + $icon = 'fa-check'; 77 + $color = 'bluegrey'; 78 + $status = pht('Active'); 79 + } 75 80 76 81 $invite_status = $event->getUserInviteStatus($viewer->getPHID()); 77 82 $status_invited = PhabricatorCalendarEventInvitee::STATUS_INVITED; ··· 82 87 ->setHeader($event->getName()) 83 88 ->setStatus($icon, $color, $status) 84 89 ->setPolicyObject($event) 85 - ->setHeaderIcon('fa-calendar'); 90 + ->setHeaderIcon($event->getIcon()); 86 91 87 92 if ($is_invite_pending) { 88 93 $decline_button = id(new PHUIButtonView()) ··· 108 113 private function buildCurtain(PhabricatorCalendarEvent $event) { 109 114 $viewer = $this->getRequest()->getUser(); 110 115 $id = $event->getID(); 111 - $is_cancelled = $event->isCancelledEvent(); 112 116 $is_attending = $event->getIsUserAttending($viewer->getPHID()); 113 117 114 118 $can_edit = PhabricatorPolicyFilter::hasCapability( ··· 169 173 $reinstate_label = pht('Reinstate Event'); 170 174 } 171 175 172 - if ($is_cancelled) { 176 + if ($event->isCancelledEvent()) { 173 177 $curtain->addAction( 174 178 id(new PhabricatorActionView()) 175 179 ->setName($reinstate_label) ··· 301 305 $invitee_list); 302 306 303 307 $properties->invokeWillRenderEvent(); 304 - 305 - $properties->addProperty( 306 - pht('Icon'), 307 - id(new PhabricatorCalendarIconSet()) 308 - ->getIconLabel($event->getIcon())); 309 308 310 309 return $properties; 311 310 }