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

Fix Up Paste transactions

Summary: We're using the wrong constants here, bad copy and paste job. Also add colors, icons.

Test Plan: Archive a Paste, check transactions.

Reviewers: epriestley

Subscribers: Korvin

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

+27 -3
+27 -3
src/applications/paste/storage/PhabricatorPasteTransaction.php
··· 55 55 case self::TYPE_LANGUAGE: 56 56 return 'fa-pencil'; 57 57 break; 58 + case self::TYPE_STATUS: 59 + $new = $this->getNewValue(); 60 + switch ($new) { 61 + case PhabricatorPaste::STATUS_ACTIVE: 62 + return 'fa-check'; 63 + case PhabricatorPaste::STATUS_ARCHIVED: 64 + return 'fa-ban'; 65 + } 66 + break; 58 67 } 59 68 return parent::getIcon(); 60 69 } ··· 91 100 $this->renderHandleLink($author_phid)); 92 101 break; 93 102 case self::TYPE_STATUS: 94 - return pht( 95 - "%s updated the paste's status.", 96 - $this->renderHandleLink($author_phid)); 103 + switch ($new) { 104 + case PhabricatorPaste::STATUS_ACTIVE: 105 + return pht( 106 + '%s activated this paste.', 107 + $this->renderHandleLink($author_phid)); 108 + case PhabricatorPaste::STATUS_ARCHIVED: 109 + return pht( 110 + '%s archived this paste.', 111 + $this->renderHandleLink($author_phid)); 112 + } 97 113 break; 98 114 99 115 } ··· 161 177 switch ($this->getTransactionType()) { 162 178 case self::TYPE_CONTENT: 163 179 return PhabricatorTransactions::COLOR_GREEN; 180 + case self::TYPE_STATUS: 181 + switch ($new) { 182 + case PhabricatorPaste::STATUS_ACTIVE: 183 + return 'green'; 184 + case PhabricatorPaste::STATUS_ARCHIVED: 185 + return 'indigo'; 186 + } 187 + break; 164 188 } 165 189 166 190 return parent::getColor();