Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13956851
D18299.id44000.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D18299.id44000.diff
View Options
diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -139,7 +139,7 @@
'rsrc/css/phui/object-item/phui-oi-list-view.css' => 'bf094950',
'rsrc/css/phui/object-item/phui-oi-simple-ui.css' => 'a8beebea',
'rsrc/css/phui/phui-action-list.css' => '6ee16164',
- 'rsrc/css/phui/phui-action-panel.css' => '91c7b835',
+ 'rsrc/css/phui/phui-action-panel.css' => 'b4798122',
'rsrc/css/phui/phui-badge.css' => '22c0cf4f',
'rsrc/css/phui/phui-basic-nav-view.css' => 'a0705f53',
'rsrc/css/phui/phui-big-info-view.css' => 'd13afcde',
@@ -819,7 +819,7 @@
'phortune-invoice-css' => '476055e2',
'phrequent-css' => 'ffc185ad',
'phriction-document-css' => '4282e4ad',
- 'phui-action-panel-css' => '91c7b835',
+ 'phui-action-panel-css' => 'b4798122',
'phui-badge-view-css' => '22c0cf4f',
'phui-basic-nav-view-css' => 'a0705f53',
'phui-big-info-view-css' => 'd13afcde',
diff --git a/src/applications/uiexample/examples/PHUIActionPanelExample.php b/src/applications/uiexample/examples/PHUIActionPanelExample.php
--- a/src/applications/uiexample/examples/PHUIActionPanelExample.php
+++ b/src/applications/uiexample/examples/PHUIActionPanelExample.php
@@ -11,10 +11,15 @@
}
public function renderExample() {
+ $viewer = $this->getRequest()->getUser();
$view = id(new AphrontMultiColumnView())
->setFluidLayout(true);
+ $credit = PhabricatorFile::loadBuiltin(
+ $viewer, 'projects/v3/creditcard.png');
+ $image = $credit->getBestURI();
+
/* Action Panels */
$panel1 = id(new PHUIActionPanelView())
->setIcon('fa-book')
@@ -53,7 +58,7 @@
/* Action Panels */
$panel1 = id(new PHUIActionPanelView())
- ->setIcon('fa-credit-card')
+ ->setImage($image)
->setHeader(pht('Account Balance'))
->setHref('#')
->setSubHeader(pht('You were last billed $2,245.12 on Dec 12, 2014.'))
diff --git a/src/view/phui/PHUIActionPanelView.php b/src/view/phui/PHUIActionPanelView.php
--- a/src/view/phui/PHUIActionPanelView.php
+++ b/src/view/phui/PHUIActionPanelView.php
@@ -4,6 +4,7 @@
private $href;
private $fontIcon;
+ private $image;
private $header;
private $subHeader;
private $bigText;
@@ -29,6 +30,11 @@
return $this;
}
+ public function setImage($image) {
+ $this->image = $image;
+ return $this;
+ }
+
public function setBigText($text) {
$this->bigText = $text;
return $this;
@@ -89,6 +95,21 @@
$fonticon);
}
+ if ($this->image) {
+ $image = phutil_tag(
+ 'img',
+ array(
+ 'class' => 'phui-action-panel-image',
+ 'src' => $this->image,
+ ));
+ $icon = phutil_tag(
+ 'span',
+ array(
+ 'class' => 'phui-action-panel-icon',
+ ),
+ $image);
+ }
+
$header = null;
if ($this->header) {
$header = phutil_tag(
diff --git a/webroot/rsrc/css/phui/phui-action-panel.css b/webroot/rsrc/css/phui/phui-action-panel.css
--- a/webroot/rsrc/css/phui/phui-action-panel.css
+++ b/webroot/rsrc/css/phui/phui-action-panel.css
@@ -47,6 +47,12 @@
display: table-cell;
}
+.phui-action-panel-image {
+ width: 48px;
+ height: 48px;
+ margin: 0 auto;
+}
+
.phui-action-panel-icon a {
display: block;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Oct 15, 7:19 AM (4 w, 17 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6711884
Default Alt Text
D18299.id44000.diff (3 KB)
Attached To
Mode
D18299: Add setImage to PHUIActionPanelView
Attached
Detach File
Event Timeline
Log In to Comment