Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15462191
D16338.id39276.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
8 KB
Referenced Files
None
Subscribers
None
D16338.id39276.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
@@ -115,8 +115,8 @@
'rsrc/css/layout/phabricator-filetree-view.css' => 'fccf9f82',
'rsrc/css/layout/phabricator-side-menu-view.css' => 'dd849797',
'rsrc/css/layout/phabricator-source-code-view.css' => 'cbeef983',
- 'rsrc/css/phui/calendar/phui-calendar-day.css' => 'f15bb6d6',
- 'rsrc/css/phui/calendar/phui-calendar-list.css' => '5d89cd71',
+ 'rsrc/css/phui/calendar/phui-calendar-day.css' => '572b1893',
+ 'rsrc/css/phui/calendar/phui-calendar-list.css' => 'fcc9fb41',
'rsrc/css/phui/calendar/phui-calendar-month.css' => '8e10e92c',
'rsrc/css/phui/calendar/phui-calendar.css' => 'daadaf39',
'rsrc/css/phui/phui-action-list.css' => 'c5eba19d',
@@ -828,8 +828,8 @@
'phui-box-css' => '5c8387cf',
'phui-button-css' => '4a5fbe3d',
'phui-calendar-css' => 'daadaf39',
- 'phui-calendar-day-css' => 'f15bb6d6',
- 'phui-calendar-list-css' => '5d89cd71',
+ 'phui-calendar-day-css' => '572b1893',
+ 'phui-calendar-list-css' => 'fcc9fb41',
'phui-calendar-month-css' => '8e10e92c',
'phui-chart-css' => '6bf6f78e',
'phui-crumbs-view-css' => 'b4fa5755',
diff --git a/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php b/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php
--- a/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php
+++ b/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php
@@ -362,7 +362,18 @@
$month_view->setBrowseURI(
$this->getURI('query/'.$query->getQueryKey().'/'));
+ $from = $this->getQueryDateFrom($query)->getDateTime();
+
+ $crumbs = array();
+ $crumbs[] = id(new PHUICrumbView())
+ ->setName($from->format('F Y'));
+
+ $header = id(new PHUIHeaderView())
+ ->setHeader($from->format('F Y'));
+
return id(new PhabricatorApplicationSearchResultView())
+ ->setCrumbs($crumbs)
+ ->setHeader($header)
->setContent($month_view)
->setCollapsed(true);
}
@@ -380,8 +391,8 @@
$query->getParameter('display'));
$day_view = id(new PHUICalendarDayView(
- $this->getQueryDateFrom($query)->getEpoch(),
- $this->getQueryDateTo($query)->getEpoch(),
+ $this->getQueryDateFrom($query),
+ $this->getQueryDateTo($query),
$start_year,
$start_month,
$start_day))
@@ -417,10 +428,26 @@
$day_view->addEvent($event_view);
}
- $day_view->setBrowseURI(
- $this->getURI('query/'.$query->getQueryKey().'/'));
+ $browse_uri = $this->getURI('query/'.$query->getQueryKey().'/');
+ $day_view->setBrowseURI($browse_uri);
+
+ $from = $this->getQueryDateFrom($query)->getDateTime();
+ $month_uri = $browse_uri.$from->format('Y/m/');
+
+ $crumbs = array(
+ id(new PHUICrumbView())
+ ->setName($from->format('F Y'))
+ ->setHref($month_uri),
+ id(new PHUICrumbView())
+ ->setName($from->format('D jS')),
+ );
+
+ $header = id(new PHUIHeaderView())
+ ->setHeader($from->format('D, F jS'));
return id(new PhabricatorApplicationSearchResultView())
+ ->setCrumbs($crumbs)
+ ->setHeader($header)
->setContent($day_view)
->setCollapsed(true);
}
@@ -466,6 +493,20 @@
}
private function getQueryDateFrom(PhabricatorSavedQuery $saved) {
+ if ($this->calendarYear && $this->calendarMonth) {
+ $viewer = $this->requireViewer();
+
+ $start_year = $this->calendarYear;
+ $start_month = $this->calendarMonth;
+ $start_day = $this->calendarDay ? $this->calendarDay : 1;
+
+ return AphrontFormDateControlValue::newFromDictionary(
+ $viewer,
+ array(
+ 'd' => "{$start_year}-{$start_month}-{$start_day}",
+ ));
+ }
+
return $this->getQueryDate($saved, 'rangeStart');
}
diff --git a/src/applications/search/controller/PhabricatorApplicationSearchController.php b/src/applications/search/controller/PhabricatorApplicationSearchController.php
--- a/src/applications/search/controller/PhabricatorApplicationSearchController.php
+++ b/src/applications/search/controller/PhabricatorApplicationSearchController.php
@@ -210,7 +210,7 @@
}
$body[] = $box;
-
+ $more_crumbs = null;
if ($run_query) {
$exec_errors = array();
@@ -272,6 +272,13 @@
$box->setCollapsed(true);
}
+ $result_header = $list->getHeader();
+ if ($result_header) {
+ $box->setHeader($result_header);
+ }
+
+ $more_crumbs = $list->getCrumbs();
+
if ($pager->willShowPagingControls()) {
$pager_box = id(new PHUIBoxView())
->addPadding(PHUI::PADDING_MEDIUM)
@@ -301,8 +308,18 @@
}
$crumbs = $parent
- ->buildApplicationCrumbs()
- ->addTextCrumb($title);
+ ->buildApplicationCrumbs();
+
+ if ($more_crumbs) {
+ $query_uri = $engine->getQueryResultsPageURI($saved_query->getQueryKey());
+ $crumbs->addTextCrumb($title, $query_uri);
+
+ foreach ($more_crumbs as $crumb) {
+ $crumbs->addCrumb($crumb);
+ }
+ } else {
+ $crumbs->addTextCrumb($title);
+ }
return $this->newPage()
->setApplicationMenu($this->buildApplicationMenu())
diff --git a/src/applications/search/view/PhabricatorApplicationSearchResultView.php b/src/applications/search/view/PhabricatorApplicationSearchResultView.php
--- a/src/applications/search/view/PhabricatorApplicationSearchResultView.php
+++ b/src/applications/search/view/PhabricatorApplicationSearchResultView.php
@@ -14,6 +14,8 @@
private $actions = array();
private $collapsed = null;
private $noDataString;
+ private $crumbs = array();
+ private $header;
public function setObjectList(PHUIObjectItemListView $list) {
$this->objectList = $list;
@@ -82,4 +84,26 @@
return $this;
}
+ public function setCrumbs(array $crumbs) {
+ assert_instances_of($crumbs, 'PHUICrumbView');
+
+ $this->crumbs = $crumbs;
+ return $this;
+ }
+
+ public function getCrumbs() {
+ return $this->crumbs;
+ }
+
+ public function setHeader(PHUIHeaderView $header) {
+ $this->header = $header;
+ return $this;
+ }
+
+ public function getHeader() {
+ return $this->header;
+ }
+
+
+
}
diff --git a/src/view/form/control/AphrontFormDateControlValue.php b/src/view/form/control/AphrontFormDateControlValue.php
--- a/src/view/form/control/AphrontFormDateControlValue.php
+++ b/src/view/form/control/AphrontFormDateControlValue.php
@@ -59,27 +59,6 @@
return $this->viewer;
}
- public static function newFromParts(
- PhabricatorUser $viewer,
- $year,
- $month,
- $day,
- $time = null,
- $enabled = true) {
-
- $value = new AphrontFormDateControlValue();
- $value->viewer = $viewer;
- list($value->valueDate, $value->valueTime) =
- $value->getFormattedDateFromParts(
- $year,
- $month,
- $day,
- coalesce($time, '12:00 AM'));
- $value->valueEnabled = $enabled;
-
- return $value;
- }
-
public static function newFromRequest(AphrontRequest $request, $key) {
$value = new AphrontFormDateControlValue();
$value->viewer = $request->getViewer();
diff --git a/src/view/phui/calendar/PHUICalendarMonthView.php b/src/view/phui/calendar/PHUICalendarMonthView.php
--- a/src/view/phui/calendar/PHUICalendarMonthView.php
+++ b/src/view/phui/calendar/PHUICalendarMonthView.php
@@ -445,8 +445,7 @@
}
- $header = id(new PHUIHeaderView())
- ->setHeader($date->format('F Y'));
+ $header = id(new PHUIHeaderView());
if ($button_bar) {
$header->setButtonBar($button_bar);
diff --git a/webroot/rsrc/css/phui/calendar/phui-calendar-day.css b/webroot/rsrc/css/phui/calendar/phui-calendar-day.css
--- a/webroot/rsrc/css/phui/calendar/phui-calendar-day.css
+++ b/webroot/rsrc/css/phui/calendar/phui-calendar-day.css
@@ -92,7 +92,6 @@
background-color: {$bluebackground};
color: {$greytext};
text-decoration: none;
- text-decoration: none;
}
.day-view-all-day {
diff --git a/webroot/rsrc/css/phui/calendar/phui-calendar-list.css b/webroot/rsrc/css/phui/calendar/phui-calendar-list.css
--- a/webroot/rsrc/css/phui/calendar/phui-calendar-list.css
+++ b/webroot/rsrc/css/phui/calendar/phui-calendar-list.css
@@ -66,4 +66,22 @@
.phui-calendar-list-item-empty {
color: {$lightgreytext};
+ padding: 0 12px;
+ font-style: italic;
+}
+
+.phui-calendar-list-item.all-day {
+ background: {$bluebackground};
+}
+
+.calendar-day-view-sidebar .phui-calendar-list {
+ padding: 12px 0;
+}
+
+.calendar-day-view-sidebar .phui-calendar-list-item {
+ padding: 0 12px;
+}
+
+.calendar-day-view-sidebar .phui-calendar-list-item a {
+ position: relative;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Apr 2, 12:54 PM (2 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7704848
Default Alt Text
D16338.id39276.diff (8 KB)
Attached To
Mode
D16338: Provide better headers and crumbs for Calendar result views
Attached
Detach File
Event Timeline
Log In to Comment