summaryrefslogtreecommitdiff
path: root/templates/todolists
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-04-21 02:22:44 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-04-21 02:22:44 -0400
commit03fa7e4f27bdb39a8f8f5ed91a87d18bf8357b47 (patch)
treec67eafcbda55706f18400b3115a2b8a5be318394 /templates/todolists
parent91c451821ce7000cbc268cec8427d208a6cedd7e (diff)
parentb8ee7b1ee281b45b245fb454228b8ad847c56200 (diff)
Merge branch 'archweb' into archweb-generic2
Conflicts: devel/views.py feeds.py public/views.py settings.py sitestatic/archweb.js templates/base.html templates/devel/profile.html templates/mirrors/status.html templates/news/view.html templates/packages/flaghelp.html templates/packages/opensearch.xml templates/public/download.html templates/public/feeds.html templates/public/index.html templates/registration/login.html templates/releng/results.html templates/todolists/public_list.html
Diffstat (limited to 'templates/todolists')
-rw-r--r--templates/todolists/email_notification.txt2
-rw-r--r--templates/todolists/list.html18
-rw-r--r--templates/todolists/public_list.html76
-rw-r--r--templates/todolists/view.html84
4 files changed, 71 insertions, 109 deletions
diff --git a/templates/todolists/email_notification.txt b/templates/todolists/email_notification.txt
index 8b22b465..e454ec79 100644
--- a/templates/todolists/email_notification.txt
+++ b/templates/todolists/email_notification.txt
@@ -1,7 +1,7 @@
{% autoescape off %}The todo list "{{ todolist.name }}" has had the following packages added to it for which you are a maintainer:
{% for tpkg in todo_packages %}
-* {{ tpkg.pkg.repo.name|lower }}/{{ tpkg.pkg.pkgname }} ({{ tpkg.pkg.arch.name }}) - {{ tpkg.pkg.get_full_url }}{% endfor %}
+* {{ tpkg.repo.name|lower }}/{{ tpkg.pkgname }} ({{ tpkg.arch.name }}) - {{ tpkg.pkg.get_full_url }}{% endfor %}
Todo list information:
Name: {{ todolist.name }}
diff --git a/templates/todolists/list.html b/templates/todolists/list.html
index 36e0eac7..b7d10264 100644
--- a/templates/todolists/list.html
+++ b/templates/todolists/list.html
@@ -8,11 +8,14 @@
<h2>Package Todo Lists</h2>
- {% if perms.main.add_todolist %}
- <ul class="admin-actions">
+ {% if perms.todolists.add_todolist %}<ul class="admin-actions">
<li><a href="/todo/add/" title="Add new todo list">Add Todo List</a></li>
- </ul>
- {% endif %}
+ </ul>{% endif %}
+
+ <p>Todo lists are used by the developers when a rebuild of a set of
+ packages is needed. This is common when a library has a version bump,
+ during a toolchain rebuild, or a general cleanup of packages in the
+ repositories. The progress can be tracked here.</p>
<table id="dev-todo-lists" class="results todo-table">
<thead>
@@ -31,7 +34,7 @@
<tr class="{% cycle 'odd' 'even' %}">
<td><a href="{{ list.get_absolute_url }}"
title="View todo list: {{ list.name }}">{{ list.name }}</a></td>
- <td>{{ list.date_added|date }}</td>
+ <td>{{ list.created|date }}</td>
<td>{{ list.creator.get_full_name }}</td>
<td class="wrap">{{ list.description|urlize }}</td>
<td>{{ list.pkg_count }}</td>
@@ -43,14 +46,13 @@
</tbody>
</table>
</div>
-{% load cdn %}{% jquery %}
-<script type="text/javascript" src="{% static "jquery.tablesorter.min.js" %}"></script>
+{% load cdn %}{% jquery %}{% jquery_tablesorter %}
<script type="text/javascript" src="{% static "archweb.js" %}"></script>
<script type="text/javascript">
$(document).ready(function() {
// I'm not sure why it didn't autodetect digit, but it has to be explicit
// http://stackoverflow.com/questions/302749/jquery-tablesorter-problem
- $(".results").tablesorter({widgets: ['zebra'], sortList: [[1,1]],
+ $(".results").tablesorter({widgets: ['zebra'], sortList: [[6, 1], [1, 1]],
headers: { 4: { sorter: 'digit' }, 5: { sorter: 'digit' } } });
});
</script>
diff --git a/templates/todolists/public_list.html b/templates/todolists/public_list.html
deleted file mode 100644
index 09251a17..00000000
--- a/templates/todolists/public_list.html
+++ /dev/null
@@ -1,76 +0,0 @@
-{% extends "base.html" %}
-{% load static from staticfiles %}
-{% load package_extras %}
-
-{% block title %}{{ BRANDING_DISTRONAME }} - Todo Lists{% endblock %}
-
-{% block content %}
-<div class="box">
- <h2>Developer Todo Lists</h2>
- <div id="public_todo_lists_toc">
- <h3>Open Developer Todo Lists</h3>
- <p>Todo lists are used by the developers when a rebuild of a set of
- packages is needed. This is common when a library has an .so version
- bump; during a toolchain rebuild, or a general cleanup of packages in
- the repositories. The progress can be tracked here. Only todo lists
- with currently incomplete packages are shown.</p>
- {% if todo_lists %}<ul>
- {% for list in todo_lists %}
- <li><a href="#{{ list.id }}">{{ list.name }}</a></li>
- {% endfor %}
- </ul>{% else %}
- <p>There are currently no incomplete developer todo lists.</p>
- {% endif %}
- </div>
-</div>
-{% if todo_lists %}
-<div id="public-todo-lists">
- {% for list in todo_lists %}
- <div class="box">
- <div class="todo-list">
- <a name="{{ list.id }}"></a>
- <h4>{{ list.name }}</h4>
- <p class="todo-info">{{ list.date_added|date }} - {{ list.creator.get_full_name }}</p>
- <div>{{ list.description|urlize|linebreaks }}</div>
- <table id="todo-pkglist-{{ list.id }}" 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 pkg.complete %}
- <span class="complete">Complete</span>
- {% else %}
- <span class="incomplete">Incomplete</span>
- {% endif %}
- </td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
- </div>
- </div>
- {% endfor %}
-</div>
-{% endif %}
-{% load cdn %}{% jquery %}
-<script type="text/javascript" src="{% static "jquery.tablesorter.min.js" %}"></script>
-<script type="text/javascript" src="{% static "archweb.js" %}"></script>
-<script type="text/javascript">
-$(document).ready(function() {
- $(".results").tablesorter({widgets: ['zebra'], sortList: [[0,0], [1,0]]});
-});
-</script>
-{% endblock %}
diff --git a/templates/todolists/view.html b/templates/todolists/view.html
index e53ead82..644e78b0 100644
--- a/templates/todolists/view.html
+++ b/templates/todolists/view.html
@@ -1,6 +1,7 @@
{% extends "base.html" %}
{% load static from staticfiles %}
{% load package_extras %}
+{% load todolists %}
{% block title %}{{ BRANDING_DISTRONAME }} - Todo: {{ list.name }}{% endblock %}
@@ -10,17 +11,17 @@
<h2>Todo List: {{ list.name }}</h2>
<ul class="admin-actions">
- {% if perms.main.delete_todolist %}
- <li><a href="/todo/delete/{{list.id}}/"
+ {% if perms.todolists.delete_todolist %}
+ <li><a href="/todo/{{ list.slug }}/delete/"
title="Delete this todo list">Delete Todo List</a></li>
{% endif %}
- {% if perms.main.change_todolist %}
- <li><a href="/todo/edit/{{list.id}}/"
+ {% if perms.todolists.change_todolist %}
+ <li><a href="/todo/{{ list.slug }}/edit/"
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>
@@ -29,6 +30,34 @@
<li><a href="pkgbases/{{ svn_root }}/">{{ svn_root }}</a></li>
{% endfor %}</ul>
+ <p>{{ list.packages|length }} total todo list package{{ list.packages|pluralize }} found.</p>
+
+ <div class="box filter-criteria">
+ <h3>Filter Todo List Packages</h3>
+ <form id="todolist_filter" method="post" action=".">
+ <fieldset>
+ <legend>Select filter criteria</legend>
+ {% for arch in arches %}
+ <div><label for="id_arch_{{ arch.name }}" title="Architecture {{ arch.name }}">Arch {{ arch.name }}</label>
+ <input type="checkbox" name="arch_{{ arch.name }}" id="id_arch_{{ arch.name }}" class="arch_filter" value="{{ arch.name }}" checked="checked"/></div>
+ {% endfor %}
+ {% for repo in repos %}
+ <div><label for="id_repo_{{ repo.name|lower }}" title="Target Repository {{ repo.name }}">[{{ repo.name|lower }}]</label>
+ <input type="checkbox" name="repo_{{ repo.name|lower }}" id="id_repo_{{ repo.name|lower }}" class="repo_filter" value="{{ repo.name|lower }}" checked="checked"/></div>
+ {% endfor %}
+ {% if user.is_authenticated %}
+ <div><label for="id_mine_only" title="Show only packages maintained by me">Only Mine</label>
+ <input type="checkbox" name="mine_only" id="id_mine_only" value="mine_only"/></div>
+ {% endif %}
+ <div><label for="id_incomplete" title="Packages not yet completed">Only Incomplete</label>
+ <input type="checkbox" name="incomplete" id="id_incomplete" value="incomplete"/></div>
+ <div ><label>&nbsp;</label><input title="Reset search criteria" type="button" id="criteria_reset" value="Reset"/></div>
+ <div class="clear"></div>
+ <div id="filter-info"><span id="filter-count">{{ list.packages|length }}</span> todo list packages displayed.</div>
+ </fieldset>
+ </form>
+ </div>
+
<table id="dev-todo-pkglist" class="results todo-table">
<thead>
<tr>
@@ -36,33 +65,34 @@
<th>Repository</th>
<th>Name</th>
<th>Current Version</th>
+ <th>Staging Version</th>
<th>Maintainers</th>
<th>Status</th>
</tr>
</thead>
<tbody>
{% for pkg in list.packages %}
- <tr class="{% cycle 'odd' 'even' %}">
- <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>{% todopkg_details_link pkg %}</td>
{% if pkg.pkg.flag_date %}
<td><span class="flagged">{{ pkg.pkg.full_version }}</span></td>
- {% else %}
+ {% elif pkg.pkg %}
<td>{{ pkg.pkg.full_version }}</td>
+ {% else %}
+ <td></td>
{% endif %}
- <td>{{ pkg.pkg.maintainers|join:', ' }}</td>
+ {% with staging=pkg.staging %}
+ <td>{% if staging %}{% pkg_details_link staging staging.full_version %}{% endif %}</td>
+ {% endwith %}
+ <td>{{ 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>
+ {% if perms.todolists.change_todolistpackage %}
+ <a href="/todo/{{ list.slug }}/flag/{{ pkg.id }}/"
+ 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>
@@ -70,17 +100,23 @@
</tbody>
</table>
</div>
-{% load cdn %}{% jquery %}
-<script type="text/javascript" src="{% static "jquery.tablesorter.min.js" %}"></script>
+{% load cdn %}{% jquery %}{% jquery_tablesorter %}
<script type="text/javascript" src="{% static "archweb.js" %}"></script>
<script type="text/javascript">
$(document).ready(function() {
- $('a.status-link').click(todolist_flag);
$(".results").tablesorter({
widgets: ['zebra'],
sortList: [[2,0], [0,0]],
- headers: { 5: { sorter: 'todostatus' } }
+ headers: { 6: { sorter: 'todostatus' } }
});
});
+$(document).ready(function() {
+ $('a.status-link').click(todolist_flag);
+ var filter_func = function() { filter_pkgs_list('#todolist_filter', '#dev-todo-pkglist tbody'); };
+ $('#todolist_filter input').change(filter_func);
+ $('#criteria_reset').click(function() { filter_pkgs_reset(filter_func); });
+ // fire function on page load to ensure the current form selections take effect
+ filter_func();
+});
</script>
{% endblock %}