# HG changeset patch # User Steve Losh # Date 1256164641 14400 # Node ID 41cb7a791e507183bc8430f16cbd80af155d33f2 # Parent 892dd344113c00068523bb0a38219f35b0b5e55a Add (working) review-level and file-level comment forms. diff -r 892dd344113c -r 41cb7a791e50 review/web_templates/base.html --- a/review/web_templates/base.html Wed Oct 21 18:12:45 2009 -0400 +++ b/review/web_templates/base.html Wed Oct 21 18:37:21 2009 -0400 @@ -7,6 +7,8 @@ ${ basename(rd.target.root) } / hg-review + + diff -r 892dd344113c -r 41cb7a791e50 review/web_templates/review.html --- a/review/web_templates/review.html Wed Oct 21 18:12:45 2009 -0400 +++ b/review/web_templates/review.html Wed Oct 21 18:37:21 2009 -0400 @@ -13,6 +13,18 @@ +
+
+
+ + +
+
+ +
+
+
+ $for filename, diff in rcset.diffs().iteritems():

${ filename }

@@ -26,6 +38,19 @@ +
+
+
+ + +
+
+ +
+ +
+
+
$ max_line = diff['max'] diff -r 892dd344113c -r 41cb7a791e50 review/web_ui.py --- a/review/web_ui.py Wed Oct 21 18:12:45 2009 -0400 +++ b/review/web_ui.py Wed Oct 21 18:37:21 2009 -0400 @@ -58,6 +58,17 @@ def GET(self, node_short): return render.review(_rd, _rd[node_short]) + def POST(self, node_short): + i = web.input() + body = i['body'] + filename = i['filename'] if 'filename' in i else '' + + if body: + rcset = _rd[node_short] + rcset.add_comment(body, filename) + + raise web.seeother('/review/%s/' % node_short) + class media: def GET(self, fname):