<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <title>{{collection.title}}</title>
  <link rel="stylesheet" type="text/css" href="{{static_files}}/style.css">
</head>

<body>

<div id="bodyContent">
<div class="row">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
  <td class="data">{{collection.title}}</td>
  <td class="title" align="right">{{date}}</td>
</tr>
</tbody>
</table>
</div>

  {% for record in records %}
<div class="row">
<table border="0" cellpadding="0" cellspacing="0" >
<tbody>
<tr style="height: 1px">
  <td width="15%"/>
  <td width="35%"/>
  <td width="15%"/>
  <td width="35%"/>
</tr>
<tr align="center">
  <td colspan="4" class="s4" align="center"><b>{{record.title}}</b></td>
</tr>
<tr>
  <td colspan="4" class="cell_full title" align="center">{{titles.obverseimg}}</td>
</tr>
<tr>
  <td colspan="4" class="cell_full text" style="padding: 0;">
    <div style="display:table;">
      <div width="200px" align="center" style="display: table-cell; width: 200px;">
        <img style="max-width: 200px" src="{{static_files}}/{{record.obverseimg}}" alt="{{titles.obverseimg}}">
      </div>
      <div style="display: table-cell; padding: 0 4px; vertical-align: middle;">
        {{record.obversedesign}}
      </div>
    </div>
  </td>
</tr>
<tr>
  <td colspan="4" class="cell_full title" align="center">{{titles.reverseimg}}</td>
</tr>
<tr>
  <td colspan="4" class="cell_full text" style="padding: 0;">
    <div style="display:table;">
      <div width="200px" align="center" style="display: table-cell; width: 200px;">
        <img style="max-width: 200px" src="{{static_files}}/{{record.reverseimg}}" alt="{{titles.reverseimg}}">
      </div>
      <div style="display: table-cell; padding: 0 4px; vertical-align: middle;">
        {{record.reversedesign}}
      </div>
    </div>
  </td>
</tr>

<tr>
  <td colspan="1" class="cell_left title">{{titles.rarity}}:</td>
  <td colspan="1" class="cell_mid data">{{record.rarity}}</td>
  <td colspan="1" class="cell_mid title">{{titles.material}}:</td>
  <td colspan="1" class="cell_right data">{{record.material}}</td>
</tr>
<tr>
  <td colspan="1" class="cell_left title">{{titles.year}}:</td>
  <td colspan="1" class="cell_mid data">{{record.year}}</td>
  <td colspan="1" class="cell_mid title">{{titles.fineness}}:</td>
  <td colspan="1" class="cell_right data">{{record.fineness}}</td>
</tr>
<tr>
  <td colspan="1" class="cell_left title">{{titles.country}}:</td>
  <td colspan="1" class="cell_mid data">{{record.country}}</td>
  <td colspan="1" class="cell_mid title">{{titles.weight}}:</td>
  <td colspan="1" class="cell_right data">{{record.weight}}</td>
</tr>
<tr>
  <td colspan="1" class="cell_left title">{{titles.value}}:</td>
  <td colspan="1" class="cell_mid data">{{record.value}}</td>
  <td colspan="1" class="cell_mid title">{{titles.diameter}}:</td>
  <td colspan="1" class="cell_right data">{{record.diameter}}</td>
</tr>
<tr>
  <td colspan="1" class="cell_left title">{{titles.unit}}:</td>
  <td colspan="1" class="cell_mid data">{{record.unit}}</td>
  <td colspan="1" class="cell_mid title">{{titles.thickness}}:</td>
  <td colspan="1" class="cell_right data">{{record.thickness}}</td>
</tr>
<tr>
  <td colspan="1" rowspan="2" class="cell_left title">{{titles.mint}}:</td>
  <td colspan="1" rowspan="2" class="cell_mid data">{{record.mint}}</td>
  <td colspan="1" class="cell_mid title">{{titles.mintage}}:</td>
  <td colspan="1" class="cell_right data">{{record.mintage}}</td>
</tr>
<tr>
  <!--td></td>
  <td></td-->
  <td colspan="1" class="cell_mid title">{{titles.dateemis}}:</td>
  <td colspan="1" class="cell_right data">{{record.dateemis}}</td>
</tr>
<tr>
  <td colspan="1" class="cell_left title">{{titles.status}}:</td>
  <td colspan="1" class="cell_mid data">{{record.status}}</td>
  <td colspan="1" class="cell_mid title">{{titles.quality}}:</td>
  <td colspan="1" class="cell_right data">{{record.quality}}</td>
</tr>
<tr>
  <td colspan="1" class="cell_left title">{{titles.type}}:</td>
  <td colspan="1" class="cell_mid data">{{record.type}}</td>
  <td colspan="1" class="cell_mid title">{{titles.variety}}:</td>
  <td colspan="1" class="cell_right data">{{record.variety}}</td>
</tr>
<tr>
  <td colspan="1" class="cell_left title">{{titles.edgeimg}}:</td>
  <td colspan="1" class="cell_top data">{{record.edge}}</td>
  <td colspan="2" class="cell_right data">{{record.edgelabel}}</td>
</tr>
{% if record.url %}
<tr>
  <td colspan="4" class="cell_full text"><div style="display:block;" align="center"><a href="{{record.url}}" style="max-width: 100%">{{record.url}}</a></div></td>
</tr>
{% endif %}
{% if record.note %}
<tr>
  <td colspan="4" class="cell_full title" align="center">{{titles.note}}</td>
</tr>
<tr>
  <td colspan="4" class="cell_full text"><b>{{record.note}}</b></td>
</tr>
{% endif %}
{% if record.status_raw in ['owned', 'wish', 'sale', 'sold', 'replacement'] %}
<tr>
  <td colspan="2" class="cell_left title" align="center">Информация о покупке:</td>
  {% if record.status_raw in ['owned', 'wish', 'sale'] %}
  <td colspan="2" class="cell_right title" align="center">Информация о возможной стоимости:</td>
  {% elif record.status_raw == 'sold' %}
  <td colspan="2" class="cell_right title" align="center">Информация о продаже:</td>
  {% endif %}
</tr>
<tr>
  <td colspan="1" class="cell_left title">{{titles.saller}}:</td>
  <td colspan="1" class="cell_mid data">{{record.saller}}</td>
  {% if record.status_raw in ['owned', 'wish', 'sale'] %}
  <td colspan="2" rowspan="2" class="cell_right data" style="padding: 0">
    <table border="0" cellpadding="0" cellspacing="0" >
    <tbody>
      <tr>
        <td width="25%" class="title" align="center" style="border-right-width: 1;">{{titles.price1}}</td>
        <td width="25%" class="title" align="center" style="border-right-width: 1;">{{titles.price2}}</td>
        <td width="25%" class="title" align="center" style="border-right-width: 1;">{{titles.price3}}</td>
        <td width="25%" class="title" align="center">{{titles.price4}}</td>
      </tr>
      <tr>
        <td class="data" align="center" style="border-top-width: 1;border-right-width: 1;">{{record.price1}}</td>
        <td class="data" align="center" style="border-top-width: 1;border-right-width: 1;">{{record.price2}}</td>
        <td class="data" align="center" style="border-top-width: 1;border-right-width: 1;">{{record.price3}}</td>
        <td class="data" align="center" style="border-top-width: 1;">{{record.price4}}</td>
      </tr>
    </tbody>
    </table>
  </td>
  {% elif record.status_raw == 'sold' %}
  <td colspan="1" class="cell_mid title">{{titles.buyer}}:</td>
  <td colspan="1" class="cell_right data">{{record.buyer}}</td>
  {% endif %}
</tr>
<tr>
  <td colspan="1" class="cell_left title">{{titles.grade}}:</td>
  <td colspan="1" class="cell_mid data">{{record.grade}}</td>
  {% if record.status_raw in ['owned', 'wish', 'sale'] %}
  <!--td colspan="2" class="cell_right data"></td-->
  {% elif record.status_raw == 'sold' %}
  <td colspan="2" class="cell_right data"></td>
  {% endif %}
</tr>
<tr>
  <td colspan="1" class="cell_left title">{{titles.paydate}}:</td>
  <td colspan="1" class="cell_mid data">{{record.paydate}}</td>
  {% if record.status_raw == 'sold' %}
  <td colspan="1" class="cell_mid title">{{titles.saledate}}:</td>
  <td colspan="1" class="cell_right data">{{record.saledate}}</td>
  {% else %}
  <td colspan="2" rowspan="2" class="cell_right data"></td>
  {% endif %}
</tr>
<tr>
  <td colspan="1" class="cell_left title">{{titles.totalpayprice}}:</td>
  <td colspan="1" class="cell_mid data">{{record.totalpayprice}}</td>
  {% if record.status_raw in ['owned', 'wish', 'sale'] %}
  {% elif record.status_raw == 'sold' %}
  <td colspan="1" class="cell_mid title">{{titles.totalsaleprice}}:</td>
  <td colspan="1" class="cell_right data">{{record.totalsaleprice}}</td>
  {% endif %}
</tr>
{% if record.payinfo or record.saleinfo %}
<tr>
  {% if record.payinfo %}
  <td colspan="1" class="cell_left title">{{titles.payinfo}}:</td>
  <td colspan="1" class="cell_mid data">{{record.payinfo}}</td>
  {% endif %}
  {% if record.status_raw in ['owned', 'wish', 'sale'] %}
  {% elif record.status_raw == 'sold' and record.saleinfo %}
  <td colspan="1" class="cell_mid title">{{titles.saleinfo}}:</td>
  <td colspan="1" class="cell_right data">{{record.saleinfo}}</td>
  {% endif %}
</tr>
{% endif %}
{% endif %}
<tr>
  <td colspan="4" class="cell_bottom"></td>
</tr>
</tbody>
</table>
</div>
  {% if record.photo4 %}
<br/>
<div class="row">
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
  <tr>
    <td style="width: 100%; padding: 2px">
      <a href="{{static_files}}/{{record.photo4}}" target="_blank" class="image"><img src="{{static_files}}/{{record.photo4}}" class="image"></a>
    </td>
  </tr>
</tbody>
</table>
</div>
  {% endif %}

{% if record.features %}
<br/>
<div class="row">
<table border="0" cellpadding="0" cellspacing="0" >
<tbody>
<tr align="center">
  <td class="cell_full title">{{titles.features}}</td>
</tr>
<tr>
  <td class="cell_full title">{{record.features}}</td>
</tr>
<tr>
  <td class="cell_bottom"></td>
</tr>
</tbody>
</table>
</div>
{% endif %}

<br/>
  {% if not loop.last %}
<p class="breakhere"></p>
  {% endif %}
  {% endfor %}

</div>

</body>
</html>
