bodhi/controllers.py | 2 -
bodhi/templates/critpath.kid | 84 +++++++++++++++++++++++++++++++++++++++++++
2 files changed, 85 insertions(+), 1 deletion(-)
New commits:
commit b8b6db964c79c119aedd306e82abd97ced8d6fa8
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Mar 3 17:26:45 2010 -0500
Create a custom critpath template
diff --git a/bodhi/controllers.py b/bodhi/controllers.py
index f5b1d5f..cabc879 100644
--- a/bodhi/controllers.py
+++ b/bodhi/controllers.py
@@ -1262,7 +1262,7 @@ class Root(controllers.RootController):
builds[tag] = build['nvr']
return builds
- @expose(template='bodhi.templates.pending', allow_json=True)
+ @expose(template='bodhi.templates.critpath', allow_json=True)
@paginate('updates', limit=1000, max_limit=1000)
def critpath(self, *args, **kw):
updates = []
diff --git a/bodhi/templates/critpath.kid b/bodhi/templates/critpath.kid
new file mode 100644
index 0000000..51525ca
--- /dev/null
+++ b/bodhi/templates/critpath.kid
@@ -0,0 +1,84 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:py="http://purl.org/kid/ns#"
+ py:extends="'master.kid'">
+
+<head>
+ <meta content="text/html; charset=UTF-8"
http-equiv="content-type" py:replace="''"/>
+ <title>Fedora Updates</title>
+</head>
+
+<body>
+ <b>${num_items} Pending Updates</b>
+ <div class="list">
+ <span py:for="page in tg.paginate.pages">
+ <a py:if="page != tg.paginate.current_page"
+ href="${tg.paginate.get_href(page)}">${page}</a>
+ <b py:if="page ==
tg.paginate.current_page">${page}</b>
+ </span>
+ <a href="?tg_paginate_limit=${num_items}">all</a>
+ </div>
+
+ <table class="list">
+ <tr class="list">
+ <th class="list">
+ <b>Update</b>
+ </th>
+ <th class="list">
+ <b>Release</b>
+ </th>
+ <th class="list">
+ <b>Type</b>
+ </th>
+ <th class="list">
+ <b>Status</b>
+ </th>
+ <th class="list">
+ <center><b>Karma</b></center>
+ </th>
+ <th class="list">
+ <b>Request</b>
+ </th>
+ <th class="list">
+ <b>Submitter</b>
+ </th>
+ <th class="list">
+ <b>Created</b>
+ </th>
+ </tr>
+ <?python row_color = "#FFFFFF" ?>
+ <tr class="list" bgcolor="${row_color}"
py:for="update in updates">
+ <td class="list" width="35%">
+ <a class="list"
href="${tg.url(update.get_url())}">${update.title.replace(',', ',
')}</a>
+ </td>
+ <td class="list">
+ <a class="list" href="${tg.url('/%s' %
update.release.name)}">${update.release.long_name}</a>
+ </td>
+ <td class="list">
+ <img src="${tg.url('/static/images/%s.png' %
update.type)}" title="${update.type}" /> ${update.type}
+ </td>
+ <td class="list">
+ ${update.status}
+ </td>
+ <?python
+ if update.karma < 0: karma = -1
+ elif update.karma > 0: karma = 1
+ else: karma = 0
+ ?>
+ <td class="list" align="center">
+ <img src="${tg.url('/static/images/karma%d.png' %
karma)}" align="top"/> <b>${update.karma}</b>
+ </td>
+ <td class="list">
+ <img src="${tg.url('/static/images/%s-large.png' %
update.request)}" title="${update.request}"/> ${update.request}
+ </td>
+ <td class="list">
+ <a href="${tg.url('/user/' +
update.submitter)}">${update.submitter}</a>
+ </td>
+ <td class="list">
+ ${update.date_submitted}
+ </td>
+ <?python row_color = (row_color == "#f1f1f1") and
"#FFFFFF" or "#f1f1f1" ?>
+ </tr>
+ </table>
+
+</body>
+</html>