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

Move "Stale" / "Old" to date icon in Differential list view

Summary: Ref T3485. Moves "Stale" / "Old" to the right.

Test Plan: {F48653}

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T3485

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

+47 -23
+16 -14
src/applications/differential/view/DifferentialRevisionListView.php
··· 181 181 $item->addAttribute(pht('Reviewers: %s', $rev_fields['Reviewers'])); 182 182 183 183 $item->setStateIconColumns(1); 184 - if ($this->highlightAge) { 185 - $item->setStateIconColumns(2); 186 - $do_not_display_age = array( 187 - ArcanistDifferentialRevisionStatus::CLOSED => true, 188 - ArcanistDifferentialRevisionStatus::ABANDONED => true, 189 - ); 190 - if (isset($icons['age']) && !isset($do_not_display_age[$status])) { 191 - $item->addStateIcon($icons['age']['icon'], $icons['age']['label']); 192 - } else { 193 - $item->addStateIcon('none'); 194 - } 195 - } 196 184 197 185 if (isset($icons['draft'])) { 198 186 $item->addStateIcon( ··· 208 196 $item->addStateIcon('none'); 209 197 } 210 198 211 - // Updated on 212 - $item->addIcon('none', $rev_fields['Updated']); 199 + $time_icon = 'none'; 200 + $time_attr = array(); 201 + if ($this->highlightAge) { 202 + $do_not_display_age = array( 203 + ArcanistDifferentialRevisionStatus::CLOSED => true, 204 + ArcanistDifferentialRevisionStatus::ABANDONED => true, 205 + ); 206 + if (isset($icons['age']) && !isset($do_not_display_age[$status])) { 207 + $time_icon = $icons['age']['icon']; 208 + $time_attr = array( 209 + 'tip' => $icons['age']['label'], 210 + ); 211 + } 212 + } 213 + 214 + $item->addIcon($time_icon, $rev_fields['Updated'], $time_attr); 213 215 214 216 // First remove the fields we already have 215 217 $count = 7;
+12 -2
src/applications/phriction/controller/PhrictionHistoryController.php
··· 107 107 } 108 108 109 109 if ($vs_previous) { 110 - $item->addIcon('arrow_left', pht('Show Change'), $vs_previous); 110 + $item->addIcon( 111 + 'arrow_left', 112 + pht('Show Change'), 113 + array( 114 + 'href' => $vs_previous, 115 + )); 111 116 } else { 112 117 $item->addIcon('arrow_left-grey', 113 118 phutil_tag('em', array(), pht('No previous change'))); 114 119 } 115 120 116 121 if ($vs_head) { 117 - $item->addIcon('merge', pht('Show Later Changes'), $vs_head); 122 + $item->addIcon( 123 + 'merge', 124 + pht('Show Later Changes'), 125 + array( 126 + 'href' => $vs_head, 127 + )); 118 128 } else { 119 129 $item->addIcon('merge-grey', 120 130 phutil_tag('em', array(), pht('No later changes')));
+1 -1
src/applications/project/controller/PhabricatorProjectListController.php
··· 114 114 ->setHeader($row[0]) 115 115 ->setHref($row[1]) 116 116 ->addIcon($row[3], $row[2]) 117 - ->addIcon('edit', pht('Edit Project'), $row[7]); 117 + ->addIcon('edit', pht('Edit Project'), array('href' => $row[7])); 118 118 if ($row[4]) { 119 119 $item->addAttribute($row[4]); 120 120 }
+18 -6
src/view/layout/PhabricatorObjectItemView.php
··· 104 104 return $this; 105 105 } 106 106 107 - public function addIcon($icon, $label = null, $href = null) { 107 + public function addIcon($icon, $label = null, $attributes = array()) { 108 108 $this->icons[] = array( 109 109 'icon' => $icon, 110 110 'label' => $label, 111 - 'href' => $href, 111 + 'attributes' => $attributes, 112 112 ); 113 113 return $this; 114 114 } ··· 254 254 foreach ($this->icons as $spec) { 255 255 $icon = $spec['icon']; 256 256 257 - $icon = phutil_tag( 257 + $sigil = null; 258 + $meta = null; 259 + if (isset($spec['attributes']['tip'])) { 260 + $sigil = 'has-tooltip'; 261 + $meta = array( 262 + 'tip' => $spec['attributes']['tip'], 263 + 'align' => 'W', 264 + ); 265 + } 266 + 267 + $icon = javelin_tag( 258 268 'span', 259 269 array( 260 270 'class' => 'phabricator-object-item-icon-image '. 261 271 'sprite-icons icons-'.$icon, 272 + 'sigil' => $sigil, 273 + 'meta' => $meta, 262 274 ), 263 275 ''); 264 276 ··· 269 281 ), 270 282 $spec['label']); 271 283 272 - if ($spec['href']) { 284 + if (isset($spec['attributes']['href'])) { 273 285 $icon_href = phutil_tag( 274 286 'a', 275 - array('href' => $spec['href']), 287 + array('href' => $spec['attributes']['href']), 276 288 array($label, $icon)); 277 289 } else { 278 290 $icon_href = array($label, $icon); ··· 284 296 $classes[] = 'phabricator-object-item-icon-none'; 285 297 } 286 298 287 - $icon_list[] = phutil_tag( 299 + $icon_list[] = javelin_tag( 288 300 'li', 289 301 array( 290 302 'class' => implode(' ', $classes),