Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
wizards
mffzoom
Commits
99430959
Commit
99430959
authored
Mar 24, 2020
by
Martin Mareš
Browse files
App: Shift colliding meetings
parent
dd9afca5
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/zoom.py
View file @
99430959
...
...
@@ -149,15 +149,16 @@ def main_page():
end
=
min
(
num_hours
*
3600
,
int
(
rel_end
))
app
.
logger
.
debug
(
"Meeting: %s start_t=%s start=%s end=%s room_i=%s"
,
r
,
start_t
,
start
,
end
,
i
)
if
start
<
end
:
coll
=
(
i
==
prev_room_i
and
start_t
<
prev_end_t
)
g
.
meetings
.
append
({
"x"
:
i
*
room_box_width
+
4
,
"x"
:
i
*
room_box_width
+
4
+
10
*
int
(
coll
)
,
"y"
:
int
(
start
/
3600.
*
room_hour_height
),
"w"
:
room_box_width
-
7
,
"w"
:
room_box_width
-
7
-
10
*
int
(
coll
)
,
"h"
:
int
((
end
-
start
)
/
3600
*
room_hour_height
),
"start"
:
time
.
strftime
(
"%H:%M"
,
time
.
localtime
(
start_t
)),
"end"
:
time
.
strftime
(
"%H:%M"
,
time
.
localtime
(
end_t
)),
"topic"
:
r
.
topic
,
"coll"
:
(
i
==
prev_room_i
and
start_t
<
prev_end_t
)
,
"coll"
:
coll
,
})
prev_room_i
=
i
prev_end_t
=
end_t
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment