{% extends '@OxHoardBundle//layout.html.twig' %}
{% block title %}Object Details {{ object.id }}{% endblock %}
{% block javascripts %}
{{ parent() }}
<script type="text/javascript" src='/bundles/oxhoard/js/show_object.js'></script>
<script type="text/javascript" src='/bundles/oxhoard/js/utils.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>
{% endblock %}
{% block stylesheets %}
{{ parent() }}
<link rel="stylesheet" href='/bundles/oxhoard/js/libs/magnifier/magnifier.css'>
{% endblock %}
{% block body %}
<div class="marginTop clearfix"></div>
<div id="content" class="container">
<div class="row">
<div class="hoardlistview-6col">
<h1>{{ object.object }}</h1>
{% embed '@OxHoardBundle/flash.html.twig' %}{% endembed %}
<p class="object-description">{{ object.description}}</p>
{% if object.quantity %}
<div class="datalabel">Quantity</div><div class="data">{{object.quantity}}</div>
{% endif %}
{% if object.productionPlace %}
<div class="datalabel">Production Place</div><div class="data">{{object.productionPlace}}</div>
{% endif %}
{% if object.weight %}
<div class="datalabel">Weight</div><div class="data">{{object.weight}} g</div>
{% endif %}
{% if object.dimensionLengthCm %}
<div class="datalabel">Length</div><div class="data">{{object.dimensionLengthCm}} cm</div>
{% endif %}
{% if object.dimensionWidthCm %}
<div class="datalabel">Width</div><div class="data">{{object.dimensionWidthCm}} cm</div>
{% endif %}
{% if object.dimensionDiameterCm %}
<div class="datalabel">Diameter</div><div class="data">{{object.dimensionDiameterCm}} cm</div>
{% endif %}
{% if object.startYear %}
<div class="datalabel">Start Year</div><div class="data">{{object.startYear}}</div>
{% endif %}
{% if object.endYear %}
<div class="datalabel">End Year</div><div class="data">{{object.endYear}}</div>
{% endif %}
{% if object.comment %}
<div class="datalabel">Comment</div><div class="data">{{object.comment}}</div>
{% endif %}
{% if object.container %}
<div class="datalabel">Container</div><div class="data">{{object.container}}</div>
{% endif %}
{% if object.material %}
<div class="datalabel">Material</div><div class="data">{{object.material}}</div>
{% endif %}
{% if object.hoard %}
<div class="datalabel">Hoard</div><div class="data"><a href="{{ path('hoard_show', { 'id': object.hoard.id }) }}">{{object.hoard}}</a></div>
{% endif %}
{% if object.objectReferences is empty %}
{% else %}
<h3>References:</h3>
{% for ref in object.objectReferences %}
{% if ref.reference %}
<div class="datalabel">Reference</div>
<div class="data"><a href="{{ path('reference_show', {'id': ref.reference.id})}}">
{{ref.reference.title}}
</a>{% if ref.referenceStr %}{{ ref.referenceStr }}{% endif %}</div>
{% endif %}
{% if ref.comment %}
<div class="datalabel">Comment</div><div class="data">{{ ref.comment }}</div>
{% endif %}
{% if ref.thisObject %}
<div class="datalabel">This object</div>
<div class="data">Yes</div>
{% endif %}
<br>
{% endfor %}
{% endif %}
{% for objectImage in object.objectimages %}
<div class="magnify-image-container">
<img id="object-image-{{ objectImage.id }}" class="object-image magnify-image-inside" src="{{ path('object_image', { 'object_image_id': objectImage.id }) }}">
</div>
<div class="marginTop"></div>
{% if objectImage.uri %}
<div class="datalabel">Uri: </div><div class="data"><a href="{{objectImage.uri}}">{{objectImage.uri}}</a></div>
{% endif %}
{% if objectImage.comment %}
<div class="datalabel">Comment: </div><div class="data">{{objectImage.comment}}</div>
{% endif %}
<br><br>
{% endfor %}
<br/><br/>
</div>
</div>
</div>
{% endblock %}