More template cleanup

This commit is contained in:
Scot Hacker 2016-04-09 11:52:16 -07:00
parent c42a03cee9
commit 5e4f6e8d77
2 changed files with 12 additions and 16 deletions

View file

@ -90,11 +90,9 @@
<th>Assigned</th> <th>Assigned</th>
<th>Note</th> <th>Note</th>
<th>Comm</th> <th>Comm</th>
{% ifequal list_slug "mine" %} {% ifequal list_slug "mine" %}
<th>List</th> <th>List</th>
{% endifequal %} {% endifequal %}
<th>Del</th> <th>Del</th>
</tr> </tr>
{% for task in task_list %} {% for task in task_list %}
@ -108,7 +106,7 @@
{% if task.overdue_status %}</span>{% endif %} {% if task.overdue_status %}</span>{% endif %}
</td> </td>
<td>{{ task.created_by }}</td> <td>{{ task.created_by }}</td>
<td>{{ task.assigned_to }}</td> <td>{% if task.assigned_to %}{{ task.assigned_to }}{% else %}Anyone{% endif %}</td>
<td style="text-align:center;">{% if task.note %}&asymp;{% endif %} </td> <td style="text-align:center;">{% if task.note %}&asymp;{% endif %} </td>
<td style="text-align:center;">{% ifnotequal task.comment_set.all.count 0 %}{{ task.comment_set.all.count }}{% endifnotequal %} <td style="text-align:center;">{% ifnotequal task.comment_set.all.count 0 %}{{ task.comment_set.all.count }}{% endifnotequal %}

View file

@ -5,19 +5,18 @@
{% block content %} {% block content %}
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function() {
// Initially hide the TaskEdit form
$('#TaskEdit').hide();
$(document).ready(function() { // toggle slide to show the Add Task form when link clicked
// Initially hide the TaskEdit form $('#slideToggle').click(function(){
$('#TaskEdit').hide(); $(this).siblings('#TaskEdit').slideToggle();
});
// toggle slide to show the Add Task form when link clicked
$('#slideToggle').click(function(){
$(this).siblings('#TaskEdit').slideToggle();
}); });
});
</script> </script>
{% ifequal auth_ok 1 %} {% if auth_ok %}
<h2>{{ task }}</h2> <h2>{{ task }}</h2>
@ -28,7 +27,7 @@
<p> <p>
<strong>In list:</strong> <a href="{% url 'todo-incomplete_tasks' task.list.id task.list.slug %}" class="showlink">{{ task.list }}</a><br /> <strong>In list:</strong> <a href="{% url 'todo-incomplete_tasks' task.list.id task.list.slug %}" class="showlink">{{ task.list }}</a><br />
<strong>Assigned to:</strong> {{ task.assigned_to.first_name }} {{ task.assigned_to.last_name }}<br /> <strong>Assigned to:</strong> {% if task.assigned_to %}{{ task.assigned_to.get_full_name }}{% else %}Anyone{% endif %}<br />
<strong>Created by:</strong> {{ task.created_by.first_name }} {{ task.created_by.last_name }}<br /> <strong>Created by:</strong> {{ task.created_by.first_name }} {{ task.created_by.last_name }}<br />
<strong>Due date:</strong> {{ task.due_date }}<br /> <strong>Due date:</strong> {{ task.due_date }}<br />
<strong>Completed:</strong> {{ form.completed }}<br /> <strong>Completed:</strong> {{ form.completed }}<br />
@ -42,7 +41,6 @@
<h3>Edit Task</h3> <h3>Edit Task</h3>
<table> <table>
<tr> <tr>
<td>Title:</td> <td>Title:</td>
<td>{{ form.title }} </td> <td>{{ form.title }} </td>
@ -100,6 +98,6 @@
{% endfor %} {% endfor %}
</div> </div>
{% endifequal %} {% endif %}
{% endblock %} {% endblock %}