{% extends '@OxHoardBundle//layout.html.twig' %}
{% block title %}Coin Details {{ coin.id }}{% endblock %}
{% block javascripts %}
{{ parent() }}
<script type="text/javascript" src='/bundles/oxhoard/js/show_coin.js'></script>
<script type="text/javascript" src='/bundles/oxhoard/js/libs/Event/Event.js'></script>
<script type="text/javascript" src='/bundles/oxhoard/js/libs/magnifier/Magnifier.js'></script>
<script>
{% if images.obverse is defined %}
var obverseImage = "{{ path('coin_image', {coin_id: coin.id, coin_image_type: 'o', ext: 'jpg'}) }}";
{% endif %}
{% if images.both is defined %}
var combinedImage = "{{ path('coin_image', {coin_id: coin.id, ext: 'jpg'}) }}";
{% endif %}
{% if images.reverse is defined %}
var reverseImage = "{{ path('coin_image', {coin_id: coin.id, coin_image_type: 'r', ext: 'jpg'}) }}";
{% endif %}
</script>
{% endblock %}
{% block stylesheets %}
{{ parent() }}
<link rel="stylesheet" href='/bundles/oxhoard/js/libs/magnifier/magnifier.css'>
{% endblock %}
{% block body -%}
<!-- content -->
<div class="marginTop clearfix"></div>
<div id="content" class="container"> <!-- page content -->
<div class="row">
<!-- <h1>Coin, Location, Date</h1> -->
<div class="col-sm-6">
<div class="hoardlistview-6col">
<div id="coin-description">
{% embed '@OxHoardBundle/flash.html.twig' %}{% endembed %}
<h2>Description</h2>
<div class="section-data">
<div class="datalabel">Period</div><div class="data">{{ coin.period }}</div>
{% if coin.persons is empty %}
{% else %}
<div class="datalabel">Person</div>
<div class="data">
{% for person in coin.persons %}
{{ person }}{% if not loop.last %} or {% endif %}
{% endfor %}
</div>
{% endif %}
{% if coin.reigns is empty %}
{% else %}
<div class="datalabel">Reign</div>
<div class="data">
{% for reign in coin.reigns %}
{{ reign }}{% if not loop.last %} or {% endif %}
{% endfor %}
</div>
{% endif %}
{% if coin.denominations is empty %}
{% else %}
<div class="datalabel">Denomination</div>
<div class="data">
{% for denomination in coin.denominations %}
{{ denomination }}{% if not loop.last %} or {% endif %}
{% endfor %}
</div>
{% endif %}
{% if coin.mints is empty %}
{% else %}
<div class="datalabel">Mint</div>
<div class="data">
{% for mint in coin.mints %}
{{ mint }}{% if not loop.last %} or {% endif %}
{% endfor %}
</div>
{% endif %}
{% if coin.hoard %}
<br>
<div class="datalabel">Hoard</div>
<div class="data">
<a href="{{ path('hoard_show', {id: coin.hoard.id}) }}">{{ coin.hoard.findSpotName }}</a>
</div>
{% endif %}
</div>
</div>
<div id="coin-dates">
<h2>Dates</h2>
<div class="section-data">
{% if coin.startingDate %}
<div class="datalabel">Starting date</div><div class="data">{{coin.startingDate}}</div>
{% endif %}
{% if coin.endingDate %}
<div class="datalabel">Ending date</div><div class="data">{{coin.endingDate}}</div>
{% endif %}
{% if coin.dateText %}
<div class="datalabel">Date text</div><div class="data">{{coin.dateText}}</div>
{% endif %}
</div>
</div>
<div id="other-info" class="section">
<h2>Other information</h2>
<div class="section-data">
{% if coin.issue %}
<div class="datalabel">Issue</div><div class="data">{{coin.issue}}</div>
{% endif %}
{% if coin.officina %}
<div class="datalabel">Officina</div><div class="data">{{coin.officina}}</div>
{% endif %}
</div>
</div>
<div id="coin-obverse" class="hoardlistview-6col">
<h2>Obverse</h2>
<div class="section-data">
{% if coin.obverseInscription %}
<div class="datalabel">Inscription</div><div class="data">{{ coin.obverseInscription }}</div>
{% endif %}
{% if coin.obverseMintMark %}
<div class="datalabel">Mint Mark</div><div class="data">{{ coin.obverseMintMark }}</div>
{% endif %}
{% if coin.obverseDescription %}
<div class="datalabel">Description</div><div class="data">{{ coin.obverseDescription }}</div>
{% endif %}
</div>
</div>
<div id="coin-reverse" class="hoardlistview-6col">
<h2>Reverse</h2>
<div class="section-data">
{% if coin.reverseInscription %}
<div class="datalabel">Inscription</div><div class="data">{{ coin.reverseInscription }}</div>
{% endif %}
{% if coin.reverseMintMark %}
<div class="datalabel">Mint Mark</div><div class="data">{{ coin.reverseMintMark }}</div>
{% endif %}
{% if coin.reverseDescription %}
<div class="datalabel">Description</div><div class="data">{{ coin.reverseDescription }}</div>
{% endif %}
</div>
</div>
<div id="physical-attributes">
<h2>Physical Attributes</h2>
<div class="section-data">
<div class="datalabel">Quantity</div><div class="data">{% if coin.quantity %}{{coin.quantity}}{% else %}-{% endif %}</div>
{% if coin.weight %}
<div class="datalabel">Weight (g)</div><div class="data">{{coin.weight}}</div>
{% endif %}
{% if coin.diameter %}
<div class="datalabel">Diameter (mm)</div><div class="data">{{coin.diameter}}</div>
{% endif %}
{% if coin.axis %}
<div class="datalabel">Axis</div><div class="data">{{coin.axis}}</div>
{% endif %}
{% if coin.condition %}
<div class="datalabel">Condition</div><div class="data">{{coin.condition}}</div>
{% endif %}
</div>
</div>
<div id="container-details">
<h2>Container</h2>
<div class="section-data">
{% if coin.container %}
<div class="datalabel">Container</div><div class="data">{{coin.container}}</div>
{% if coin.layer %}
<div class="datalabel">Layer</div><div class="data">{{coin.layer}}</div>
{% endif %}
{% endif %}
</div>
</div>
<div id="comment">
{% if coin.comment %}
<h2>Comment</h2>
<div class="datalabel">Comment</div><div class="data">{{ coin.comment }}</div>
{% endif %}
</div>
<div id="misc-info">
<h2>Other Aspects</h2>
<div class="section-data">
<ul>
{% if coin.imitation %}
<li>
<i class="fa fa-check"></i> Imitation
<li>
{% endif %}
{% if coin.latestCoin %}
<li>
<i class="fa fa-check"></i> Latest coin
<li>
{% endif %}
{% if coin.intruder %}
<li>
<i class="fa fa-check"></i> Intruder
<li>
{% endif %}
{% if coin.toCheck %}
<li>
<i class="fa fa-check"></i> To check
<li>
{% endif %}
<!-- loop over additional Aspects -->
{% for aspect in coin.aspects %}
<li>
<i class="fa fa-check"></i> {{ aspect.aspect }}
</li>
{% endfor %}
</ul>
<!-- Additional fields -->
{% for field in coin.coinAdditionalFields %}
<div class="datalabel">{{ field.additionalField.additionalField }}</div><div class="data">{{ field.comment }}</div>
{% endfor %}
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6 hoardlistview-6col">
<h2>Images</h2>
{% if images.obverse is defined %}
<h3>Obverse</h3>
<div class="images magnify-image-container">
<img id="obverseImage" class="coin-img" src="{{ path('coin_image', {coin_id: coin.id, coin_image_type: 'o', ext: 'jpg'}) }}" />
</div>
{% endif %}
{% if images.both is defined %}
<div id="coin-both-image" class="hoardlistview-6col">
<div class="section-data images magnify-image-container">
<h3>Combined Image</h3>
<img id="combinedImage" class="coin-img" src="{{ path('coin_image', {coin_id: coin.id, ext: 'jpg'}) }}" />
</div>
</div>
{% endif %}
{% if images.reverse is defined %}
<h3>Reverse</h3>
<div class="images magnify-image-container">
<img class="coin-img" id="reverseImage" src="{{ path('coin_image', {coin_id: coin.id, coin_image_type: 'r', ext: 'jpg'}) }}" />
</div>
{% endif %}
</div>
</div>
<div class="row">
{% if coin.coinReferences is empty %}
{% else %}
<div class="col-md-6 references">
<div class="hoardlistview-6col">
<h2>References</h2>
{% for ref in coin.coinReferences %}
<div class="reference-container">
{% if ref.reference %}
<div class="datalabel"></div>
<div class="data"><a href="{{ path('reference_show', {'id': ref.reference.id})}}">
{{ref.reference}}</a> {% if ref.referenceStr %}
{% if ref.reference.abbreviation == 'OCRE' %}
<a href="http://numismatics.org/ocre/id/{{ ref.referenceStr }}" target="_blank">{{ ref.referenceStr }} <i class="fa fa-external-link"></i></a>
{% elseif 'http://' in ref.referenceStr %}
<a href="{{ ref.referenceStr }}" target="_blank">{{ ref.referenceStr }} <i class="fa fa-external-link"></i></a>
{% elseif 'https://' in ref.referenceStr %}
<a href="{{ ref.referenceStr }}" target="_blank">{{ ref.referenceStr }} <i class="fa fa-external-link"></i></a>
{% else %}
{{ ref.referenceStr }}
{% endif %}
{% endif %}
</div>
{% endif %}
{% if ref.comment %}
<div class="datalabel">Comment</div><div class="data">{{ ref.comment }}</div>
{% endif %}
{% if ref.thisSpecimen %}
<div class="datalabel">This specimen</div>
<div class="data">Yes</div>
{% endif %}
<br></div>
{% endfor %}
</div>
</div>
{% endif %}
</div>
</div><!-- end page container -->
<!-- footer -->
<div class="marginTop clearfix"></div>
{% endblock %}