-status=open
+status=closed
possible_targets = list(set([bug.target for bug in self.bd if bug.target != None]))
possible_targets.sort(key=unicode.lower)
+ possible_statuses = [u'open', u'assigned', u'test', u'unconfirmed',
+ u'wishlist', u'closed', u'disabled', u'fixed',
+ u'wontfix']
+
return {'possible_assignees': possible_assignees,
'possible_targets': possible_targets,
+ 'possible_statuses': possible_statuses,
'repository_name': self.repository_name,}
def filter_bugs(self, status, assignee, target):
return template.render(bugs=bugs, bd=self.bd, label=label,
assignees=common_info['possible_assignees'],
targets=common_info['possible_targets'],
+ statuses=common_info['possible_statuses'],
repository_name=common_info['repository_name'])
@cherrypy.expose
return template.render(bug=bug, bd=self.bd,
assignees=common_info['possible_assignees'],
targets=common_info['possible_targets'],
+ statuses=common_info['possible_statuses'],
repository_name=common_info['repository_name'])
-
+
+ @cherrypy.expose
+ def create(self, summary):
+ """The view that handles the creation of a new bug."""
+ if summary.strip() != '':
+ self.bd.new_bug(summary=summary).save()
+ raise cherrypy.HTTPRedirect('/', status=302)
config = '/Users/sjl/Documents/cherryflavoredbugseverywhere/cfbe.config'
-bug_root = '/Users/sjl/Documents/cherryflavoredbugseverywhere/.be'
+bug_root = '/Users/sjl/Desktop/be/.be'
cherrypy.quickstart(WebInterface(bug_root), '/', config)
/* @override http://localhost:8080/static/style/cfbe.css */
-body { background-image: url(/static/images/gradient-background.png); background-color: #bbbbbb; background-repeat: repeat-x;}
+body { background-image: url(/static/images/gradient-background.png); background-color: #bbbbbb; background-repeat: repeat-x;
+ /*background-image: url(/static/images/stripe-rhythm.png); background-repeat: repeat;*/ }
-div#header { background-image: url(/static/images/gradient-header.png); background-repeat: repeat-x; background-color: #770005; color: #fff; }
+div#header { background-image: url(/static/images/gradient-header.png); background-repeat: repeat-x;
+ background-color: #770005; color: #fff; margin-top: 1.5em; }
div#header h1 { font-size: 4em; line-height: 1.5em; margin-bottom: 0em; }
-div#logo { text-align: right; color: #d03; padding-top: 1.5em; }
-div#logo h1 { margin-top: 0.65em; margin-bottom: 0.15em; }
div.center-column { width: 55em; margin-left: 5em; }
div#content-wrap { display: inline-block; vertical-align: top; }
a:hover { color: #60b305; }
-table#bug-list { width: 100%; border-collapse: collapse; border: 1px solid #ccc; }
-table#bug-list td, table#bug-list th { border: 0em; border-bottom: 1px solid #ccc; text-align: left; }
-table tr td, table tr th { padding: 0px 5px; line-height: 2.916em; }
+table#bug-list { width: 100%; border-collapse: collapse; border: 0.084em solid #ccc; }
+table#bug-list td, table#bug-list th { border: 0em; border-bottom: 0.084em solid #ccc; text-align: left; }
+table tr td, table tr th { padding: 0px 5px; }
+table tr td { line-height: 2.832em; padding-bottom: 0.084em; }
+table tr th { line-height: 2.916em; }
table { margin-bottom: 1.417em; }
tr.stripe { background-color: #f5e5f0; }
div.bug-comment { margin-left: 2em;}
p.bug-comment-body { white-space: pre; margin: 0em 0em 0em 0em; }
p.bug-comment-footer { margin: 0em 0em; color: #888; }
-h4.bug-comment-header { margin: 1.5em 0em 0em; }
\ No newline at end of file
+h4.bug-comment-header { margin: 1.5em 0em 0em; }
+
+form#create-form { height: 3em; display: none; }
+form#create-form div.field { }
+form#create-form input#create-summary { width: 30em; font-weight: 700; }
+form#create-form button#create-button { }
\ No newline at end of file
e.preventDefault();
});
+ $('#create-bug').click(function(e) {
+ $('#create-form').fadeIn('fast');
+ e.preventDefault();
+ });
+
$('table tr:odd').addClass('stripe');
});
</script>
</head>
<body>
- <div id="logo"><h1>Cherry Flavored Bugs Everywhere!</h1></div>
<div id="header">
<div class="center-column">
<h1>{{ repository_name }}</h1>
<a href="" id="filter-target">Scheduled for...</a>
</span>
<span id="create">
- <a href="fixme">+ Create a new bug</a>
+ <a href="" id="create-bug">+ Create a new bug</a>
</span>
</div>
+ <form id="create-form" action="/create" method="post">
+ <fieldset>
+ <div class="field">
+ <input type="text" class="text" id="create-summary" name="summary" />
+ <button id="create-button" type="submit">Create</button>
+ </div>
+ </fieldset>
+ </form>
<h2>{% block page_title %} {% endblock %}</h2>
{% block content %}{% endblock %}
</div>