list.html.twig 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. {% extends 'bulma.html.twig' %}
  2. {% block title %}Gestion pour {{ event.name }}{% endblock %}
  3. {% block content %}
  4. {{ component('Modal')}}
  5. <div class="card" {{ stimulus_controller('dropdown')}} >
  6. <div class="card-footer">
  7. <div class="dropdown card-footer-item is-flex is-justify-content-space-between is-align-items-center" data-action="click->dropdown#toggle">
  8. <button>
  9. <span><strong>{{ event.name }} - du {{ event.startOn|date('d/m/y à H:i', app_timezone) }} au {{ event.endOn|date('d/m/y à H:i', app_timezone)}}</strong></span>
  10. </button>
  11. {% if events|length > 1 %}
  12. <span class="icon is-small">
  13. <twig:ux:icon name="bi:chevron-down" />&nbsp;
  14. </span>
  15. <div data-dropdown-target="menu" class="dropdown-menu">
  16. <div class="dropdown-content">
  17. {% for evt in events %}
  18. {% if event.id != evt.id %}
  19. <a href="{{ path('app_manage_planning', {id: evt.id})}}" class="dropdown-item"><strong>{{ evt.name }}</strong><small> du {{ evt.startOn|date('d/m/y H:i', app_timezone) }} au {{ evt.endOn|date('d/m/y H:i', app_timezone)}}</small></a>
  20. {% endif %}
  21. {% endfor %}
  22. </div>
  23. </div>
  24. {% endif %}
  25. </div>
  26. </div>
  27. </div>
  28. <div class="box is-clearfix">
  29. <div class="columns">
  30. {% if not event.isHiddenPlanning %}
  31. <div class="column">
  32. <p>{{ event.getParties()|length }} parties proposées</p>
  33. </div>
  34. {% endif %}
  35. <div class="column">
  36. <p class="is-inline-block icon-text">{{ event.getGamemastersAssigned|length }} meneur(euse)s de jeu
  37. {% for gamemaster in event.getGamemastersAssigned %}
  38. <span class="icon">
  39. <a href="{{ path('app_gamemaster_public_profile', {id: gamemaster.id}) }}" class="open-modal" title="{{ gamemaster.preferedName }}"><figure class="image is-24x24 is-inline-block">
  40. {% if gamemaster.picture %}
  41. <img class="is-rounded" src="/images/gamemasters/{{ gamemaster.picture }}" alt="{{ gamemaster.preferedName }}"/>
  42. {% else %}
  43. <twig:ux:icon name="bi:person-fill"/>
  44. {% endif %}
  45. </figure></a>
  46. </span>
  47. {% endfor %}
  48. </p>
  49. </div>
  50. </div>
  51. </div>
  52. <div class="tabs is-boxed">
  53. <ul>
  54. <li><a href="{{ path('app_manage_planning', {id: event.id}) }}">Planning</a></li>
  55. <li class="is-active"><a>Liste des parties</a></li>
  56. <li><a href="{{ path('app_manage_booking', {id: event.id}) }}">Liste des participant(e)s</a></li>
  57. {% if event.isEveryoneCanAskForGame %}<li><a href="{{ path('app_manage_request', {id: event.id}) }}">Liste des demandes</a></li>{% endif %}
  58. </ul>
  59. </div>
  60. <section>
  61. <table id="datatable" {{ stimulus_controller('datatables') }} class="table is-striped is-hoverable is-fullwidth">
  62. <thead>
  63. <tr>
  64. <th>Horaire</th>
  65. <th>Espace</th>
  66. <th>Jeu</th>
  67. <th>Meneur(euse)</th>
  68. <th>Participant(e)s</th>
  69. <th>Action</th>
  70. </tr>
  71. </thead>
  72. <tbody>
  73. {% for party in event.getParties %}
  74. <tr>
  75. <th>{{ party.startOn|date('d/m/y \\d\\e H:i', app_timezone) }} à {{ party.endOn|date('H:i', app_timezone) }}</th>
  76. <td>{{ party.slots.first.space.name }}</td>
  77. <td>{{ party.game.name }}</td>
  78. <td>{{ party.gamemaster.preferedName }}</td>
  79. <td>{{ party.getSeatsOccuped }} / {{ party.getMaxParticipants }}</td>
  80. <td>
  81. {% if party.getSeatsOccuped < party.getMaxParticipants %}
  82. <a href="{{ path('app_participation', {id: party.slots.first.id}) }}" class="button is-primary open-modal">Inscrire</a>
  83. {% else %}
  84. <button class="button is-primary" disabled>Inscrire</button>
  85. {% endif %}
  86. <a href="{{ path('app_party_modify', {id: party.slots.first.id}) }}" class="button is-primary open-modal">Éditer</a>
  87. {% if party.getSeatsOccuped > 0 %}
  88. <a href="{{ path('app_checkin_party', {id: party.id}) }}" class="button open-modal">Checkins</a>
  89. {% else %}
  90. <button class="button" disabled>Checkins</button>
  91. {% endif %}
  92. </td>
  93. </tr>
  94. {% endfor %}
  95. </tbody>
  96. </table>
  97. </section>
  98. {% endblock %}