{% extends "reviews/reviewable_base.html" %}
{% load djblets_deco djblets_js djblets_utils i18n reviewtags tz %}

{% block title %}
 {{review_ui.name}}{% if caption %}: {{caption}}{% endif %}
{% endblock %}

{% block css %}
{{block.super}}
{%  block review_ui_css %}{% endblock %}
{% endblock %}

{% block content %}
{%  definevar "review_ui_box_content" %}{% block review_ui_box_content %}{% endblock %}{% enddefinevar %}

<div id="review_request" class="review-ui-box{% if review_ui_box_content %} has-review-ui-box-content{% endif %}">
{%  include "reviews/trophy_box.html" %}
 <div id="review_request_banners"></div>

{%  box "review-request" %}
 <div class="review-request-header">
  <ul class="actions page-tabs">
   <li><a href="{{review_request.get_absolute_url}}">{% trans "Reviews" %}</a></li>
   <li class="active"><a href=".">{% trans "File" %}</a></li>
{%   if has_diffs %}
   <li><a href="{% url 'view-diff' review_request.display_id %}#index_header">{% trans "Diff" %}</a></li>
{%   endif %}
  </ul>

  <div class="actions-container">
   {% star review_request %}
   <ul class="actions actions-right-container">
    <li class="has-menu">
     <a href="#" class="mobile-actions-menu-label"><span class="fa fa-ellipsis-h fa-lg"></span></a>
     <ul class="actions actions-right">
{%   include "reviews/review_request_actions_secondary.html" %}
{%   if has_diffs %}
      <li><a href="{% url 'raw-diff' review_request.display_id %}">{% trans "Download Diff" %}</a></li>
{%   endif %}
{%   include "reviews/review_request_actions_primary.html" %}
     </ul>
    </li>
   </ul>
  </div>
 </div>
 <div class="content review-ui-box-content">
  {{review_ui_box_content}}
 </div>
{%  endbox %}
</div>

<div class="review-ui-standalone">
{%  block review_ui_content %}{% endblock %}
</div>
{% endblock %}

{% block scripts-post %}
{{block.super}}

<script>
    RB.PageManager.setPage(new RB.ReviewablePageView({
{%  localtime off %}
        lastActivityTimestamp: {{last_activity_time|json_dumps}},
{%  endlocaltime %}
{%  include "reviews/reviewable_page_data.js" %}
    }));
</script>

{%  block review_ui_scripts %}{% endblock %}
{% endblock %}
