Page MenuHomePhabricator

D15387.id37102.diff
No OneTemporary

D15387.id37102.diff

diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -7,7 +7,7 @@
*/
return array(
'names' => array(
- 'core.pkg.css' => 'd5d34907',
+ 'core.pkg.css' => 'dd1447be',
'core.pkg.js' => '7d8faf57',
'darkconsole.pkg.js' => 'e7393ebb',
'differential.pkg.css' => '2de124c9',
@@ -152,10 +152,10 @@
'rsrc/css/phui/phui-remarkup-preview.css' => '1a8f2591',
'rsrc/css/phui/phui-segment-bar-view.css' => '46342871',
'rsrc/css/phui/phui-spacing.css' => '042804d6',
- 'rsrc/css/phui/phui-status.css' => '888cedb8',
+ 'rsrc/css/phui/phui-status.css' => '37309046',
'rsrc/css/phui/phui-tag-view.css' => '9d5d4400',
'rsrc/css/phui/phui-timeline-view.css' => '2efceff8',
- 'rsrc/css/phui/phui-two-column-view.css' => '64355d16',
+ 'rsrc/css/phui/phui-two-column-view.css' => 'd0ad8c10',
'rsrc/css/phui/workboards/phui-workboard-color.css' => 'ac6fe6a7',
'rsrc/css/phui/workboards/phui-workboard.css' => 'e6d89647',
'rsrc/css/phui/workboards/phui-workcard.css' => '3646fb96',
@@ -839,11 +839,11 @@
'phui-remarkup-preview-css' => '1a8f2591',
'phui-segment-bar-view-css' => '46342871',
'phui-spacing-css' => '042804d6',
- 'phui-status-list-view-css' => '888cedb8',
+ 'phui-status-list-view-css' => '37309046',
'phui-tag-view-css' => '9d5d4400',
'phui-theme-css' => '027ba77e',
'phui-timeline-view-css' => '2efceff8',
- 'phui-two-column-view-css' => '64355d16',
+ 'phui-two-column-view-css' => 'd0ad8c10',
'phui-workboard-color-css' => 'ac6fe6a7',
'phui-workboard-view-css' => 'e6d89647',
'phui-workcard-view-css' => '3646fb96',
diff --git a/src/applications/calendar/controller/PhabricatorCalendarEventViewController.php b/src/applications/calendar/controller/PhabricatorCalendarEventViewController.php
--- a/src/applications/calendar/controller/PhabricatorCalendarEventViewController.php
+++ b/src/applications/calendar/controller/PhabricatorCalendarEventViewController.php
@@ -52,7 +52,8 @@
$title = 'E'.$event->getID();
$page_title = $title.' '.$event->getName();
$crumbs = $this->buildApplicationCrumbs();
- $crumbs->addTextCrumb($title, '/E'.$event->getID());
+ $crumbs->addTextCrumb($title);
+ $crumbs->setBorder(true);
}
if (!$event->getIsGhostEvent()) {
@@ -63,12 +64,9 @@
$header = $this->buildHeaderView($event);
$actions = $this->buildActionView($event);
- $properties = $this->buildPropertyView($event);
-
- $properties->setActionList($actions);
- $box = id(new PHUIObjectBoxView())
- ->setHeader($header)
- ->addPropertyList($properties);
+ $properties = $this->buildPropertyListView($event);
+ $details = $this->buildPropertySection($event);
+ $description = $this->buildDescriptionView($event);
$is_serious = PhabricatorEnv::getEnvConfig('phabricator.serious-business');
$add_comment_header = $is_serious
@@ -90,26 +88,32 @@
->setAction($comment_uri)
->setSubmitButtonName(pht('Add Comment'));
- return $this->buildApplicationPage(
- array(
- $crumbs,
- $box,
- $timeline,
- $add_comment_form,
- ),
- array(
- 'title' => $page_title,
- 'pageObjects' => array($event->getPHID()),
+ $view = id(new PHUITwoColumnView())
+ ->setHeader($header)
+ ->setMainColumn($timeline)
+ ->setPropertyList($properties)
+ ->addPropertySection(pht('DETAILS'), $details)
+ ->addPropertySection(pht('DESCRIPTION'), $description)
+ ->setActionList($actions);
+
+ return $this->newPage()
+ ->setTitle($page_title)
+ ->setCrumbs($crumbs)
+ ->setPageObjectPHIDs(array($event->getPHID()))
+ ->appendChild(
+ array(
+ $view,
));
}
- private function buildHeaderView(PhabricatorCalendarEvent $event) {
- $viewer = $this->getRequest()->getUser();
+ private function buildHeaderView(
+ PhabricatorCalendarEvent $event) {
+ $viewer = $this->getViewer();
$id = $event->getID();
$is_cancelled = $event->getIsCancelled();
- $icon = $is_cancelled ? ('fa-times') : ('fa-calendar');
- $color = $is_cancelled ? ('grey') : ('green');
+ $icon = $is_cancelled ? ('fa-ban') : ('fa-check');
+ $color = $is_cancelled ? ('red') : ('bluegrey');
$status = $is_cancelled ? pht('Cancelled') : pht('Active');
$invite_status = $event->getUserInviteStatus($viewer->getPHID());
@@ -120,7 +124,8 @@
->setUser($viewer)
->setHeader($event->getName())
->setStatus($icon, $color, $status)
- ->setPolicyObject($event);
+ ->setPolicyObject($event)
+ ->setHeaderIcon('fa-calendar');
if ($is_invite_pending) {
$decline_button = id(new PHUIButtonView())
@@ -245,13 +250,26 @@
return $actions;
}
- private function buildPropertyView(PhabricatorCalendarEvent $event) {
- $viewer = $this->getRequest()->getUser();
+ private function buildPropertyListView(
+ PhabricatorCalendarEvent $event) {
+ $viewer = $this->getViewer();
$properties = id(new PHUIPropertyListView())
->setUser($viewer)
->setObject($event);
+ $properties->invokeWillRenderEvent();
+
+ return $properties;
+ }
+
+ private function buildPropertySection(
+ PhabricatorCalendarEvent $event) {
+ $viewer = $this->getViewer();
+
+ $properties = id(new PHUIPropertyListView())
+ ->setUser($viewer);
+
if ($event->getIsAllDay()) {
$date_start = phabricator_date($event->getDateFrom(), $viewer);
$date_end = phabricator_date($event->getDateTo(), $viewer);
@@ -362,16 +380,23 @@
id(new PhabricatorCalendarIconSet())
->getIconLabel($event->getIcon()));
+ return $properties;
+ }
+
+ private function buildDescriptionView(
+ PhabricatorCalendarEvent $event) {
+ $viewer = $this->getViewer();
+
+ $properties = id(new PHUIPropertyListView())
+ ->setUser($viewer);
+
if (strlen($event->getDescription())) {
$description = new PHUIRemarkupView($viewer, $event->getDescription());
- $properties->addSectionHeader(
- pht('Description'),
- PHUIPropertyListView::ICON_SUMMARY);
-
$properties->addTextContent($description);
+ return $properties;
}
- return $properties;
+ return null;
}
}
diff --git a/src/view/phui/PHUIStatusItemView.php b/src/view/phui/PHUIStatusItemView.php
--- a/src/view/phui/PHUIStatusItemView.php
+++ b/src/view/phui/PHUIStatusItemView.php
@@ -83,17 +83,15 @@
}
}
- $icon_cell = phutil_tag(
- 'td',
- array(),
- $icon);
-
$target_cell = phutil_tag(
'td',
array(
'class' => 'phui-status-item-target',
),
- $this->target);
+ array(
+ $icon,
+ $this->target,
+ ));
$note_cell = phutil_tag(
'td',
@@ -103,7 +101,6 @@
$this->note);
return array(
- $icon_cell,
$target_cell,
$note_cell,
);
diff --git a/webroot/rsrc/css/phui/phui-status.css b/webroot/rsrc/css/phui/phui-status.css
--- a/webroot/rsrc/css/phui/phui-status.css
+++ b/webroot/rsrc/css/phui/phui-status.css
@@ -7,10 +7,9 @@
}
.phui-status-list-view .phui-icon-view {
- display: block;
width: 14px;
height: 14px;
- margin: 3px 4px;
+ margin: 2px 4px 2px 0;
}
.phui-status-item-target {
diff --git a/webroot/rsrc/css/phui/phui-two-column-view.css b/webroot/rsrc/css/phui/phui-two-column-view.css
--- a/webroot/rsrc/css/phui/phui-two-column-view.css
+++ b/webroot/rsrc/css/phui/phui-two-column-view.css
@@ -108,7 +108,7 @@
.device-desktop .phui-main-column .phui-property-list-value {
margin-left: 8px;
- width: auto;
+ width: calc(100% - 180px);
}

File Metadata

Mime Type
text/plain
Expires
Thu, Mar 20, 9:16 AM (3 w, 12 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7663648
Default Alt Text
D15387.id37102.diff (7 KB)

Event Timeline