diff options
author | Mike Greiling <mike@pixelcog.com> | 2017-07-27 18:21:56 -0500 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2017-07-28 23:53:22 -0500 |
commit | 68de3ac129c59dc168bdef84b47954d684d5f074 (patch) | |
tree | 64b2d77115cb4fc57a676420f0e95f2c23da1baf /app | |
parent | 037b37297572eadab8b50917892eb285efc4383b (diff) | |
download | gitlab-ce-68de3ac129c59dc168bdef84b47954d684d5f074.tar.gz |
display system timezone underneath activity calendar
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/users/user_tabs.js | 5 | ||||
-rw-r--r-- | app/assets/stylesheets/framework/calendar.scss | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/app/assets/javascripts/users/user_tabs.js b/app/assets/javascripts/users/user_tabs.js index 1f717f08c88..1215b265e28 100644 --- a/app/assets/javascripts/users/user_tabs.js +++ b/app/assets/javascripts/users/user_tabs.js @@ -151,12 +151,17 @@ export default class UserTabs { const calendarPath = $calendarWrap.data('calendarPath'); const calendarActivitiesPath = $calendarWrap.data('calendarActivitiesPath'); const utcOffset = $calendarWrap.data('utcOffset'); + let utcFormatted = 'UTC'; + if (utcOffset !== 0) { + utcFormatted = `UTC${utcOffset > 0 ? '+' : ''}${(utcOffset / 3600)}`; + } $.ajax({ dataType: 'json', url: calendarPath, success: (activityData) => { $calendarWrap.html(CALENDAR_TEMPLATE); + $calendarWrap.find('.calendar-hint').append(`(Timezone: ${utcFormatted})`); // eslint-disable-next-line no-new new ActivityCalendar('.js-contrib-calendar', activityData, calendarActivitiesPath, utcOffset); diff --git a/app/assets/stylesheets/framework/calendar.scss b/app/assets/stylesheets/framework/calendar.scss index 0ac095f7d8f..0ded4a3b423 100644 --- a/app/assets/stylesheets/framework/calendar.scss +++ b/app/assets/stylesheets/framework/calendar.scss @@ -45,6 +45,7 @@ margin-top: -23px; float: right; font-size: 12px; + direction: ltr; } .pika-single.gitlab-theme { |