802d01307f77

web: add a bit of context for colorboxes
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Fri, 18 Jun 2010 21:12:56 -0400
parents 78d9f73badd9
children 9af83b8976fb
branches/tags (none)
files review/static/style.css review/static/style.less review/templates/pieces/comment.html review/templates/pieces/linecomment.html

Changes

--- a/review/static/style.css	Fri Jun 18 20:57:12 2010 -0400
+++ b/review/static/style.css	Fri Jun 18 21:12:56 2010 -0400
@@ -687,3 +687,9 @@
   font-family: Monaco, Consolas, "Courier New", monospace;
   white-space: pre;
 }
+#colorbox .context .context-head {
+  color: #888888;
+  font-size: 20px;
+  margin-top: -16px;
+  margin-bottom: 18px;
+}
--- a/review/static/style.less	Fri Jun 18 20:57:12 2010 -0400
+++ b/review/static/style.less	Fri Jun 18 21:12:56 2010 -0400
@@ -656,4 +656,12 @@
         font-family: @font-mono;
         white-space: pre;
     }
+    .context {
+        .context-head {
+            color: @c-light;
+            font-size: 20px;
+            margin-top: -16px;
+            margin-bottom: 18px;
+        }
+    }
 }
--- a/review/templates/pieces/comment.html	Fri Jun 18 20:57:12 2010 -0400
+++ b/review/templates/pieces/comment.html	Fri Jun 18 21:12:56 2010 -0400
@@ -26,6 +26,13 @@
                 <a href="mailto:{{ utils['email'](comment.author) }}">{{ utils['templatefilters'].person(comment.author) }}</a>
                 said:
             </div>
+            <div class="context">
+                {% if comment.filename %}
+                    <div class="context-head">on {{ comment.filename }}</div>
+                {% else %}
+                    <div class="context-head">on changeset {{ rev.rev() }}:{{ utils['node_short'](rev.node()) }}</div>
+                {% endif %}
+            </div>
             <div class="message">{{ comment.message }}</div>
         </div>
     </div>
--- a/review/templates/pieces/linecomment.html	Fri Jun 18 20:57:12 2010 -0400
+++ b/review/templates/pieces/linecomment.html	Fri Jun 18 21:12:56 2010 -0400
@@ -31,6 +31,9 @@
                     <a href="mailto:{{ utils['email'](comment.author) }}">{{ utils['templatefilters'].person(comment.author) }}</a>
                     said:
                 </div>
+                <div class="context">
+                    <div class="context-head">in {{ comment.filename }}</div>
+                </div>
                 <div class="message">{{ comment.message }}</div>
             </div>
         </div>