templates/authcomp/index.html.twig line 1

Open in your IDE?
  1. {% extends('base.html.twig') %}
  2. {% block title %}Bio Information for {{ type }}, {{ authcomp.Fullname|trim }}!{% endblock %}
  3. {% block pageId %}authcomp_info{% endblock %}
  4. {% block body %}
  5. <div class="card">
  6. <h2 class="card-header">
  7. <span class="col-6">{{ type }} Bio Information</span>
  8. <span class="col-6">
  9. <label for="myInput"></label><input class="float-right" id="myInput" type="text" placeholder="Search..">
  10. </span>
  11. </h2>
  12. <article class="card-body">
  13. <div class="authcomp-info">
  14. <h3 class="font-weight-bold text-center">{{ authcomp.Fullname|trim }}'s bio information</h3>
  15. {% set bdate = authcomp.Birthdate|length > 0 ? authcomp.Birthdate : 'Date Unknown' %}
  16. {% set ddate = authcomp.Deathdate|length > 0 ? authcomp.Deathdate : 'Date Unknown' %}
  17. <h4 class="text-center font-italic">{{ bdate }} - {{ ddate }}</h4>
  18. {% if is_granted('ROLE_ADMIN') %}
  19. <hr/>
  20. <h4 class="ml-3">
  21. <a href="{{ path('app_admin_authcomp_edit', {'id': authcomp.id}) }}" target="_blank">Edit this {{ type|lower }}</a>
  22. </h4>
  23. <hr/>
  24. {% endif %}
  25. {% set notes = authcomp.Notes|length > 0 ? authcomp.Notes :
  26. "<div class='text-center'>Sorry, we have no information for this " ~ type|lower ~ "</div>" %}
  27. <div class="authcomp">{{ notes|raw|nl2br }}</div>
  28. </div>
  29. {% if(authHymns|length > 0) %}
  30. <div class="hymns-authored">
  31. <h4 class="card-header text-center font-weight-bold">Hymns Authored ({{ authHymns|length }})</h4>
  32. {% for hymn in authHymns|sort((a, b) => a.title <=> b.title) %}
  33. <a class="hymn-info-link" href="{{ path('hymnInfo', {'slug': hymn.slug} ) }}" target="_blank">
  34. {{ hymn.title }}
  35. <span class="float-right">{{ hymn.type.title }}</span>
  36. </a>
  37. {% endfor %}
  38. </div>
  39. {% endif %}
  40. {% if(compHymns|length > 0) %}
  41. <div class="hymns-composed">
  42. <h4 class="card-header text-center font-weight-bold">Hymns Composed ({{ compHymns|length }})</h4>
  43. {% for hymn in compHymns|sort((a, b) => a.title <=> b.title) %}
  44. <a class="hymn-info-link" href="{{ path('hymnInfo', {'slug': hymn.slug} ) }}" target="_blank">
  45. {{ hymn.title }}
  46. <span class="float-right">{{ hymn.type.title }}</span>
  47. </a>
  48. {% endfor %}
  49. </div>
  50. {% endif %}
  51. {% if(arrHymns|length > 0) %}
  52. <div class="hymns-arranged">
  53. <h4 class="card-header text-center font-weight-bold">Hymns Arranged ({{ arrHymns|length }})</h4>
  54. {% for hymn in arrHymns|sort((a, b) => a.title <=> b.title) %}
  55. <a class="hymn-info-link" href="{{ path('hymnInfo', {'slug': hymn.slug} ) }}" target="_blank">
  56. {{ hymn.title }}
  57. <span class="float-right">{{ hymn.type.title }}</span>
  58. </a>
  59. {% endfor %}
  60. </div>
  61. {% endif %}
  62. </article>
  63. </div>
  64. {% endblock %}