Display comments in view/edit bug display
authorAaron Bentley <abentley@panoramicfeedback.com>
Fri, 2 Dec 2005 19:44:40 +0000 (19:44 +0000)
committerAaron Bentley <abentley@panoramicfeedback.com>
Fri, 2 Dec 2005 19:44:40 +0000 (19:44 +0000)
beweb/beweb/static/css/style.css
beweb/beweb/templates/edit_bug.kid

index 6f437770f66e39b5b918816098288bad8fbcde77..9abc1447bb4f31ba15a1c79d642d25d652803a99 100644 (file)
@@ -46,3 +46,24 @@ body
     font-family: "Verdana";
     font-size:11pt;
 }
+.comment
+{
+    margin-top: 1em;
+    margin-bottom; 60px;
+    padding: 0.5em;
+    border: dashed thin black;
+    background-color: #ffa;
+    width:60%
+}
+.comment table
+{
+    background-color: transparent;
+}
+.comment td
+{
+    background-color: transparent;
+}
+.comment pre
+{
+    font-family: "Verdana";
+}
index 9581dac2c83a84efe1f432b854b5ea881ea3782d..4001253255d1fef34a28f30fc8d79c08dadf8d33 100644 (file)
@@ -1,6 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <?python
 from libbe.bugdir import severity_levels
+from libbe.utility import time_to_str 
 def select_among(name, options, default):
     output = ['<select name="%s">' % name]
     for option in options:
@@ -27,7 +28,14 @@ def select_among(name, options, default):
 <tr><td>Status</td><td>Severity</td><td>Assigned To</td><td>Summary</td></tr>
 <tr><td>${select_among("status", ["open", "closed", "in-progress"], bug.status)}</td><td>${select_among("severity", severity_levels, bug.severity)}</td><td>${bug.assigned}</td><td><input name="summary" value="${bug.summary}" size="80" /></td></tr>
 </table>
-<input type="submit" name="action" value="Update"/>
+<div py:for="comment in bug.list_comments()" class="comment">
+    <table>
+        <tr><td>From</td><td>${comment.From}</td></tr>
+        <tr><td>Date</td><td>${time_to_str(comment.date)}</td></tr>
+    </table>
+    <pre>${comment.body}</pre>
+</div>
+<p><input type="submit" name="action" value="Update"/></p>
 </form>
 <a href="/${project_id}/">Bug List</a>
 </body>