assert isinstance(self.id_, str)
return self.id_
+ @property
+ def first_of_month(self) -> bool:
+ """Return what month self.date is part of."""
+ assert isinstance(self.id_, str)
+ return self.id_[-2:] == '01'
+
+ @property
+ def month_name(self) -> str:
+ """Return what month self.date is part of."""
+ return self.datetime.strftime('%B')
+
@property
def weekday(self) -> str:
"""Return what weekday matches self.date."""
{% extends 'base.html' %}
+{% block css %}
+tr.week_row td { height: 0.1em; background-color: black; padding: 0; margin: 0; }
+tr.month_row td { border: 0.1em solid black; text-align: center; }
+{% endblock %}
+
+
+
{% block content %}
<form action="calendar" method="GET">
from <input name="start" value="{{start}}" />
to <input name="end" value="{{end}}" />
<input type="submit" value="OK" />
</form>
-<ul>
+<table>
{% for day in days %}
-<li><a href="day?date={{day.date}}">{{day.date}}</a> ({{day.weekday}}) {{day.comment|e}}
+
+{% if day.first_of_month %}
+<tr class="month_row">
+<td colspan=3>{{ day.month_name }}</td>
+</tr>
+{% endif %}
+
+{% if day.weekday == "Monday" %}
+<tr class="week_row">
+<td colspan=3></td>
+</tr>
+{% endif %}
+
+<tr>
+<td>{{day.weekday|truncate(2,True,'',0)}}</td>
+<td><a href="day?date={{day.date}}">{{day.date}}</a></td>
+<td>{{day.comment|e}}</td>
+</tr>
+
{% endfor %}
-</ul>
+</table>
{% endblock %}
{% endif %}
{% endfor %}
-<td><input name="new_todo" list="todos_for_{{condition.id_}}" /></td>
+<td><input name="new_todo" list="todos_for_{{condition.id_}}" autocomplete="off" /></td>
<datalist name="new_todo" id="todos_for_{{condition.id_}}" />
{% for process in enablers_for[condition.id_] %}
<option value="{{process.id_}}">{{process.title.newest|e}}</option>
{% extends 'base.html' %}
+
+
{% block content %}
<h3>Todo: {{todo.process.title.newest|e}}</h3>
<form action="todo?id={{todo.id_}}" method="POST">