{% extends '@OxHoardBundle//layout.html.twig' %}
{% block title %}Container Details {{ container.id }}{% endblock %}
{% block javascripts %}
{{ parent() }}
<script type="text/javascript" src='/bundles/oxhoard/js/show_container.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>{{ container.container }}</h1>
{% embed '@OxHoardBundle/flash.html.twig' %}{% endembed %}
{% if container.comment %}
<div class="datalabel">Comment</div><div class="data">{{container.comment}}</div>
{% endif %}
{% if container.uri1 %}
<div class="datalabel">URI1</div><div class="data"><a href="{{container.uri1}}">{{container.uri1}}</a></div>
{% endif %}
{% if container.uri2 %}
<div class="datalabel">URI2</div><div class="data"><a href="{{container.uri2}}">{{container.uri2}}</a></div>
{% endif %}
{% if container.containerSherd %}
<div class="datalabel">Preservation</div><div class="data">{{container.containerSherd.containerSherd}}</div>
<!-- TODO Add sherd comment? -->
{% endif %}
{% if container.containerForm %}
<div class="datalabel">Form</div><div class="data">{{container.containerForm}}</div>
{% endif %}
{% if container.material %}
<div class="datalabel">Material</div><div class="data">{{container.material}}</div>
{% endif %}
{% if container.hoard %}
<div class="datalabel">Hoard</div><div class="data"><a href="{{ path('hoard_show', { 'id': container.hoard.id }) }}">{{container.hoard}}</a></div>
{% endif %}
<!-- Layers -->
{# it was decided to deactivate layers #59809 #}
{# <div class="datalabel">Layers:</div>
<div class="data">
{% if container.layers is empty %}
There are no layers defined for this container
{% else %}
<h3>Layers in this container</h3>
{% for layer in container.layers %}
{% if layer.layer %}
<div class="datalabel">Name</div><div class="data">{{layer.layer}}</div>
{% endif %}
{% if layer.comment %}
<div class="datalabel">Comment</div><div class="data">{{layer.comment}}</div>
{% endif %}
<br>
{% endfor %}
{% endif %}
</div> #}
<!-- Objects -->
<div class="datalabel">Objects:</div>
<div class="data">
{% if container.objects is empty %}
This container doesn't have any objects associated to it
{% else %}
{% for object in objects %}
<span><a href="{{ path('object_show', { 'id': object.id }) }}">{{ object }}</a></span>{% if not loop.last %}, {% endif %}
{% endfor %}
{% endif %}
</div>
<!-- Coins -->
<div class="datalabel">Coins:</div>
<div class="data">
{% if container.coins is empty %}
This container doesn't have any coins associated to it
{% else %}
{% for coin in container.coins %}
<div><a href="{{ path('coin_show', { 'id': coin.id }) }}">Coin {{ coin.id }}</a>
{% if not coin.reigns is empty %}
<span><b>Reign: </b>
{% for reign in coin.reigns %}
{{ reign }}{% if not loop.last %} or {% endif %}
{% endfor %}
</span>
<span> - </span>
{% endif %}
{% if not coin.persons is empty %}
<span><b>Person: </b>
{% for person in coin.persons %}
{{ person }}{% if not loop.last %} or {% endif %}
{% endfor %}
</span>
<span> - </span>
{% endif %}
{% if not coin.denominations is empty %}
<span><b>Denomination: </b>
{% for denomination in coin.denominations %}
{{ denomination }}{% if not loop.last %} or {% endif %}
{% endfor %}
</span>
{% endif %}
</div>
{% endfor %}
{% endif %}
</div>
<!-- Images -->
{% for containerImage in container.containerImages %}
<div class="row hoard-show-image-container">
<div class="col-md-12 magnify-image-container">
<img id="container-image-{{ containerImage.id }}" class="container-image magnify-image-inside" src="{{ path('container_image', { 'container_image_id': containerImage.id }) }}">
</div>
<div class="col-md-12">
<div class="containerimage-metadata hoardlistview-12col">
{% if containerImage.uri1 is defined %}
<div class="datalabel">URI</div><div class="data"><a target="_blank" href="{{ containerImage.uri1 }}">{{ containerImage.uri1 }}</a></div>
{% endif %}
{% if containerImage.comment is defined %}
<div class="datalabel">Comment</div><div class="data">{{ containerImage.comment }}</div>
{% endif %}
</div>
</div>
</div>
{% endfor %}
<br/><br/>
</div>
</div>
</div>
{% endblock %}