From: Steve Losh Date: Sun, 1 Feb 2009 23:02:31 +0000 (-0500) Subject: Implemented bug editing. X-Git-Tag: 1.0.0~53^2~4^2~32 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f0bd55c68d3e5fc7e117c43a00fcf24585021d10;p=be.git Implemented bug editing. --- diff --git a/.be/bugs/545311df-8c88-4504-9f83-11d7c5d8aa50/comments/88d54d29-7312-4bb3-bc50-1970bdb2bb0e/body b/.be/bugs/545311df-8c88-4504-9f83-11d7c5d8aa50/comments/88d54d29-7312-4bb3-bc50-1970bdb2bb0e/body new file mode 100644 index 0000000..5becd48 --- /dev/null +++ b/.be/bugs/545311df-8c88-4504-9f83-11d7c5d8aa50/comments/88d54d29-7312-4bb3-bc50-1970bdb2bb0e/body @@ -0,0 +1 @@ +Apparently the summary can only be one line. That makes the whitespace issue less relevant. \ No newline at end of file diff --git a/.be/bugs/545311df-8c88-4504-9f83-11d7c5d8aa50/comments/88d54d29-7312-4bb3-bc50-1970bdb2bb0e/values b/.be/bugs/545311df-8c88-4504-9f83-11d7c5d8aa50/comments/88d54d29-7312-4bb3-bc50-1970bdb2bb0e/values new file mode 100644 index 0000000..41f53c6 --- /dev/null +++ b/.be/bugs/545311df-8c88-4504-9f83-11d7c5d8aa50/comments/88d54d29-7312-4bb3-bc50-1970bdb2bb0e/values @@ -0,0 +1,21 @@ + + + +Content-type=text/plain + + + + + + +Date=Sun, 01 Feb 2009 22:49:29 +0000 + + + + + + +From=Steve Losh + + + diff --git a/.be/bugs/545311df-8c88-4504-9f83-11d7c5d8aa50/values b/.be/bugs/545311df-8c88-4504-9f83-11d7c5d8aa50/values index 8ed8ba9..ee7978b 100644 --- a/.be/bugs/545311df-8c88-4504-9f83-11d7c5d8aa50/values +++ b/.be/bugs/545311df-8c88-4504-9f83-11d7c5d8aa50/values @@ -1,7 +1,7 @@ -assigned=Steve Losh +assigned=Steve Losh @@ -22,14 +22,14 @@ severity=minor -status=open +status=closed -summary=Implement bug updating (not comments. +summary=Implement bug updating (not comments). Check on the whitespace of the summary field while you're at it. diff --git a/.be/bugs/d63d0bdd-e025-4f7c-9fcf-47a71de6d4d4/values b/.be/bugs/d63d0bdd-e025-4f7c-9fcf-47a71de6d4d4/values new file mode 100644 index 0000000..2d28890 --- /dev/null +++ b/.be/bugs/d63d0bdd-e025-4f7c-9fcf-47a71de6d4d4/values @@ -0,0 +1,49 @@ + + + +assigned=Steve Losh + + + + + + +creator=Steve Losh + + + + + + +severity=minor + + + + + + +status=closed + + + + + + +summary=Reset the state of the values when choosing "Discard Changes." + + + + + + +target=alpha + + + + + + +time=Sun, 01 Feb 2009 22:55:13 +0000 + + + diff --git a/cfbe.py b/cfbe.py index 9724fe7..3de43e7 100755 --- a/cfbe.py +++ b/cfbe.py @@ -123,12 +123,12 @@ class WebInterface: raise cherrypy.HTTPRedirect('/bug?id=%s' % (shortname,), status=302) @cherrypy.expose - def edit(self, id, status, target, assignee, severity, summary=''): + def edit(self, id, status=None, target=None, assignee=None, severity=None, summary=None): """The view that handles editing bug details.""" bug = self.bd.bug_from_uuid(id) shortname = self.bd.bug_shortname(bug) - if summary.strip() != '': + if summary != None: bug.summary = summary else: bug.status = status if status != 'None' else None @@ -142,6 +142,6 @@ class WebInterface: config = '/Users/sjl/Documents/cherryflavoredbugseverywhere/cfbe.config' -bug_root = '/Users/sjl/Desktop/be/.be' -# bug_root = '/Users/sjl/Documents/cherryflavoredbugseverywhere/.be' +# bug_root = '/Users/sjl/Desktop/be/.be' +bug_root = '/Users/sjl/Documents/cherryflavoredbugseverywhere/.be' cherrypy.quickstart(WebInterface(bug_root), '/', config) diff --git a/static/style/cfbe.css b/static/style/cfbe.css index 8c7cef9..34bac92 100644 --- a/static/style/cfbe.css +++ b/static/style/cfbe.css @@ -54,4 +54,7 @@ p#add-comment-link {margin-top: 1.5em; } form#bug-details-edit-form { display: none; } form#bug-details-edit-form label { font-weight: 700; width: 7.5em; margin-left: 0em; margin-right: 1em; text-align: right; } -form#bug-details-edit-form .field { padding-left: 0em;} \ No newline at end of file +form#bug-details-edit-form .field { padding-left: 0em; } + +form#bug-summary-edit-form { display: none; } +input#bug-summary-edit-body { width: 100%; } \ No newline at end of file diff --git a/templates/bug.html b/templates/bug.html index 01a2476..48571e9 100644 --- a/templates/bug.html +++ b/templates/bug.html @@ -1,12 +1,19 @@ {% extends "base.html" %} {% block page_title %} - Bug {{ bd.bug_shortname(bug) }} – {{ bug.summary }} + Bug {{ bd.bug_shortname(bug) }} – {{ bug.summary|truncate(50) }} {% endblock %} {% block script %} {% endblock %} @@ -76,7 +96,7 @@ @@ -85,7 +105,7 @@ @@ -96,11 +116,27 @@ -

Summary

-

+

+ + edit + +

{{ bug.summary }}

+
+
+ +
+ +
+
+ + +
+
+
+

Comments

{% for comment in bug.comments() %}
@@ -113,7 +149,6 @@
-