1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-18 21:02:41 +01:00

End Cap for Timeline

Summary: End-cap for timeline. Fixes T4438

Test Plan: Tested on a timeline with and without endcap.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: aran, epriestley, Korvin, chad, btrahan

Maniphest Tasks: T4438

Differential Revision: https://secure.phabricator.com/D8530
This commit is contained in:
Chad Little 2014-03-14 08:51:50 -07:00
parent 6bda39aaad
commit 3257372585
5 changed files with 39 additions and 4 deletions

View file

@ -148,7 +148,7 @@ return array(
'rsrc/css/phui/phui-status.css' => '2f562399', 'rsrc/css/phui/phui-status.css' => '2f562399',
'rsrc/css/phui/phui-tag-view.css' => '295d81c4', 'rsrc/css/phui/phui-tag-view.css' => '295d81c4',
'rsrc/css/phui/phui-text.css' => '23e9b4b7', 'rsrc/css/phui/phui-text.css' => '23e9b4b7',
'rsrc/css/phui/phui-timeline-view.css' => 'd3ccba00', 'rsrc/css/phui/phui-timeline-view.css' => 'cd93f227',
'rsrc/css/phui/phui-workboard-view.css' => 'bf70dd2e', 'rsrc/css/phui/phui-workboard-view.css' => 'bf70dd2e',
'rsrc/css/phui/phui-workpanel-view.css' => '97b69459', 'rsrc/css/phui/phui-workpanel-view.css' => '97b69459',
'rsrc/css/sprite-actions.css' => '969ad0e5', 'rsrc/css/sprite-actions.css' => '969ad0e5',
@ -765,7 +765,7 @@ return array(
'phui-status-list-view-css' => '2f562399', 'phui-status-list-view-css' => '2f562399',
'phui-tag-view-css' => '295d81c4', 'phui-tag-view-css' => '295d81c4',
'phui-text-css' => '23e9b4b7', 'phui-text-css' => '23e9b4b7',
'phui-timeline-view-css' => 'd3ccba00', 'phui-timeline-view-css' => 'cd93f227',
'phui-workboard-view-css' => 'bf70dd2e', 'phui-workboard-view-css' => 'bf70dd2e',
'phui-workpanel-view-css' => '97b69459', 'phui-workpanel-view-css' => '97b69459',
'policy-css' => '957ea14c', 'policy-css' => '957ea14c',

View file

@ -55,6 +55,7 @@ final class PhabricatorProjectEditMainController
$timeline = id(new PhabricatorApplicationTransactionView()) $timeline = id(new PhabricatorApplicationTransactionView())
->setUser($viewer) ->setUser($viewer)
->setObjectPHID($project->getPHID()) ->setObjectPHID($project->getPHID())
->setShouldTerminate(true)
->setTransactions($xactions); ->setTransactions($xactions);
return $this->buildApplicationPage( return $this->buildApplicationPage(

View file

@ -11,6 +11,7 @@ class PhabricatorApplicationTransactionView extends AphrontView {
private $showEditActions = true; private $showEditActions = true;
private $isPreview; private $isPreview;
private $objectPHID; private $objectPHID;
private $shouldTerminate = false;
public function setObjectPHID($object_phid) { public function setObjectPHID($object_phid) {
$this->objectPHID = $object_phid; $this->objectPHID = $object_phid;
@ -51,6 +52,11 @@ class PhabricatorApplicationTransactionView extends AphrontView {
return $this; return $this;
} }
public function setShouldTerminate($term) {
$this->shouldTerminate = $term;
return $this;
}
public function buildEvents($with_hiding = false) { public function buildEvents($with_hiding = false) {
$user = $this->getUser(); $user = $this->getUser();
@ -126,6 +132,7 @@ class PhabricatorApplicationTransactionView extends AphrontView {
} }
$view = new PHUITimelineView(); $view = new PHUITimelineView();
$view->setShouldTerminate($this->shouldTerminate);
$events = $this->buildEvents($with_hiding = true); $events = $this->buildEvents($with_hiding = true);
foreach ($events as $event) { foreach ($events as $event) {
$view->addEvent($event); $view->addEvent($event);

View file

@ -4,12 +4,18 @@ final class PHUITimelineView extends AphrontView {
private $events = array(); private $events = array();
private $id; private $id;
private $shouldTerminate = false;
public function setID($id) { public function setID($id) {
$this->id = $id; $this->id = $id;
return $this; return $this;
} }
public function setShouldTerminate($term) {
$this->shouldTerminate = $term;
return $this;
}
public function addEvent(PHUITimelineEventView $event) { public function addEvent(PHUITimelineEventView $event) {
$this->events[] = $event; $this->events[] = $event;
return $this; return $this;
@ -91,6 +97,10 @@ final class PHUITimelineView extends AphrontView {
$events = array($spacer); $events = array($spacer);
} }
if ($this->shouldTerminate) {
$events[] = self::renderEnder(true);
}
return phutil_tag( return phutil_tag(
'div', 'div',
array( array(
@ -109,4 +119,15 @@ final class PHUITimelineView extends AphrontView {
), ),
''); '');
} }
public static function renderEnder() {
return phutil_tag(
'div',
array(
'class' => 'phui-timeline-event-view '.
'the-worlds-end',
),
'');
}
} }

View file

@ -34,7 +34,14 @@
.device-desktop .phui-timeline-spacer { .device-desktop .phui-timeline-spacer {
min-height: 16px; min-height: 16px;
border-width: 0 0 0 1px; }
.device-desktop .phui-timeline-event-view.the-worlds-end {
background: {$lightblueborder};
width: 9px;
height: 9px;
border-radius: 2px;
margin-left: 74px;
} }
.device-desktop .phui-timeline-wedge { .device-desktop .phui-timeline-wedge {
@ -267,5 +274,4 @@
text-align: center; text-align: center;
padding: 12px; padding: 12px;
color: {$darkgreytext}; color: {$darkgreytext};
margin-top: 16px;
} }