0a9effb274b0 webui

Add review-level comments.
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Wed, 14 Oct 2009 20:30:36 -0400
parents 93baa16777e9
children c48a619ef5db
branches/tags webui
files review/web_media/style.css review/web_templates/review.html

Changes

--- a/review/web_media/style.css	Wed Oct 14 20:21:21 2009 -0400
+++ b/review/web_media/style.css	Wed Oct 14 20:30:36 2009 -0400
@@ -48,6 +48,24 @@
     text-align: right;
 }
 
+/* Comments. */
+.comment {
+    white-space: normal;
+    background: #FBEAD0;
+    border: 1px dashed #666;
+    font-family: Consolas, Monaco, "Courier New", Courier, monospace;
+    padding: 0.75em;
+    margin-bottom: 1.5em;
+}
+.comment div.avatar {
+    border: 1px solid black;
+    float: right;
+}
+.comment div.message {
+    margin-top: 1.5em;
+    white-space: pre;
+}
+
 /* Diffs. */
 div.diff {
     overflow: auto;
@@ -61,21 +79,6 @@
 table tr.rem {
     background: #FBDBDA;
 }
-table tr td.comment {
-    white-space: normal;
-    background: #F4FF68;
-    border-top: 1px dashed #666;
-    border-bottom: 1px dashed #666;
-    font-family: Consolas, Monaco, "Courier New", Courier, monospace;
-    padding: 0.75em;
-}
-table tr td.comment div.author {
-}
-table tr td.comment div.message {
-    margin-top: 1.5em;
-    white-space: pre;
-}
-table tr td.comment div.avatar {
-    border: 1px solid black;
-    float: right;
+div.diff .comment {
+    margin-bottom: 0em;
 }
\ No newline at end of file
--- a/review/web_templates/review.html	Wed Oct 14 20:21:21 2009 -0400
+++ b/review/web_templates/review.html	Wed Oct 14 20:30:36 2009 -0400
@@ -3,6 +3,16 @@
 $ ctx = rd.target[rcset.node]
 <h2>Changeset ${ ctx.rev() }: ${ ctx.description() }</h2>
 
+$ review_level_comments = filter(lambda c: not c.filename, rcset.comments)
+$for comment in review_level_comments:
+    <div class="comment">
+        <div class="avatar"><img height="52" width="52" src="http://www.gravatar.com/avatar/${ md5(email(comment.author)).hexdigest() }?s=52"/></div>
+        <div>
+            <div class="author"><a href="mailto:${ email(comment.author) }">${ templatefilters.person(comment.author) }</a> said:</div>
+            <div class="message">${ comment.message }</div>
+        </div>
+    </div>
+
 $for filename, diff in rcset.diffs().iteritems():
     <h3>${ filename }</h3>
     <div class="diff">