4 {% macro tagselection(submit_name, selected_tags, all_tags) %}
5 <input name="{{submit_name}}" value="" size=15 list="tags" autocomplete="off" />
6 {% for selected_tag in selected_tags | sort %}
7 <select name="{{submit_name}}">
9 {% for tag in all_tags | sort %}<option value="{{tag|e}}" {% if selected_tag == tag %}selected{% endif %}>{{tag|e}}</option>
14 {% for tag in all_tags %}<option value="{{tag}}">{{tag}}</option>
21 {% macro sort_head(sort, name_internal, display_name, sort_key="sort") %}
22 <th {% if sort == name_internal %}class="desc"{% elif sort == '-' + name_internal %}class="asc"{% endif %}>
23 <a href="?{{sort_key}}={% if sort == name_internal %}-{% endif %}{{name_internal}}">{{display_name}}</a>
29 {% macro doneness_string(todo, respect_cancelled=false, datalist_hack=false) %}
30 [{% if todo.done and not (respect_cancelled and "cancelled" in todo.tags) %}✓{% else %}{% if datalist_hack %} {% else %} {% endif %}{% endif %}]
35 {% macro datalist_tasks(tasks, with_weight=false) %}
37 {% for task in tasks %}
38 <option value="{{task.id_}}">{% if with_weight %}({{task.deps_weight}}) {% endif %}{{task.title.now}}</option>
45 {% macro parenthood_selector(parenthood) %}parenthood: <select name="parenthood">
46 <option value="childless" {% if parenthood == "childless" %}selected{% endif %}>make childless</option>
47 <option value="adoption" {% if parenthood == "adoption" %}selected{% endif %}>favor adoption</option>
48 <option value="birth" {% if parenthood == "birth" %}selected{% endif %}>favor birth</option>
49 </select>{% endmacro %}