From c80f34b9b189c51928b4e880dcdc46e6b1d7a073 Mon Sep 17 00:00:00 2001 From: Teal Bauer <git@teal.is> Date: Sun, 26 May 2024 15:22:12 +0200 Subject: [PATCH] blurb --- app/models/session.rb | 5 +++++ app/views/conferences/show.html.erb | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/models/session.rb b/app/models/session.rb index 91b67c8..1766530 100644 --- a/app/models/session.rb +++ b/app/models/session.rb @@ -24,6 +24,11 @@ class Session < ApplicationRecord super.in_time_zone(conference.time_zone) end + def is_interpreted + # XXX + ["Stage 1", "Stage 2"].include? stage.name + end + def translators_needed? is_interpreted && assignments.length < 2 end diff --git a/app/views/conferences/show.html.erb b/app/views/conferences/show.html.erb index 34d625f..2c545fa 100644 --- a/app/views/conferences/show.html.erb +++ b/app/views/conferences/show.html.erb @@ -2,7 +2,8 @@ pixels_per_hour = 300.0 timeline_granularity = 15 fudge = 24 -current_time = Time.zone.now.in_time_zone(@conference.time_zone).advance(days: 1, hours: 2) +current_time = Time.zone.now.in_time_zone(@conference.time_zone) +#.advance(days: 1, hours: 2) # current_time = Time.parse(@conference.days.first.strftime("%Y-%m-%d 11:00")) #current_time = @sessions_by_date[@conference.days.first].first.starts_at.advance(minutes: 5) %> @@ -57,7 +58,6 @@ current_time = Time.zone.now.in_time_zone(@conference.time_zone).advance(days: 1 <script type="text/javascript"> function updateCurrentTime<%= date.strftime('day%Y%m%d') %>() { const currentTime = new Date(); - currentTime.setTime(currentTime.getTime() + 1 * 86400 * 1000); /* XXX DEBUG */ const timelineStartsAt = new Date(<%= timeline_starts_at.to_json.html_safe %>); const timelineEndsAt = new Date(<%= timeline_ends_at.to_json.html_safe %>); const fudge = <%= fudge %>; -- GitLab