156b91eb59
This replaces a lot of boilerplate we had everywhere, and makes sure things like the title are consistent across all links. Signed-off-by: Dan McGee <dan@archlinux.org>
75 lines
2.6 KiB
HTML
75 lines
2.6 KiB
HTML
{% extends "base.html" %}
|
|
{% load package_extras %}
|
|
|
|
{% block title %}Arch Linux - Todo: {{ list.name }}{% endblock %}
|
|
|
|
{% block content %}
|
|
<div id="dev-todo-details" class="box">
|
|
|
|
<h2>Todo List: {{ list.name }}</h2>
|
|
|
|
<ul class="admin-actions">
|
|
{% if perms.main.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 %}
|
|
<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>
|
|
|
|
<div>{{list.description|urlize|linebreaks}}</div>
|
|
|
|
<table id="dev-todo-pkglist" class="results todo-table">
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Arch</th>
|
|
<th>Repo</th>
|
|
<th>Maintainer</th>
|
|
<th>Status</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for pkg in list.packages %}
|
|
<tr class="{% cycle 'odd' 'even' %}">
|
|
<td>{% pkg_details_link pkg.pkg %}</td>
|
|
<td>{{ pkg.pkg.arch.name }}</td>
|
|
<td>{{ pkg.pkg.repo.name|capfirst }}</td>
|
|
<td>{{ pkg.pkg.maintainers|join:', ' }}</td>
|
|
<td>
|
|
{% if perms.main.change_todolistpkg %}
|
|
{% if pkg.complete %}
|
|
<a href="/todo/flag/{{ list.id }}/{{ pkg.id }}/"
|
|
class="status-link complete" title="Toggle completion status">Complete</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 %}
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{% load cdn %}{% jquery %}
|
|
<script type="text/javascript" src="/media/jquery.tablesorter.min.js"></script>
|
|
<script type="text/javascript" src="/media/archweb.js"></script>
|
|
<script type="text/javascript">
|
|
$(document).ready(function() {
|
|
$('a.status-link').click(todolist_flag);
|
|
$(".results").tablesorter({
|
|
widgets: ['zebra'],
|
|
sortList: [[0,0], [1,0]],
|
|
headers: { 4: { sorter: 'todostatus' } }
|
|
});
|
|
});
|
|
</script>
|
|
{% endblock %}
|