Page MenuHomePhabricator

D17950.diff
No OneTemporary

D17950.diff

diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -9,7 +9,7 @@
'names' => array(
'conpherence.pkg.css' => 'ff161f2d',
'conpherence.pkg.js' => 'b5b51108',
- 'core.pkg.css' => '4937a7d7',
+ 'core.pkg.css' => '0ab752b2',
'core.pkg.js' => 'a0c8fb20',
'darkconsole.pkg.js' => '1f9a31bc',
'differential.pkg.css' => '52b014e7',
@@ -173,7 +173,7 @@
'rsrc/css/phui/phui-spacing.css' => '042804d6',
'rsrc/css/phui/phui-status.css' => 'd5263e49',
'rsrc/css/phui/phui-tag-view.css' => 'cc4fd402',
- 'rsrc/css/phui/phui-timeline-view.css' => '1d7ef61d',
+ 'rsrc/css/phui/phui-timeline-view.css' => '313c7f22',
'rsrc/css/phui/phui-two-column-view.css' => 'ce9fa0b7',
'rsrc/css/phui/workboards/phui-workboard-color.css' => '783cdff5',
'rsrc/css/phui/workboards/phui-workboard.css' => '3bc85455',
@@ -880,7 +880,7 @@
'phui-status-list-view-css' => 'd5263e49',
'phui-tag-view-css' => 'cc4fd402',
'phui-theme-css' => '9f261c6b',
- 'phui-timeline-view-css' => '1d7ef61d',
+ 'phui-timeline-view-css' => '313c7f22',
'phui-two-column-view-css' => 'ce9fa0b7',
'phui-workboard-color-css' => '783cdff5',
'phui-workboard-view-css' => '3bc85455',
diff --git a/src/applications/uiexample/examples/PHUITimelineExample.php b/src/applications/uiexample/examples/PHUITimelineExample.php
--- a/src/applications/uiexample/examples/PHUITimelineExample.php
+++ b/src/applications/uiexample/examples/PHUITimelineExample.php
@@ -80,13 +80,35 @@
->setTitle(pht('Minor Red Event'))
->setColor(PhabricatorTransactions::COLOR_RED);
+ // Pinboard!!
+ $pin1 = id(new PHUIPinboardItemView())
+ ->setUser($user)
+ ->setHeader('user0.png')
+ ->setImageURI(celerity_get_resource_uri('/rsrc/image/people/user0.png'))
+ ->setURI(celerity_get_resource_uri('/rsrc/image/people/user0.png'))
+ ->setImageSize(280, 210);
+
+ $pin2 = id(new PHUIPinboardItemView())
+ ->setUser($user)
+ ->setHeader('user1.png')
+ ->setImageURI(celerity_get_resource_uri('/rsrc/image/people/user1.png'))
+ ->setURI(celerity_get_resource_uri('/rsrc/image/people/user1.png'))
+ ->setImageSize(280, 210);
+
+ $pin3 = id(new PHUIPinboardItemView())
+ ->setUser($user)
+ ->setHeader('user2.png')
+ ->setImageURI(celerity_get_resource_uri('/rsrc/image/people/user2.png'))
+ ->setURI(celerity_get_resource_uri('/rsrc/image/people/user1.png'))
+ ->setImageSize(280, 210);
+
$events[] = id(new PHUITimelineEventView())
->setUserHandle($handle)
- ->setIcon('fa-check')
- ->setTitle(pht('Historically Important Action'))
- ->setColor(PhabricatorTransactions::COLOR_BLACK)
- ->setReallyMajorEvent(true);
-
+ ->setIcon('fa-camera-retro')
+ ->setTitle(pht('Pinboard Image Event'))
+ ->addPinboardItem($pin1)
+ ->addPinboardItem($pin2)
+ ->addPinboardItem($pin3);
$events[] = id(new PHUITimelineEventView())
->setUserHandle($handle)
@@ -102,12 +124,6 @@
->appendChild(str_repeat(pht('Long Text Body').' ', 64))
->setColor(PhabricatorTransactions::COLOR_ORANGE);
- $events[] = id(new PHUITimelineEventView())
- ->setUserHandle($handle)
- ->setTitle(str_repeat('LongTextEventNoSpaces', 1024))
- ->appendChild(str_repeat('LongTextNoSpaces', 1024))
- ->setColor(PhabricatorTransactions::COLOR_RED);
-
$colors = array(
PhabricatorTransactions::COLOR_RED,
PhabricatorTransactions::COLOR_ORANGE,
diff --git a/src/view/phui/PHUITimelineEventView.php b/src/view/phui/PHUITimelineEventView.php
--- a/src/view/phui/PHUITimelineEventView.php
+++ b/src/view/phui/PHUITimelineEventView.php
@@ -28,6 +28,7 @@
private $hideCommentOptions = false;
private $authorPHID;
private $badges = array();
+ private $pinboardItems = array();
public function setAuthorPHID($author_phid) {
$this->authorPHID = $author_phid;
@@ -190,6 +191,11 @@
return $this->hideCommentOptions;
}
+ public function addPinboardItem(PHUIPinboardItemView $item) {
+ $this->pinboardItems[] = $item;
+ return $this;
+ }
+
public function setToken($token, $removed = false) {
$this->token = $token;
$this->tokenRemoved = $removed;
@@ -441,12 +447,21 @@
),
$content);
+ // Image Events
+ $pinboard = null;
+ if ($this->pinboardItems) {
+ $pinboard = new PHUIPinboardView();
+ foreach ($this->pinboardItems as $item) {
+ $pinboard->addItem($item);
+ }
+ }
+
$content = phutil_tag(
'div',
array(
'class' => implode(' ', $content_classes),
),
- array($image, $badges, $wedge, $content));
+ array($image, $badges, $wedge, $content, $pinboard));
$outer_classes = $this->classes;
$outer_classes[] = 'phui-timeline-shell';
diff --git a/webroot/rsrc/css/phui/phui-timeline-view.css b/webroot/rsrc/css/phui/phui-timeline-view.css
--- a/webroot/rsrc/css/phui/phui-timeline-view.css
+++ b/webroot/rsrc/css/phui/phui-timeline-view.css
@@ -429,3 +429,9 @@
.phui-comment-preview-view {
margin-bottom: 20px;
}
+
+.phui-timeline-view .phui-pinboard-view {
+ margin: 8px 0 0 0;
+ padding: 0;
+ text-align: left;
+}

File Metadata

Mime Type
text/plain
Expires
Fri, Jun 7, 9:42 PM (2 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6289796
Default Alt Text
D17950.diff (5 KB)

Event Timeline