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

Open in your IDE?
  1. {% extends '@OxHoardBundle//layout.html.twig' %}
  2. {% block title %}Reference Details {{ reference.id }}{% endblock %}
  3. {% block body -%}
  4.     <div class="marginTop clearfix"></div>
  5.     <div id="content" class="container">
  6.         <div class="row">
  7.             <div><a href="{% if referer %}{{ referer }}{% else %}{{ path('reference')}}{% endif %}"><h2><span class="fa fa-chevron-left"></span> Back to the list</h2></a></div>
  8.             {% if is_authorised_to_edit %}
  9.                 <div class="edit-btn"><a href="{{ path('reference_edit', { 'id': reference.id }) }}"><h2>Edit this Reference <span class="fa fa-chevron-right"></span></h2></a></div>
  10.             {% endif %}
  11.             <h1>Reference Details - {{ reference }}</h1>
  12.             {% embed '@OxHoardBundle/flash.html.twig' %}{% endembed %}
  13.             <div class="hoardlistview-6col marginTop">
  14.                 <div class="datalabel">Reference Type</div><div class=data>{{ reference.referenceType }}</div>
  15.                 {% if reference.abbreviation %}
  16.                 <div class="datalabel">Abbreviation</div><div class="data">{{reference.abbreviation}}</div>
  17.                 {% endif %}
  18.                 {% if reference.authors %}
  19.                 <div class="datalabel">Authors</div><div class="data">{{reference.authors}}</div>
  20.                 {% endif %}
  21.                 {% if reference.editors %}
  22.                 <div class="datalabel">Editors</div><div class="data">{{reference.editors}}</div>
  23.                 {% endif %}
  24.                 {% if reference.title %}
  25.                 <div class="datalabel">Title</div><div class="data">{{reference.title}}</div>
  26.                 {% endif %}
  27.                 {% if reference.titleEdition %}
  28.                 <div class="datalabel">Title (journal, series)</div><div class="data">{{reference.titleEdition}}</div>
  29.                 {% endif %}
  30.                 {% if reference.volume %}
  31.                 <div class="datalabel">Volume</div><div class="data">{{reference.volume}}</div>
  32.                 {% endif %}
  33.                 {% if reference.place %}
  34.                 <div class="datalabel">Place</div><div class="data">{{reference.place}}</div>
  35.                 {% endif %}
  36.                 {% if reference.year %}
  37.                 <div class="datalabel">Year</div><div class="data">{{reference.year}}</div>
  38.                 {% endif %}
  39.                 {% if reference.pages %}
  40.                 <div class="datalabel">Pages</div><div class="data">{{reference.pages}}</div>
  41.                 {% endif %}
  42.                 {% if reference.uri1 %}
  43.                 <div class="datalabel">URI 1</div><div class="data"><a href="{{reference.uri1}}" target="_blank">{{reference.uri1}} <i class="fa fa-external-link"></i></a></div>
  44.                 {% endif %}
  45.                 {% if reference.uri1AccessionDate and is_authenticated %}
  46.                 <div class="datalabel">URI 1 accession date</div><div class="data">{{reference.uri1AccessionDate | date('Y-m-d')}}</div>
  47.                 {% endif %}
  48.                 {% if reference.uri2 %}
  49.                 <div class="datalabel">Zenon URI</div><div class="data"><a href="{{reference.uri2}}" target="_blank">{{reference.uri2}} <i class="fa fa-external-link"></i></a></div>
  50.                 {% endif %}
  51.                 {% if reference.uri2AccessionDate and is_authenticated %}
  52.                 <div class="datalabel">Zenon URI accession date</div><div class="data">{{reference.uri2AccessionDate | date('Y-m-d')}}</div>
  53.                 {% endif %}
  54.                 {% if reference.fullyEntered %}
  55.                 <div class="datalabel">Fully entered</div><div class="data">{% if reference.fullyEntered %}Yes{% else %}No{% endif %}</div>
  56.                 {% endif %}
  57.                 {% if reference.comment %}
  58.                 <div class="datalabel">Comment</div><div class="data">{{reference.comment}}</div>
  59.                 {% endif %}
  60.                 {% if is_authenticated and reference.internalNote %}
  61.                 <div class="datalabel">Internal note</div><div class="data">{{reference.internalNote}}</div>
  62.                 {% endif %}
  63.                 <br>
  64.                 
  65.                 {% if hoards %}
  66.                     <div class="datalabel">Hoards referring to this publication:</div>
  67.                     <div class="data">
  68.                         {% set totalHoardsInCol = ((hoards|length)/4)|round(0, 'ceil') %}
  69.                         {% for hoard in hoards %}
  70.                             {% if hoards|length > 8 and loop.index0 is divisible by(totalHoardsInCol) %}
  71.                                 <div class="col-md-3">
  72.                             {% endif %}
  73.                                 <a href="{{ path('hoard_show', { 'id':hoard.id }) }}">
  74.                                     {{ hoard }}, 
  75.                                     {% for country in hoard.getCountries %}
  76.                                     {{ country }}
  77.                                     {% endfor %}
  78.                                 </a>
  79.                                 <br>
  80.                             {% if hoards|length > 8 and (((loop.index0 + 1) is divisible by(totalHoardsInCol)) or ((loop.index0 + 1) == hoards|length)) %}
  81.                                 </div>
  82.                             {% endif %}
  83.                         {% endfor %}
  84.                         </div>
  85.                     <br>
  86.                 {% endif %}
  87.                 {% if reference.filePath and (is_authenticated or reference.isFilePublic) %}
  88.                 <div class="datalabel">
  89.                     <a href="{{ path("reference_file", { 'id': reference.id }) }}" class="btn btn-info">View PDF  <i class="fa fa-file-pdf-o"></i> </a>
  90.                 </div>
  91.                 <div style="padding: 20px"></div>
  92.                 {% endif %}
  93.             </div>
  94.         </div>
  95.     </div>
  96. {% endblock %}