{% 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.file_attachment.get_absolute_url}}" style="color: black; font-weight: bold; font-size: 9pt;">{{comment.file_attachment.caption|default:comment.file_attachment.filename}}</a></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>- {% if review.user.first_name != "" %}{{review.user.first_name}}{% else %}{{review.user.username}}{% endif %}</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 %}
