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

{% block title %}{% trans "Screenshot" %}{%if screenshot.caption %}: {{screenshot.caption}}{% endif %}{% endblock %}

{% block jsconsts %}
{{block.super}}
{%  include "reviews/review_flags.js" %}
  var gScreenshotId = '{{screenshot.id}}';
{% endblock %}

{% block css %}
<link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}rb/css/diffviewer.css?{{MEDIA_SERIAL}}" />
<link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}rb/css/reviews.css?{{MEDIA_SERIAL}}" />
{% endblock %}

{% block scripts-post %}
<script language="javascript" src="{{MEDIA_URL}}rb/js/reviews.js?{{MEDIA_SERIAL}}"></script>
<script language="javascript" src="{{MEDIA_URL}}rb/js/screenshots.js?{{MEDIA_SERIAL}}"></script>
<script type="text/javascript" src="{{MEDIA_URL}}rb/js/jquery.form.js?{{MEDIA_SERIAL}}"></script>

<script language="javascript">
  $(document).ready(function() {
	  $("#screenshot-display").screenshotCommentBox(
		{% screenshotcommentcounts screenshot %});
	});
</script>

{% endblock %}

{% block content %}
{% box "review-request"%}
 <ul class="actions">
{% include "reviews/review_request_actions_secondary.html" %}
 <li class="primary"><a href="diff/raw/">{% trans "Download Diff" %}</a></li>
{% include "reviews/review_request_actions_primary.html" %}
  <li class="primary"><a href="{{review_request.get_absolute_url}}">{% trans "View Reviews" %}</a></li>
{% if review_request_details.diffset or review_request.diffset_history.diffsets.count %}
 <li class="primary"><a href="{{review_request.get_absolute_url}}diff/#index_header">{% trans "View Diff" %}</a></li>
{% endif %}
 </ul>

{% include "reviews/review_request_dlgs.html" %}

 <div class="main">
  <h1 id="summary"><a href="{{review_request.get_absolute_url}}">{{review_request_details.summary}}</a></h1>
  <div class="content">
  {% trans "Screenshots:" %}<br />
{% include "reviews/screenshotindex.html" %}
  </div>
 </div>
{% endbox %}

<div id="screenshot-display">
 <img src="{{screenshot.image.url}}" alt="{{screenshot.caption}}" />
</div>

{% include "reviews/screenshotindex.html" %}

{% endblock %}
