Page MenuHomePhabricator

D16230.diff
No OneTemporary

D16230.diff

diff --git a/src/applications/base/PhabricatorApplication.php b/src/applications/base/PhabricatorApplication.php
--- a/src/applications/base/PhabricatorApplication.php
+++ b/src/applications/base/PhabricatorApplication.php
@@ -183,7 +183,8 @@
$item = id(new PHUIListItemView())
->setName($article['name'])
->setIcon('fa-book')
- ->setHref($article['href']);
+ ->setHref($article['href'])
+ ->setOpenInNewWindow(true);
$items[] = $item;
}
@@ -203,7 +204,8 @@
$item = id(new PHUIListItemView())
->setName($spec['name'])
->setIcon('fa-envelope-o')
- ->setHref($href);
+ ->setHref($href)
+ ->setOpenInNewWindow(true);
$items[] = $item;
}
}
diff --git a/src/view/phui/PHUIListItemView.php b/src/view/phui/PHUIListItemView.php
--- a/src/view/phui/PHUIListItemView.php
+++ b/src/view/phui/PHUIListItemView.php
@@ -29,8 +29,18 @@
private $indented;
private $hideInApplicationMenu;
private $icons = array();
+ private $openInNewWindow = false;
- public function setHideInApplicationMenu($hide) {
+ public function setOpenInNewWindow($open_in_new_window) {
+ $this->openInNewWindow = $open_in_new_window;
+ return $this;
+ }
+
+ public function getOpenInNewWindow() {
+ return $this->openInNewWindow;
+ }
+
+ public function setHideInApplicationMenu($hide) {
$this->hideInApplicationMenu = $hide;
return $this;
}
@@ -294,6 +304,7 @@
'class' => implode(' ', $classes),
'meta' => $meta,
'sigil' => $sigil,
+ 'target' => $this->getOpenInNewWindow() ? '_blank' : null,
),
array(
$aural,

File Metadata

Mime Type
text/plain
Expires
Wed, Oct 23, 9:09 PM (3 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6734672
Default Alt Text
D16230.diff (1 KB)

Event Timeline