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

Make D3123 more consistent

Summary:
Put the function in the base class so all the Diffusion views
can use it. Also use shinier tooltips.

Test Plan: Browse Diffusion.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

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

+24 -17
-13
src/applications/diffusion/view/DiffusionBrowseTableView.php
··· 34 34 return $this; 35 35 } 36 36 37 - private static function renderName($name) { 38 - $email = new PhutilEmailAddress($name); 39 - if ($email->getDisplayName() || $email->getDomainName()) { 40 - return phutil_render_tag( 41 - 'span', 42 - array( 43 - 'title' => $email->getAddress(), 44 - ), 45 - phutil_escape_html($email->getDisplayName())); 46 - } 47 - return phutil_escape_html($name); 48 - } 49 - 50 37 public function setUser(PhabricatorUser $user) { 51 38 $this->user = $user; 52 39 return $this;
+2 -2
src/applications/diffusion/view/DiffusionHistoryTableView.php
··· 108 108 if ($author_phid && isset($handles[$author_phid])) { 109 109 $author = $handles[$author_phid]->renderLink(); 110 110 } else { 111 - $author = phutil_escape_html($history->getAuthorName()); 111 + $author = self::renderName($history->getAuthorName()); 112 112 } 113 113 114 114 $different_committer = false; ··· 121 121 if ($committer_phid && isset($handles[$committer_phid])) { 122 122 $committer = $handles[$committer_phid]->renderLink(); 123 123 } else { 124 - $committer = phutil_escape_html($committer); 124 + $committer = self::renderName($committer); 125 125 } 126 126 $author .= '/'.$committer; 127 127 }
+2 -2
src/applications/diffusion/view/DiffusionTagListView.php
··· 84 84 if ($commit && $commit->getAuthorPHID()) { 85 85 $author = $this->handles[$commit->getAuthorPHID()]->renderLink(); 86 86 } else if ($commit && $commit->getCommitData()) { 87 - $author = phutil_escape_html($commit->getCommitData()->getAuthorName()); 87 + $author = self::renderName($commit->getCommitData()->getAuthorName()); 88 88 } else { 89 - $author = phutil_escape_html($tag->getAuthor()); 89 + $author = self::renderName($tag->getAuthor()); 90 90 } 91 91 92 92 $description = null;
+20
src/applications/diffusion/view/DiffusionView.php
··· 147 147 "D{$id}"); 148 148 } 149 149 150 + final protected static function renderName($name) { 151 + $email = new PhutilEmailAddress($name); 152 + if ($email->getDisplayName() || $email->getDomainName()) { 153 + Javelin::initBehavior('phabricator-tooltips', array()); 154 + require_celerity_resource('aphront-tooltip-css'); 155 + return javelin_render_tag( 156 + 'span', 157 + array( 158 + 'sigil' => 'has-tooltip', 159 + 'meta' => array( 160 + 'tip' => $email->getAddress(), 161 + 'align' => 'E', 162 + 'size' => 'auto', 163 + ), 164 + ), 165 + phutil_escape_html($email->getDisplayName())); 166 + } 167 + return phutil_escape_html($name); 168 + } 169 + 150 170 }