Skip to content
Snippets Groups Projects
Commit eddd5a66 authored by Andreas Valder's avatar Andreas Valder
Browse files

fixing html syntax in the timetable

parent c61daa81
No related branches found
No related tags found
No related merge requests found
......@@ -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="test" name="campus.{{i.id}}.type" value="{{i.type}}" id="campus-{{i.id}}-type" placeholder="type">
<input class="form-control" type="text" 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="test" name="campus.new.type" placeholder="type">
<input class="form-control" type="text" name="campus.new.type" placeholder="type">
</span>
<span class="input-group col-xs-1 pull-right">
<button class="btn btn-default pull-right">
......
......@@ -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) %}
......
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment