summaryrefslogtreecommitdiff
path: root/templates/todolists/view.html
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-12-28 00:27:20 -0600
committerDan McGee <dan@archlinux.org>2012-12-28 14:48:29 -0600
commitc8ece67cec9c421ac0c711554edd34f022623b45 (patch)
treea894e1e82df91fda22807efbc3519bd18e12f321 /templates/todolists/view.html
parentc7658ca4cd0f89969086fed172519ca2097270ba (diff)
Convert to using new todolist models everywhere
This is a rather widespread set of changes converting usage to the new todo list and todo list package model recently introduced. The data migration is not included in this commit. After this commit, the old model should no longer be referenced anywhere. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'templates/todolists/view.html')
-rw-r--r--templates/todolists/view.html27
1 files changed, 11 insertions, 16 deletions
diff --git a/templates/todolists/view.html b/templates/todolists/view.html
index b6f59704..0f3475a2 100644
--- a/templates/todolists/view.html
+++ b/templates/todolists/view.html
@@ -10,17 +10,17 @@
<h2>Todo List: {{ list.name }}</h2>
<ul class="admin-actions">
- {% if perms.main.delete_todolist %}
+ {% if perms.todolists.delete_todolist %}
<li><a href="/todo/delete/{{list.id}}/"
title="Delete this todo list">Delete Todo List</a></li>
{% endif %}
- {% if perms.main.change_todolist %}
+ {% if perms.todolists.change_todolist %}
<li><a href="/todo/edit/{{list.id}}/"
title="Edit this todo list">Edit Todo List</a></li>
{% endif %}
</ul>
- <p class="todo-info">{{ list.date_added|date }} - {{ list.creator.get_full_name }}</p>
+ <p class="todo-info">{{ list.created|date }} - {{ list.creator.get_full_name }}</p>
<div>{{list.description|urlize|linebreaks}}</div>
@@ -68,27 +68,22 @@
</thead>
<tbody>
{% for pkg in list.packages %}
- <tr class="{% cycle 'odd' 'even' %}{% if user in pkg.pkg.maintainers %} mine{% endif %} {{ pkg.pkg.arch.name }} {{ pkg.pkg.repo.name|lower }}">
- <td>{{ pkg.pkg.arch.name }}</td>
- <td>{{ pkg.pkg.repo.name|capfirst }}</td>
- <td>{% pkg_details_link pkg.pkg %}</td>
+ <tr class="{% cycle 'odd' 'even' %}{% if user in pkg.maintainers %} mine{% endif %} {{ pkg.arch.name }} {{ pkg.repo.name|lower }}">
+ <td>{{ pkg.arch.name }}</td>
+ <td>{{ pkg.repo.name|capfirst }}</td>
+ <td>{% pkg_details_link pkg.pkg pkg.pkgname %}</td>
{% if pkg.pkg.flag_date %}
<td><span class="flagged">{{ pkg.pkg.full_version }}</span></td>
{% else %}
<td>{{ pkg.pkg.full_version }}</td>
{% endif %}
- <td>{{ pkg.pkg.maintainers|join:', ' }}</td>
+ <td>{{ pkg.maintainers|join:', ' }}</td>
<td>
- {% if perms.main.change_todolistpkg %}
- {% if pkg.complete %}
+ {% if perms.todolist.change_todolistpackage %}
<a href="/todo/flag/{{ list.id }}/{{ pkg.id }}/"
- class="status-link complete" title="Toggle completion status">Complete</a>
+ class="status-link {{ pkg.status_css_class }}" title="Toggle completion status">{{ pkg.get_status_display }}</a>
{% else %}
- <a href="/todo/flag/{{ list.id }}/{{ pkg.id }}/"
- class="status-link incomplete" title="Toggle completion status">Incomplete</a>
- {% endif %}
- {% else %}
- {% if pkg.complete %}<span class="complete">Complete</span>{% else %}<span class="incomplete">Incomplete</span>{% endif %}
+ <span class="{{ pkg.status_css_class }}">{{ pkg.get_status_display }}</span>
{% endif %}
</td>
</tr>