Refactor template to use macros #1
|
@ -1,20 +1,21 @@
|
||||||
<h3>{{task_title}}</h3>
|
{% macro task(task_title, task_date, status, assignee, description) %}
|
||||||
<hr>
|
<h3>{{task_title}}</h3>
|
||||||
<ul>
|
<hr>
|
||||||
<li>Date: {{task_date}}</li>
|
<ul>
|
||||||
<li>Status: {{status}}</li>
|
<li>Date: {{task_date}}</li>
|
||||||
<li>Assignee: {{assignee}}</li>
|
<li>Status: {{status}}</li>
|
||||||
</ul>
|
<li>Assignee: {{assignee}}</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
{{description}}
|
{{description}}
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<label for="move">Move to:</label>
|
|
||||||
<select name="move" id="move">
|
|
||||||
<option value="ideas">ideas</option>
|
|
||||||
<option value="assigned">assigned</option>
|
|
||||||
<option value="in-progress">in progreess</option>
|
|
||||||
<option value="done">done</option>
|
|
||||||
<select>
|
|
||||||
|
|
||||||
|
<label for="move">Move to:</label>
|
||||||
|
<select name="move" id="move">
|
||||||
|
<option value="ideas">ideas</option>
|
||||||
|
<option value="assigned">assigned</option>
|
||||||
|
<option value="in-progress">in progreess</option>
|
||||||
|
<option value="done">done</option>
|
||||||
|
</select>
|
||||||
|
{% endmacro task %}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
{% import "task.html" as task_macro %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
|
@ -22,7 +23,7 @@ navbar<br>
|
||||||
<!-- Some only selecting specific task code here, for smarter people then me -->
|
<!-- Some only selecting specific task code here, for smarter people then me -->
|
||||||
|
|
||||||
{% for task in tasks %}
|
{% for task in tasks %}
|
||||||
{% include "task.html" %}
|
{{ task_macro::task(task_title="TODO", task_date="01-01-1970", status="TODO", assignee="TODO", description="description") }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
|
Loading…
Reference in a new issue