{% extends "notifications/email_base.html" %}
{% load djblets_email %}
{% load djblets_utils %}

{% block content %}
{%  if review.ship_it %}
 <p>Ship it!</p>
{%  endif %}

{% if review.body_top %}
 <pre style="{{precss}}">{{review.body_top}}</pre>
 <br />
{% endif %}

{% for comment in review.screenshot_comments.all %}
<table bgcolor="#f0f0f0" cellpadding="5" cellspacing="5" style="border: 1px solid #c0c0c0; margin-bottom: 10px">
 <tr>
  <td><a href="{{domain_method}}://{{domain}}{{comment.screenshot.get_absolute_url}}" style="color: black; font-weight: bold; font-size: 9pt;">{{comment.screenshot.image.name|basename}}</a></td>
 </tr>
 <tr>
  <td><a href="{{domain_method}}://{{domain}}{{comment.screenshot.get_absolute_url}}"><img src="{{domain_method}}://{{domain}}{{comment.get_image_url}}" style="border: 1px black solid;" alt="{{comment.screenshot.caption}}"></a></td>
 </tr>
</table>
<pre style="margin-left: 2em; {{precss}}">{{comment.text}}</pre>
<br />
{% endfor %}

{% for comment in review.file_attachment_comments.all %}
<table bgcolor="#f0f0f0" cellpadding="5" cellspacing="5" style="border: 1px solid #c0c0c0; margin-bottom: 10px">
 <tr>
  <td>
   <a href="{{domain_method}}://{{domain}}{{comment.get_absolute_url}}" style="color: black; font-weight: bold; font-size: 9pt;">{{comment.get_link_text}}</a>
{% if comment.file_attachment.caption %}
   <p>{{comment.file_attachment.caption}}</p>
{% endif %}
{% with comment.thumbnail as thumbnail %}
{%  if thumbnail %}
    <div>{{thumbnail|default:''|safe}}</div>
{%  endif %}
{% endwith %}
  </td>
 </tr>
</table>
<pre style="margin-left: 2em; {{precss}}">{{comment.text}}</pre>
<br />
{% endfor %}

{% for entry in comment_entries %}
<div>
{{entry.html|safe}}
<pre style="margin-left: 2em; {{precss}}">{{entry.comment.text}}</pre>
</div>
<br />
{% endfor %}

{% if review.body_bottom %}
 <pre style="{{precss}}">{{review.body_bottom}}</pre>
{% endif %}
<p>- {{review.user|user_displayname}}</p>
{% endblock %}

{% block footer %}
<br />
<p>On {{review_request.time_emailed|date:"F jS, Y, P T"}}, {{review_request.submitter|user_displayname}} wrote:</p>

{%  with 1 as embedded %}
{%   include "notifications/review_request_email.html" %}
{%  endwith %}
{% endblock %}
