{% extends "reviews/ui/default.html" %}
{% load i18n %}

{# We reuse the diff styles in order to get the same look and remain #}
{# compatible with the diffviewer JavaScript for comment selection.  #}

{% block review_ui_box_content_inner %}
 <div id="diffs">
  <div class="diff-container text-review-ui {{review_ui.extra_css_classes|join:' '}}{%  if review_ui.can_render_text and not diff_type_mismatch %} text-review-ui-has-tabs{% endif %}">
   <div class="review-ui-header">
{%  if num_revisions > 1 %}
    <div id="revision_label"></div>
    <div id="attachment_revision_selector"></div>
{%  endif %}

{%  if review_ui.can_render_text and not diff_type_mismatch %}
    <div class="text-review-ui-views">
     <ul>
      <li class="active" data-view-mode="rendered"><a href="#rendered">{% trans "Rendered" %}</a></li>
      <li data-view-mode="source"><a href="#source">{% trans "Source" %}</a></li>
     </ul>
    </div>
{%  endif %}
   </div>

{%  if review_ui.can_render_text %}
{%   block rendered_text_content %}
{%    include "reviews/ui/_text_rendered_table.html" with lines=rendered_lines chunks=rendered_chunks %}
{%   endblock rendered_text_content %}
{%  endif %}

{%  block text_content %}
{%   include "reviews/ui/_text_table.html" with hide=review_ui.can_render_text lines=text_lines chunks=source_chunks %}
{%  endblock text_content %}

  </div>
 </div>
{% endblock %}

{# We're rendering much of the review UI in the template, so we don't #}
{# want to create a new element for it and append it.                 #}

{% block review_ui_view_params %}
    el: $('#review_ui_{{review_ui_uuid}}'),
{% endblock %}

{% block review_ui_render %}
view.render();
{% endblock %}
