src/Ox/HoardBundle/Resources/views/coin/show.html.twig line 1

Open in your IDE?
  1. {% extends '@OxHoardBundle//layout.html.twig' %}
  2. {% block title %}Coin Details {{ coin.id }}{% endblock %}
  3. {% block javascripts %}
  4.     {{ parent() }}
  5.         <script type="text/javascript" src='/bundles/oxhoard/js/show_coin.js'></script>
  6.         <script type="text/javascript" src='/bundles/oxhoard/js/libs/Event/Event.js'></script>
  7.         <script type="text/javascript" src='/bundles/oxhoard/js/libs/magnifier/Magnifier.js'></script>
  8.     <script>
  9.     {% if images.obverse is defined %}
  10.         var obverseImage = "{{ path('coin_image', {coin_id: coin.id, coin_image_type: 'o', ext: 'jpg'}) }}";
  11.     {% endif %}
  12.     {% if images.both is defined %}
  13.         var combinedImage = "{{ path('coin_image', {coin_id: coin.id, ext: 'jpg'}) }}";
  14.     {% endif %}
  15.     {% if images.reverse is defined %}
  16.         var reverseImage = "{{ path('coin_image', {coin_id: coin.id, coin_image_type: 'r', ext: 'jpg'}) }}";
  17.     {% endif %}
  18.     </script>
  19. {% endblock %}
  20. {% block stylesheets %}
  21.     {{ parent() }}
  22.         <link rel="stylesheet" href='/bundles/oxhoard/js/libs/magnifier/magnifier.css'>
  23. {% endblock %}
  24. {% block body -%}
  25.     <!-- content -->
  26.     <div class="marginTop clearfix"></div>
  27.     <div id="content" class="container"> <!-- page content -->
  28.         <div class="row">
  29.             <!-- <h1>Coin, Location, Date</h1> -->
  30.             <div class="col-sm-6">
  31.                 <div class="hoardlistview-6col">
  32.                         <div id="coin-description">
  33.                             {% embed '@OxHoardBundle/flash.html.twig' %}{% endembed %}
  34.                             <h2>Description</h2>
  35.                             <div class="section-data">
  36.                                 <div class="datalabel">Period</div><div class="data">{{ coin.period }}</div>
  37.                                 {% if coin.persons is empty %}
  38.                                 {% else %}
  39.                                     <div class="datalabel">Person</div>
  40.                                     <div class="data">
  41.                                         {% for person in coin.persons %}
  42.                                             {{ person }}{% if not loop.last %} or {% endif %}
  43.                                         {% endfor %}
  44.                                     </div>
  45.                                 {% endif %}
  46.                                 {% if coin.reigns is empty %}
  47.                                 {% else %}
  48.                                     <div class="datalabel">Reign</div>
  49.                                     <div class="data">
  50.                                         {% for reign in coin.reigns %}
  51.                                             {{ reign }}{% if not loop.last %} or {% endif %}
  52.                                         {% endfor %}
  53.                                     </div>
  54.                                 {% endif %}
  55.                                     {% if coin.denominations is empty %}
  56.                                     {% else %}
  57.                                         <div class="datalabel">Denomination</div>
  58.                                         <div class="data">
  59.                                         {% for denomination in coin.denominations %}
  60.                                             {{ denomination }}{% if not loop.last %} or {% endif %}
  61.                                         {% endfor %}
  62.                                         </div>
  63.                                     {% endif %}
  64.                                 {% if coin.mints is empty %}
  65.                                 {% else %}
  66.                                     <div class="datalabel">Mint</div>
  67.                                     <div class="data">
  68.                                         {% for mint in coin.mints %}
  69.                                             {{ mint }}{% if not loop.last %} or {% endif %}
  70.                                         {% endfor %}
  71.                                     </div>
  72.                                 {% endif %}
  73.                                 {% if coin.hoard %}
  74.                                 <br>
  75.                                 <div class="datalabel">Hoard</div>
  76.                                 <div class="data">
  77.                                     <a href="{{ path('hoard_show', {id: coin.hoard.id}) }}">{{ coin.hoard.findSpotName }}</a>
  78.                                 </div>
  79.                                 {% endif %}
  80.                             </div>
  81.                         </div>
  82.                         
  83.                     <div id="coin-dates">
  84.                     <h2>Dates</h2>
  85.                         <div class="section-data">
  86.                             {% if coin.startingDate %}
  87.                             <div class="datalabel">Starting date</div><div class="data">{{coin.startingDate}}</div>
  88.                             {% endif %}
  89.                             {% if coin.endingDate %}
  90.                             <div class="datalabel">Ending date</div><div class="data">{{coin.endingDate}}</div>
  91.                             {% endif %}
  92.                             {% if coin.dateText %}
  93.                             <div class="datalabel">Date text</div><div class="data">{{coin.dateText}}</div>
  94.                             {% endif %}
  95.                         </div>
  96.                     </div>
  97.                     
  98.                     <div id="other-info" class="section">
  99.                         <h2>Other information</h2>
  100.                         <div class="section-data">
  101.                             {% if coin.issue %}
  102.                             <div class="datalabel">Issue</div><div class="data">{{coin.issue}}</div>
  103.                             {% endif %}
  104.                             {% if coin.officina %}
  105.                             <div class="datalabel">Officina</div><div class="data">{{coin.officina}}</div>
  106.                             {% endif %}
  107.                         </div>
  108.                     </div>
  109.                     <div id="coin-obverse" class="hoardlistview-6col">
  110.                         <h2>Obverse</h2>
  111.                         <div class="section-data">
  112.                             {% if coin.obverseInscription %}
  113.                                 <div class="datalabel">Inscription</div><div class="data">{{ coin.obverseInscription }}</div>
  114.                             {% endif %}
  115.                             {% if coin.obverseMintMark %}
  116.                                 <div class="datalabel">Mint Mark</div><div class="data">{{ coin.obverseMintMark }}</div>
  117.                             {% endif %}
  118.                             {% if coin.obverseDescription %}
  119.                                 <div class="datalabel">Description</div><div class="data">{{ coin.obverseDescription }}</div>
  120.                             {% endif %}
  121.                         </div>
  122.                     </div>
  123.                     <div id="coin-reverse" class="hoardlistview-6col">
  124.                         <h2>Reverse</h2>
  125.                         <div class="section-data">
  126.                             {% if coin.reverseInscription %}
  127.                                 <div class="datalabel">Inscription</div><div class="data">{{ coin.reverseInscription }}</div>
  128.                             {% endif %}
  129.                             {% if coin.reverseMintMark %}
  130.                                 <div class="datalabel">Mint Mark</div><div class="data">{{ coin.reverseMintMark }}</div>
  131.                             {% endif %}
  132.                             {% if coin.reverseDescription %}
  133.                                 <div class="datalabel">Description</div><div class="data">{{ coin.reverseDescription }}</div>
  134.                             {% endif %}
  135.                         </div>
  136.                     </div>
  137.                     <div id="physical-attributes">
  138.                         <h2>Physical Attributes</h2>
  139.                         <div class="section-data">
  140.                             <div class="datalabel">Quantity</div><div class="data">{% if coin.quantity %}{{coin.quantity}}{% else %}-{% endif %}</div>
  141.                             {% if coin.weight %}
  142.                             <div class="datalabel">Weight (g)</div><div class="data">{{coin.weight}}</div>
  143.                             {% endif %}
  144.                             {% if coin.diameter %}
  145.                             <div class="datalabel">Diameter (mm)</div><div class="data">{{coin.diameter}}</div>
  146.                             {% endif %}
  147.                             {% if coin.axis %}
  148.                             <div class="datalabel">Axis</div><div class="data">{{coin.axis}}</div>
  149.                             {% endif %}
  150.                             {% if coin.condition %}
  151.                             <div class="datalabel">Condition</div><div class="data">{{coin.condition}}</div>
  152.                             {% endif %}
  153.                         </div>
  154.                     </div>
  155.                     
  156.                     <div id="container-details">
  157.                         <h2>Container</h2>
  158.                         <div class="section-data">
  159.                             {% if coin.container %}
  160.                             <div class="datalabel">Container</div><div class="data">{{coin.container}}</div>
  161.                                 {% if coin.layer %}
  162.                                     <div class="datalabel">Layer</div><div class="data">{{coin.layer}}</div>
  163.                                 {% endif %}
  164.                             {% endif %}
  165.                         </div>
  166.                     </div>
  167.                     <div id="comment">
  168.                     {% if coin.comment %}
  169.                         <h2>Comment</h2>
  170.                         <div class="datalabel">Comment</div><div class="data">{{ coin.comment }}</div>
  171.                     {% endif %}
  172.                     </div>
  173.                     
  174.                     <div id="misc-info">
  175.                         <h2>Other Aspects</h2>
  176.                         <div class="section-data">
  177.                             <ul>
  178.                                 {% if coin.imitation %}
  179.                                     <li>
  180.                                         <i class="fa fa-check"></i> Imitation
  181.                                     <li>
  182.                                 {% endif %}
  183.                                 {% if coin.latestCoin %}
  184.                                     <li>
  185.                                         <i class="fa fa-check"></i> Latest coin
  186.                                     <li>
  187.                                 {% endif %}
  188.                                 {% if coin.intruder %}
  189.                                     <li>
  190.                                         <i class="fa fa-check"></i> Intruder
  191.                                     <li>
  192.                                 {% endif %}
  193.                                 {% if coin.toCheck %}
  194.                                     <li>
  195.                                         <i class="fa fa-check"></i> To check
  196.                                     <li>
  197.                                 {% endif %}
  198.                                 <!-- loop over additional Aspects -->
  199.                                 {% for aspect in coin.aspects %}
  200.                                     <li>
  201.                                         <i class="fa fa-check"></i> {{ aspect.aspect }}
  202.                                     </li>
  203.                                 {% endfor %}
  204.                             </ul>
  205.                             
  206.                             <!-- Additional fields -->
  207.                             {% for field in coin.coinAdditionalFields %}
  208.                             <div class="datalabel">{{ field.additionalField.additionalField }}</div><div class="data">{{ field.comment }}</div>
  209.                             {% endfor %}
  210.                         </div>
  211.                     </div>
  212.                     
  213.                 </div>
  214.             </div>
  215.         </div>
  216.         <div class="row">
  217.         <div class="col-sm-6 hoardlistview-6col">
  218.             <h2>Images</h2>
  219.                 {% if images.obverse is defined %}
  220.                     <h3>Obverse</h3>
  221.                     <div class="images magnify-image-container">
  222.                         <img id="obverseImage" class="coin-img" src="{{ path('coin_image', {coin_id: coin.id, coin_image_type: 'o', ext: 'jpg'}) }}" />
  223.                     </div>
  224.                 {% endif %}
  225.                 {% if images.both is defined %}
  226.                 <div id="coin-both-image" class="hoardlistview-6col">
  227.                     <div class="section-data images magnify-image-container">
  228.                         <h3>Combined Image</h3>
  229.                         <img id="combinedImage" class="coin-img" src="{{ path('coin_image', {coin_id: coin.id, ext: 'jpg'}) }}" />
  230.                     </div>
  231.                 </div>
  232.                 {% endif %}
  233.                 
  234.                 {% if images.reverse is defined %}
  235.                     <h3>Reverse</h3>
  236.                     <div class="images magnify-image-container">
  237.                         <img class="coin-img" id="reverseImage" src="{{ path('coin_image', {coin_id: coin.id, coin_image_type: 'r', ext: 'jpg'}) }}" />
  238.                     </div>
  239.                 {% endif %}
  240.             </div>
  241.         </div>
  242.         
  243.         <div class="row">
  244.             {% if coin.coinReferences is empty %}
  245.             {% else %}
  246.                 <div class="col-md-6 references">
  247.                     <div class="hoardlistview-6col">
  248.                         <h2>References</h2>
  249.                         {% for ref in coin.coinReferences %}
  250.                             <div class="reference-container">
  251.                             {% if ref.reference %}
  252.                             <div class="datalabel"></div>
  253.                             <div class="data"><a href="{{ path('reference_show', {'id': ref.reference.id})}}">
  254.                                 {{ref.reference}}</a> {% if ref.referenceStr %}
  255.                                     {% if ref.reference.abbreviation == 'OCRE' %}
  256.                                     <a href="http://numismatics.org/ocre/id/{{ ref.referenceStr }}" target="_blank">{{ ref.referenceStr }} <i class="fa fa-external-link"></i></a>
  257.                                     {% elseif 'http://' in ref.referenceStr %}
  258.                                     <a href="{{ ref.referenceStr }}" target="_blank">{{ ref.referenceStr }} <i class="fa fa-external-link"></i></a>
  259.                                     {% elseif 'https://' in ref.referenceStr %}
  260.                                     <a href="{{ ref.referenceStr }}" target="_blank">{{ ref.referenceStr }} <i class="fa fa-external-link"></i></a>
  261.                                     {% else %}
  262.                                     {{ ref.referenceStr }}
  263.                                     {% endif %}
  264.                                 {% endif %}
  265.                             </div>
  266.                             {% endif %}
  267.                             {% if ref.comment %}
  268.                             <div class="datalabel">Comment</div><div class="data">{{ ref.comment }}</div>
  269.                             {% endif %}
  270.                             {% if ref.thisSpecimen %}
  271.                             <div class="datalabel">This specimen</div>
  272.                             <div class="data">Yes</div>
  273.                             {% endif %}
  274.                             <br></div>
  275.                         {% endfor %}
  276.                     </div>
  277.                 </div>
  278.             {% endif %}
  279.         </div>
  280.     </div><!-- end page container -->
  281.     <!-- footer -->
  282.     <div class="marginTop clearfix"></div>
  283. {% endblock %}