mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-24 14:30:56 +01:00
Add week numbers to Calendar month view.
Summary: Closes T8184, Add week numbers to Calendar month view. Test Plan: Calendar month view should now show week numbers, incrementing on Mondays, regardless of week start day. Reviewers: chad, #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T8184 Differential Revision: https://secure.phabricator.com/D12886
This commit is contained in:
parent
5f797b4d47
commit
f087d7c08a
3 changed files with 23 additions and 2 deletions
|
@ -122,7 +122,7 @@ return array(
|
||||||
'rsrc/css/layout/phabricator-source-code-view.css' => '2ceee894',
|
'rsrc/css/layout/phabricator-source-code-view.css' => '2ceee894',
|
||||||
'rsrc/css/phui/calendar/phui-calendar-day.css' => '3b4a65d8',
|
'rsrc/css/phui/calendar/phui-calendar-day.css' => '3b4a65d8',
|
||||||
'rsrc/css/phui/calendar/phui-calendar-list.css' => '840baa8d',
|
'rsrc/css/phui/calendar/phui-calendar-list.css' => '840baa8d',
|
||||||
'rsrc/css/phui/calendar/phui-calendar-month.css' => 'a6993b38',
|
'rsrc/css/phui/calendar/phui-calendar-month.css' => '5b213ea0',
|
||||||
'rsrc/css/phui/calendar/phui-calendar.css' => '8345be98',
|
'rsrc/css/phui/calendar/phui-calendar.css' => '8345be98',
|
||||||
'rsrc/css/phui/phui-action-header-view.css' => '89c497e7',
|
'rsrc/css/phui/phui-action-header-view.css' => '89c497e7',
|
||||||
'rsrc/css/phui/phui-action-list.css' => '4f4d09f2',
|
'rsrc/css/phui/phui-action-list.css' => '4f4d09f2',
|
||||||
|
@ -763,7 +763,7 @@ return array(
|
||||||
'phui-calendar-css' => '8345be98',
|
'phui-calendar-css' => '8345be98',
|
||||||
'phui-calendar-day-css' => '3b4a65d8',
|
'phui-calendar-day-css' => '3b4a65d8',
|
||||||
'phui-calendar-list-css' => '840baa8d',
|
'phui-calendar-list-css' => '840baa8d',
|
||||||
'phui-calendar-month-css' => 'a6993b38',
|
'phui-calendar-month-css' => '5b213ea0',
|
||||||
'phui-crumbs-view-css' => '594d719e',
|
'phui-crumbs-view-css' => '594d719e',
|
||||||
'phui-document-view-css' => '94d5dcd8',
|
'phui-document-view-css' => '94d5dcd8',
|
||||||
'phui-feed-story-css' => 'c9f3a0b5',
|
'phui-feed-story-css' => 'c9f3a0b5',
|
||||||
|
|
|
@ -189,6 +189,7 @@ final class PHUICalendarMonthView extends AphrontView {
|
||||||
$class = $event_list['class'];
|
$class = $event_list['class'];
|
||||||
$date = $event_list['date'];
|
$date = $event_list['date'];
|
||||||
$cell_day_secret_link = null;
|
$cell_day_secret_link = null;
|
||||||
|
$week_number = null;
|
||||||
|
|
||||||
if ($date) {
|
if ($date) {
|
||||||
$uri = $event_list['uri'];
|
$uri = $event_list['uri'];
|
||||||
|
@ -201,6 +202,16 @@ final class PHUICalendarMonthView extends AphrontView {
|
||||||
'href' => $uri,
|
'href' => $uri,
|
||||||
),
|
),
|
||||||
$date->format('j'));
|
$date->format('j'));
|
||||||
|
|
||||||
|
if ($date->format('w') == 1) {
|
||||||
|
$week_number = phutil_tag(
|
||||||
|
'a',
|
||||||
|
array(
|
||||||
|
'class' => 'phui-calendar-week-number',
|
||||||
|
'href' => $uri,
|
||||||
|
),
|
||||||
|
$date->format('W'));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$cell_day = null;
|
$cell_day = null;
|
||||||
}
|
}
|
||||||
|
@ -234,6 +245,7 @@ final class PHUICalendarMonthView extends AphrontView {
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
$cell_day_secret_link,
|
$cell_day_secret_link,
|
||||||
|
$week_number,
|
||||||
$cell_day,
|
$cell_day,
|
||||||
$today_slot,
|
$today_slot,
|
||||||
));
|
));
|
||||||
|
|
|
@ -94,6 +94,15 @@ table.phui-calendar-view tr td:first-child {
|
||||||
color: {$green};
|
color: {$green};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
table.phui-calendar-view a.phui-calendar-week-number {
|
||||||
|
color: {$lightgreyborder};
|
||||||
|
padding: 4px;
|
||||||
|
display: inline-block;
|
||||||
|
min-width: 16px;
|
||||||
|
text-align: center;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
table.phui-calendar-view a.phui-calendar-date-number {
|
table.phui-calendar-view a.phui-calendar-date-number {
|
||||||
color: {$lightgreytext};
|
color: {$lightgreytext};
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
|
|
Loading…
Reference in a new issue