MozReview: Add permalink to review blocks. (Bug 1323817) r=smacleod
authorDavid Walsh <dwalsh@mozilla.com>
Thu, 15 Dec 2016 14:45:44 -0600
changeset 57 ad863bcd1d554d8cdfc13af0fc221ad7ed1bd299
parent 56 ff17a224682c9ce90b3a190e2db7e7bf0b32b9e7
child 58 b78120ce7ec64b14987316cecc81a0870943684c
push id33
push usersmacleod@mozilla.com
push dateSat, 07 Jan 2017 18:10:07 +0000
reviewerssmacleod
bugs1323817
MozReview: Add permalink to review blocks. (Bug 1323817) r=smacleod MozReview-Commit-ID: 8KkAYoGnp83
reviewboard/reviewboard/static/rb/css/pages/reviews_mozreview.less
reviewboard/reviewboard/templates/reviews/boxes/review_mozreview.html
--- a/reviewboard/reviewboard/static/rb/css/pages/reviews_mozreview.less
+++ b/reviewboard/reviewboard/static/rb/css/pages/reviews_mozreview.less
@@ -1633,16 +1633,20 @@
     }
   }
 
   .posted_time {
     color: #555;
     text-align: right;
     padding-top: 2px;
 
+    a {
+      color: #0700E8;
+    }
+
     .on-mobile-medium-screen-720({
       margin-top: 0.5em;
       text-align: left;
     });
   }
 
 }
 
--- a/reviewboard/reviewboard/templates/reviews/boxes/review_mozreview.html
+++ b/reviewboard/reviewboard/templates/reviews/boxes/review_mozreview.html
@@ -26,17 +26,21 @@
 {% box entry.class %}
  <div class="box-main">
 
   <div class="header">
 {%  template_hook_point "review-summary-header-pre" %}
    <div class="collapse-button btn"><div class="rb-icon {% if entry.collapsed %}rb-icon-expand-review{% else %}rb-icon-collapse-review{% endif %}"></div></div>
    <div class="header-details">
     <div class="reviewer"><a href="{% url 'user' entry.review.user %}" class="user">{{entry.review.user|user_displayname}}</a></div>
-    <div class="posted_time">{% localtime on %}{% blocktrans with entry.review.timestamp as timestamp and entry.review.timestamp|date:"c" as timestamp_raw %}<time class="timesince" datetime="{{timestamp_raw}}">{{timestamp}}</time>{% endblocktrans %}{% endlocaltime %}</div>
+    <div class="posted_time">
+      {% localtime on %}{% blocktrans with entry.review.timestamp as timestamp and entry.review.timestamp|date:"c" as timestamp_raw %}<time class="timesince" datetime="{{timestamp_raw}}">{{timestamp}}</time>{% endblocktrans %}{% endlocaltime %}
+      |
+      <a href="#review{{entry.review.id}}">permalink</a>
+    </div>
    </div>
 {%  template_hook_point "review-summary-header-post" %}
   </div>
 
   <div class="banners"></div>
 
   <div class="body">
    <pre class="body_top reviewtext {% rich_text_classname entry.review.body_top_rich_text %}">{{entry.review.body_top|render_markdown:entry.review.body_top_rich_text}}</pre>