Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Roman Karwacik
website
Commits
eddd5a66
Commit
eddd5a66
authored
Jan 29, 2018
by
Andreas Valder
Browse files
fixing html syntax in the timetable
parent
c61daa81
Changes
3
Hide whitespace changes
Inline
Side-by-side
templates/import_campus.html
View file @
eddd5a66
...
...
@@ -18,7 +18,7 @@
<input
class=
"form-control"
type=
"text"
name=
"campus.{{i.id}}.url"
value=
"{{i.url}}"
id=
"campus-{{i.id}}-url"
placeholder=
"url"
>
</span>
<span
class=
"input-group col-xs-2"
>
<input
class=
"form-control"
type=
"te
s
t"
name=
"campus.{{i.id}}.type"
value=
"{{i.type}}"
id=
"campus-{{i.id}}-type"
placeholder=
"type"
>
<input
class=
"form-control"
type=
"te
x
t"
name=
"campus.{{i.id}}.type"
value=
"{{i.type}}"
id=
"campus-{{i.id}}-type"
placeholder=
"type"
>
</span>
<span
class=
"input-group col-xs-1 pull-right"
>
<button
class=
"btn btn-default pull-right"
onclick=
"$('#campus-{{i.id}}-url').val('')"
>
...
...
@@ -32,7 +32,7 @@
<input
class=
"form-control"
type=
"text"
name=
"campus.new.url"
placeholder=
"url"
>
</span>
<span
class=
"input-group col-xs-2"
>
<input
class=
"form-control"
type=
"te
s
t"
name=
"campus.new.type"
placeholder=
"type"
>
<input
class=
"form-control"
type=
"te
x
t"
name=
"campus.new.type"
placeholder=
"type"
>
</span>
<span
class=
"input-group col-xs-1 pull-right"
>
<button
class=
"btn btn-default pull-right"
>
...
...
templates/timetable.html
View file @
eddd5a66
...
...
@@ -46,7 +46,7 @@
{% set time_index = loop.index %}
<tr
{%
if
t.strftime
("%
M
"
) =
=
"00"
%}
class=
"hourlytime"
{%
endif
%}
>
{# display time in first row if its a full hour #}
{% if ((time_index - 1) is divisibleby 4) %}
<td
rowspan=
"4"
style=
"vertical-align: top;"
>
{{ t.strftime("%H:%M") }}
</td>
{% endif %}
{% if ((time_index - 1) is divisibleby 4) %}
<td
{%
if
not
loop.last
%}
rowspan=
"4"
{%
endif
%}
style=
"vertical-align: top;"
>
{{ t.strftime("%H:%M") }}
</td>
{% endif %}
{# iterate over days if if it is a working day or we have lectures on that day (optionaly skip weekends) #}
{% for d in days if (d.index
<
5)
or
(
d.lectures
|
length
)
>
0 %}
{% for col in range(1,d.maxcol+1) %}
...
...
timetable.py
View file @
eddd5a66
...
...
@@ -24,7 +24,6 @@ def timetable(user=None):
if
not
datesweekmonday
:
kw
=
0
weekofyear
=
str
(
datetime
.
today
().
year
)
+
"-W"
+
str
(
datetime
.
today
().
isocalendar
()[
1
])
else
:
datesweekmonday
-=
timedelta
(
days
=
datesweekmonday
.
weekday
())
kw
=
int
((
datesweekmonday
.
date
()
-
thisweekmonday
.
date
()).
days
/
7
)
...
...
@@ -36,7 +35,7 @@ def timetable(user=None):
start
=
date
.
today
()
-
timedelta
(
days
=
date
.
today
().
weekday
()
-
7
*
kw
)
except
:
start
=
date
.
today
()
-
timedelta
(
days
=
date
.
today
().
weekday
())
weekofyear
=
str
(
start
.
year
)
+
"-W"
+
str
(
start
.
isocalendar
()[
1
])
weekofyear
=
'{}-W{:02d}'
.
format
(
datetime
.
today
().
year
,
datetime
.
today
()
.
isocalendar
()[
1
])
days
=
[{
'date'
:
start
,
'lectures'
:
[],
'atonce'
:
0
,
'index'
:
0
}]
earlieststart
=
time
(
23
,
59
)
latestend
=
time
(
0
,
0
)
...
...
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