Page MenuHomePhabricator

D18054.id43425.diff
No OneTemporary

D18054.id43425.diff

diff --git a/src/applications/diffusion/view/DiffusionHistoryListView.php b/src/applications/diffusion/view/DiffusionHistoryListView.php
--- a/src/applications/diffusion/view/DiffusionHistoryListView.php
+++ b/src/applications/diffusion/view/DiffusionHistoryListView.php
@@ -105,13 +105,14 @@
}
}
- $browse = $this->linkBrowse(
+ $browse_button = $this->linkBrowse(
$history->getPath(),
array(
'commit' => $history->getCommitIdentifier(),
'branch' => $drequest->getBranch(),
'type' => $history->getFileType(),
- ));
+ ),
+ true);
$differential_view = null;
if ($show_revisions && $commit) {
@@ -192,13 +193,6 @@
->setColor(PHUITagView::COLOR_INDIGO)
->setSlimShady(true);
- $browse_button = id(new PHUIButtonView())
- ->setText(pht('Browse'))
- ->setIcon('fa-code')
- ->setTag('a')
- ->setColor(PHUIButtonView::SIMPLE)
- ->appendChild($audit_view);
-
$item = id(new PHUIObjectItemView())
->setHeader($commit_desc)
->setHref($commit_link)
diff --git a/src/applications/diffusion/view/DiffusionView.php b/src/applications/diffusion/view/DiffusionView.php
--- a/src/applications/diffusion/view/DiffusionView.php
+++ b/src/applications/diffusion/view/DiffusionView.php
@@ -58,7 +58,10 @@
id(new PHUIIconView())->setIcon('fa-history bluegrey'));
}
- final public function linkBrowse($path, array $details = array()) {
+ final public function linkBrowse(
+ $path,
+ array $details = array(),
+ $button = false) {
require_celerity_resource('diffusion-icons-css');
Javelin::initBehavior('phabricator-tooltips');
@@ -111,6 +114,15 @@
);
}
+ if ($button) {
+ return id(new PHUIButtonView())
+ ->setText(pht('Browse'))
+ ->setIcon('fa-code')
+ ->setHref($href)
+ ->setTag('a')
+ ->setButtonType(PHUIButtonView::BUTTONTYPE_SIMPLE);
+ }
+
return javelin_tag(
'a',
array(

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 29, 3:27 PM (19 h, 20 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6805842
Default Alt Text
D18054.id43425.diff (2 KB)

Event Timeline