templates/person/show.html.twig line 1

Open in your IDE?
  1. {% extends 'content_base.html.twig' %}
  2. {% block title %}Read: {{ person.name }}{% endblock %}
  3. {% block content_body %}
  4.     <h1>
  5.         <a href="{{ path('persons_list') }}">
  6.             <i class="pr-3 fa fa-backward"></i>
  7.         </a>
  8.     </h1>
  9.     <div id="show-person" class="container">
  10.         {% if is_granted('ROLE_EDIT_ENTITY') %}
  11.             <div class="row">
  12.                 <div class="col-12">
  13.                     <a href="{{ path('person_edit', {id: person.id}) }}" class="btn btn-primary pull-right">
  14.                         Edit <span class="fa fa-pencil-square"></span>
  15.                     </a>
  16.                 </div>
  17.             </div>
  18.         {% endif %}
  19.         <div class="row mt-2">
  20.             <div class="col-sm-12">
  21.                 <div class="show-article-container p-3">
  22.                     <div class="row">
  23.                         <div class="col-12 col-sm-4 pb-2">
  24.                             <img class="show-article-img" src="{{ person.image | imagine_filter('squared_thumbnail_tiny')}}">
  25.                         </div>
  26.                         <div class="col-12 col-sm-8 show-article-title-container d-inline-block align-middle">
  27.                              <span class="show-article-title ">{{ person.name }}
  28.                                  {% if person.alternateNames is defined and person.alternateNames is not null%}
  29.                                      &nbsp({{ person.alternateNames }})
  30.                                  {% endif %}
  31.                                  {% if person.hasVersions %}
  32.                                      <i></i>
  33.                                  {% endif %}
  34.                                 </span>
  35.                             <div class="article-text pb-2"> {{  not person.born ? person.born(true, true) ~'(?)': person.born(true) }} to {{ not person.died ? person.died(true, true) ~ '(?)' : person.died(true)}}</div>
  36.                             {% if person.father.id is defined %}
  37.                                 <div class="align-left article-details pb-2">
  38.                                     <a href="{{ path('person_show', {id: person.father.id}) }}">
  39.                                         <img class="article-author-img rounded-circle" src="{{ person.father.image| imagine_filter('squared_thumbnail_tiny') }}">
  40.                                         {{person.father.name}}
  41.                                     </a>
  42.                                 </div>
  43.                             {% endif %}
  44.                             {% if person.mother.id is defined %}
  45.                                 <div class="align-left article-details pb-2">
  46.                                     <a href="{{ path('person_show', {id: person.mother.id}) }}">
  47.                                         <img class="article-author-img rounded-circle pr-2" src="{{ person.mother.image| imagine_filter('squared_thumbnail_tiny') }}">
  48.                                         {{ person.mother.name}}
  49.                                     </a>
  50.                                 </div>
  51.                             {% endif %}
  52.                         </div>
  53.                     </div>
  54.                     <div class="row">
  55.                         <div class="col-sm-12 table-responsive">
  56.                             <h3><i class="pr-3 fa fa-comment"></i>{{ person.children|length }} Children</h3>
  57.                             <table class="table table-striped">
  58.                                 <thead>
  59.                                 <tr>
  60.                                     <th scope="col" class="col-2 mx-2"></th>
  61.                                     <th scope="col" class="col-10 mx-2">Name</th>
  62.                                 </tr>
  63.                                 </thead>
  64.                                 <tbody>
  65.                                 {% for child in person.children %}
  66.                                     <tr>
  67.                                         <td>
  68.                                             <a href="{{ path('person_show', {id: child.id}) }}">
  69.                                                 <img class="comment-img rounded-circle" src="{{ asset( child.image | imagine_filter('squared_thumbnail_tiny') ) }}">
  70.                                             </a>
  71.                                         </td>
  72.                                         <td>
  73.                                             <a href="{{ path('person_show', {id: child.id}) }}">
  74.                                                 <div class="comment-container d-inline-block align-top">
  75.                                                     <span class="comment"> {{ child.name }} {{ child.alternateNames }}</span>
  76.                                                     <!--p><a href="#">Reply</a></p-->
  77.                                                 </div>
  78.                                             </a>
  79.                                         </td>
  80.                                     </tr>
  81.                                 {% else %}
  82.                                     <tr>
  83.                                         <td colspan="2">
  84.                                             Keine Kinder
  85.                                         </td>
  86.                                     </tr>
  87.                                 {% endfor %}
  88.                                 </tbody>
  89.                             </table>
  90.                         </div>
  91.                     </div>
  92.                     <div id="references" class="row mr-1">
  93.                         <hr>
  94.                         <div id="references-person" class="col-sm-12">
  95.                             {{ include('person/_references.twig', {
  96.                             }) }}
  97.                         </div>
  98.                     </div>
  99.                 </div>
  100.             </div>
  101.         </div>
  102.     </div>
  103. {% endblock %}
  104. {% block javascripts %}
  105.     {{ parent() }}
  106.     <script src="{{ asset('js/article_show.js') }}"></script>
  107. {% endblock %}