@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Highlighting the current day in calendar.

Summary:
Highlights the current day :)
I am not great in choosing colors. @chad can suggest some improvements :)

Test Plan: {F41738}

Reviewers: epriestley

Reviewed By: epriestley

CC: chad, aran, Korvin, AnhNhan

Maniphest Tasks: T2627

Differential Revision: https://secure.phabricator.com/D5790

authored by

Afaque Hussain and committed by
epriestley
977ac2a8 9885165f

+21 -3
+1 -1
src/__celerity_resource_map__.php
··· 741 741 ), 742 742 'aphront-calendar-view-css' => 743 743 array( 744 - 'uri' => '/res/73061a31/rsrc/css/aphront/calendar-view.css', 744 + 'uri' => '/res/ae6f5b54/rsrc/css/aphront/calendar-view.css', 745 745 'type' => 'css', 746 746 'requires' => 747 747 array(
+8 -1
src/applications/calendar/controller/PhabricatorCalendarBrowseController.php
··· 11 11 $year = $request->getInt('year', $year_d); 12 12 $month_d = phabricator_format_local_time($now, $user, 'm'); 13 13 $month = $request->getInt('month', $month_d); 14 + $day = phabricator_format_local_time($now, $user, 'j'); 15 + 14 16 15 17 $holidays = id(new PhabricatorCalendarHoliday())->loadAllWhere( 16 18 'day BETWEEN %s AND %s', ··· 23 25 strtotime("{$year}-{$month}-01"), 24 26 strtotime("{$year}-{$month}-01 next month")); 25 27 26 - $month_view = new AphrontCalendarMonthView($month, $year); 28 + if ($month == $month_d && $year == $year_d) { 29 + $month_view = new AphrontCalendarMonthView($month, $year, $day); 30 + } else { 31 + $month_view = new AphrontCalendarMonthView($month, $year); 32 + } 33 + 27 34 $month_view->setBrowseURI($request->getRequestURI()); 28 35 $month_view->setUser($user); 29 36 $month_view->setHolidays($holidays);
+8 -1
src/applications/calendar/view/AphrontCalendarMonthView.php
··· 2 2 3 3 final class AphrontCalendarMonthView extends AphrontView { 4 4 5 + private $day; 5 6 private $month; 6 7 private $year; 7 8 private $holidays = array(); ··· 27 28 return $this; 28 29 } 29 30 30 - public function __construct($month, $year) { 31 + public function __construct($month, $year, $day = null) { 32 + $this->day = $day; 31 33 $this->month = $month; 32 34 $this->year = $year; 33 35 } ··· 65 67 $holiday = idx($this->holidays, $day->format('Y-m-d')); 66 68 $class = 'aphront-calendar-day'; 67 69 $weekday = $day->format('w'); 70 + 71 + if ($day_number == $this->day) { 72 + $class .= ' aphront-calendar-today'; 73 + } 74 + 68 75 if ($holiday || $weekday == 0 || $weekday == 6) { 69 76 $class .= ' aphront-calendar-not-work-day'; 70 77 }
+4
webroot/rsrc/css/aphront/calendar-view.css
··· 75 75 background-color: #fdfae7; 76 76 } 77 77 78 + .aphront-calendar-today { 79 + background-color: #A6FAAD; 80 + } 81 + 78 82 .aphront-calendar-empty { 79 83 background-color: #ededed; 80 84 }