From: Steve Losh
Date: Sat, 31 Jan 2009 04:53:09 +0000 (-0500)
Subject: Implemented the status filter.
X-Git-Tag: 1.0.0~53^2~4^2~41
X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=120720baf3ce09aacaddb82c0937af596aea62fe;p=be.git
Implemented the status filter.
---
diff --git a/.be/bugs/984472f6-98f5-48fc-b521-70a1e5f60614/values b/.be/bugs/984472f6-98f5-48fc-b521-70a1e5f60614/values
index 3abc050..21d3cef 100644
--- a/.be/bugs/984472f6-98f5-48fc-b521-70a1e5f60614/values
+++ b/.be/bugs/984472f6-98f5-48fc-b521-70a1e5f60614/values
@@ -36,6 +36,13 @@ summary=Implement the status filters.
+target=alpha
+
+
+
+
+
+
time=Sat, 31 Jan 2009 00:22:40 +0000
diff --git a/.be/bugs/decc6e78-a3db-4cd3-ad23-2bf8ed77cb0d/values b/.be/bugs/decc6e78-a3db-4cd3-ad23-2bf8ed77cb0d/values
index 7b5aaad..96f52d3 100644
--- a/.be/bugs/decc6e78-a3db-4cd3-ad23-2bf8ed77cb0d/values
+++ b/.be/bugs/decc6e78-a3db-4cd3-ad23-2bf8ed77cb0d/values
@@ -22,7 +22,7 @@ severity=minor
-status=open
+status=closed
@@ -36,6 +36,13 @@ summary=Implement the target filters.
+target=alpha
+
+
+
+
+
+
time=Sat, 31 Jan 2009 02:58:44 +0000
diff --git a/cfbe.py b/cfbe.py
index 7e2db0e..4509bf1 100755
--- a/cfbe.py
+++ b/cfbe.py
@@ -16,7 +16,7 @@ class WebInterface:
"""The web interface to CFBE."""
@cherrypy.expose
- def index(self, status='open', assignee=''):
+ def index(self, status='open', assignee='', target=''):
bd.load_all_bugs()
if status == 'open':
@@ -25,18 +25,28 @@ class WebInterface:
elif status == 'closed':
status = ['closed', 'disabled', 'fixed', 'wontfix']
label = 'All Closed Bugs'
+
if assignee != '':
if assignee == 'None':
label += ' Currently Unassigned'
else:
label += ' Assigned to %s' % (assignee,)
+ if target != '':
+ if target == 'None':
+ label += ' Currently Unschdeuled'
+ else:
+ label += ' Scheduled for %s' % (target,)
+
template = env.get_template('list.html')
possible_assignees = list(set([bug.assigned for bug in bd if bug.assigned != None]))
possible_assignees.sort(key=unicode.lower)
+ possible_targets = list(set([bug.target for bug in bd if bug.target != None]))
+ possible_targets.sort(key=unicode.lower)
+
bugs = [bug for bug in bd if bug.status in status]
if assignee != '':
@@ -44,8 +54,14 @@ class WebInterface:
assignee = None
bugs = [bug for bug in bugs if bug.assigned == assignee]
+ if target != '':
+ if target == 'None':
+ target = None
+ bugs = [bug for bug in bugs if bug.target == target]
+
return template.render(bugs=bugs, bd=bd, label=label,
assignees=possible_assignees,
+ targets=possible_targets,
repository_name=repository_name)
diff --git a/static/style/cfbe.css b/static/style/cfbe.css
index 3cd4241..ee699b4 100644
--- a/static/style/cfbe.css
+++ b/static/style/cfbe.css
@@ -30,4 +30,4 @@ table tr td, table tr th { padding: 0px 5px; line-height: 2.916em; }
table { margin-bottom: 1.417em; }
tr.stripe { background-color: #f5e5f0; }
-div#assignees { display: none; }
+div#assignees, div#targets { display: none; }
diff --git a/templates/base.html b/templates/base.html
index 8f8fb3d..66ecd2f 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -19,9 +19,16 @@
$('#external-pane').hide();
$('#external-pane-content').corners('bottom 8px');
- $('#filter-assignee').click(function() {
+ $('#filter-assignee').click(function(e) {
$('#external-pane-content').html($('#assignees').html());
$('#external-pane').fadeIn('fast');
+ e.preventDefault();
+ });
+
+ $('#filter-target').click(function(e) {
+ $('#external-pane-content').html($('#targets').html());
+ $('#external-pane').fadeIn('fast');
+ e.preventDefault();
});
$('table tr:odd').addClass('stripe');
@@ -43,8 +50,8 @@
Just show me:
Open
Closed
- Assigned to...
- Scheduled for...
+ Assigned to...
+ Scheduled for...
+ Create a new bug
@@ -76,5 +83,13 @@
{% endfor %}
+