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

Have Browse button in History actually work

Summary: Ref T12780. Makes the button do something useful, like link to the history at the right spot in the graph.

Test Plan: Click on various browse buttons, get correct url.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T12780

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

+16 -10
+3 -9
src/applications/diffusion/view/DiffusionHistoryListView.php
··· 105 105 } 106 106 } 107 107 108 - $browse = $this->linkBrowse( 108 + $browse_button = $this->linkBrowse( 109 109 $history->getPath(), 110 110 array( 111 111 'commit' => $history->getCommitIdentifier(), 112 112 'branch' => $drequest->getBranch(), 113 113 'type' => $history->getFileType(), 114 - )); 114 + ), 115 + true); 115 116 116 117 $differential_view = null; 117 118 if ($show_revisions && $commit) { ··· 191 192 ->setType(PHUITagView::TYPE_SHADE) 192 193 ->setColor(PHUITagView::COLOR_INDIGO) 193 194 ->setSlimShady(true); 194 - 195 - $browse_button = id(new PHUIButtonView()) 196 - ->setText(pht('Browse')) 197 - ->setIcon('fa-code') 198 - ->setTag('a') 199 - ->setColor(PHUIButtonView::SIMPLE) 200 - ->appendChild($audit_view); 201 195 202 196 $item = id(new PHUIObjectItemView()) 203 197 ->setHeader($commit_desc)
+13 -1
src/applications/diffusion/view/DiffusionView.php
··· 58 58 id(new PHUIIconView())->setIcon('fa-history bluegrey')); 59 59 } 60 60 61 - final public function linkBrowse($path, array $details = array()) { 61 + final public function linkBrowse( 62 + $path, 63 + array $details = array(), 64 + $button = false) { 62 65 require_celerity_resource('diffusion-icons-css'); 63 66 Javelin::initBehavior('phabricator-tooltips'); 64 67 ··· 109 112 'tip' => $tip, 110 113 'align' => 'E', 111 114 ); 115 + } 116 + 117 + if ($button) { 118 + return id(new PHUIButtonView()) 119 + ->setText(pht('Browse')) 120 + ->setIcon('fa-code') 121 + ->setHref($href) 122 + ->setTag('a') 123 + ->setButtonType(PHUIButtonView::BUTTONTYPE_SIMPLE); 112 124 } 113 125 114 126 return javelin_tag(