mozreview: add template hook to provide MozReview flag information (bug 1274375) r=davidwalsh,glob
authorPiotr Zalewa <pzalewa@mozilla.com>
Thu, 05 Jan 2017 19:40:53 +0100
changeset 67 1d136f2597650909450e5af3a079b55cd95e2a3f
parent 66 6a630d49827899281804a6e691ae81f95ce9b14c
child 68 6a7fac88d5b0569607e57598e9077f5e6f12895d
push id38
push userbjones@mozilla.com
push dateWed, 01 Feb 2017 12:51:24 +0000
reviewersdavidwalsh, glob
bugs1274375
mozreview: add template hook to provide MozReview flag information (bug 1274375) r=davidwalsh,glob We're currently injecting a DOM elements using a JavaScript hack. This patch provides a `template_hook_point` called "review-summary-body" so MozReview hook can provide review flag information using a template. MozReview-Commit-ID: 9dX8whACcaW
reviewboard/reviewboard/templates/reviews/boxes/review_mozreview.html
reviewboard/reviewboard/templates/reviews/review_detail_mozreview.html
--- a/reviewboard/reviewboard/templates/reviews/boxes/review_mozreview.html
+++ b/reviewboard/reviewboard/templates/reviews/boxes/review_mozreview.html
@@ -38,16 +38,17 @@
     </div>
    </div>
 {%  template_hook_point "review-summary-header-post" %}
   </div>
 
   <div class="banners"></div>
 
   <div class="body">
+{% template_hook_point "review-summary-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>
    <div class="body-top-comment-section">
 {%  reply_section entry "" "body_top" "rcbt" entry.review.body_top %}
    </div>
 
 {%  if entry.comments.diff_comments or entry.comments.screenshot_comments or entry.comments.file_attachment_comments %}
    <dl class="review-comments">
 
--- a/reviewboard/reviewboard/templates/reviews/review_detail_mozreview.html
+++ b/reviewboard/reviewboard/templates/reviews/review_detail_mozreview.html
@@ -77,17 +77,17 @@
     <span>{% trans "Collapse All" %}</span>
    </a>
   </li>
 {%  endif %}
  </ul>
 
 {%  for entry in entries %}
 {%   if entry.review %}
-{%    include "reviews/boxes/review.html" %}
+{%    include "reviews/boxes/review_mozreview.html" %}
 {%   elif entry.changedesc %}
 {%    include "reviews/boxes/change.html" %}
 {%   endif %}
 {%  endfor %}
 {% endblock content %}
 </div>
 
 {% block scripts-post %}