%- USE date; show_hours = config.ZEITRAHMEN || 1; # Zeitrahmen der angezeigt werden soll in Stunden times = config.TIMES.split(',\s*'); # first_sec is the start time of the 24 hours interval in seconds since 1970 # last_sec is the end time of the 24 hours interval in seconds since 1970 first_sec = date.now + 1799 - show_hours * 3600 first_sec = first_sec - first_sec % 1800; last_sec = first_sec + 86400; # now_sec is the requested browser time in seconds since 1970 # start_sec is the start time of the table in seconds since 1970 # end_sec is the end time of the table in seconds since 1970 # end_min is the end time of the table in minutes since start of the table # diff_sec is the offset from start_sec to now_sec diff_sec = now_sec % 1800; # time since last 30 minutes interval start_sec = now_sec - diff_sec; end_min = 60 * show_hours; end_sec = start_sec + (end_min * 60); name_w = 100; min5_h = 10; # Calculate suitable width for events dependent on the time interval # 1 hour = 60min: 300px -> 5px/min # 2 hours=120min: 600px -> 5px/min # 3 hours=180min: 720px -> 4px/min # 4 hours=240min: 720px -> 3px/min # 5 hours=300min: 600px -> 2px/min # 6 hours=360min: 720px -> 2px/min event_w = show_hours * 300; IF event_w > 720; event_w = 720; END; px_per_min = (event_w / end_min) | format('%i'); event_w = end_min * px_per_min; -%?> % IF config.TL_TOOLTIP %?> % END %?>
% IF config.TL_TOOLTIP %?> % END %?>