_modal.add.html.twig 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. {% extends 'modal.html.twig' %}
  2. {% block title %}{{ party.game.name }}{% endblock %}
  3. {% block header %}
  4. {% if party.getGame.getPicture %}
  5. <section class="modal-card-image">
  6. <figure class="image is-3by1">
  7. <img
  8. src="/images/games/{{ party.getGame.getPicture }}"
  9. alt="{{ party.getGame.getName }}"
  10. />
  11. </figure>
  12. </section>
  13. {% endif %}
  14. {% endblock %}
  15. {% block content %}
  16. <div class="content">
  17. <div class="cell message">
  18. <div class="message-header">
  19. <p>Horaires et espace</p>
  20. </div>
  21. <div class="message-body">
  22. <p>le {{ party.getStartOn|date('d/m/Y \\d\\e H:i', app_timezone)}} à {{ party.getEndOn|date('H:i', app_timezone)}} • {{ party.getSlots.first.getSpace.getName }}</p>
  23. </div>
  24. </div>
  25. </div>
  26. <div class="tabs is-boxed" {{ stimulus_controller('bulma_tabs') }}>
  27. <ul>
  28. <li class="is-active" data-id="tab-1"><a>Le jeu</a></li>
  29. <li data-id="tab-2"><a>Le(a) MJ</a></li>
  30. {% if party.getDescription %}<li data-id="tab-3"><a>Le scénario</a></li>{% endif %}
  31. {% if party.getSeatsLeft > 0 %}{% if party.getEndOn > date() or is_granted('ROLE_MANAGER') %}<li data-id="tab-4"><a>S'incrire</a></li>{% endif %}{% endif %}
  32. </ul>
  33. </div>
  34. <div id="tabs-content">
  35. <div class="container" id="tab-1">
  36. <div class="block">
  37. <p>{{ party.getGame.getDescription }}</p>
  38. </div>
  39. <div class="block">
  40. <div class="cell message">
  41. <div class="message-header">
  42. <p>À propos du jeu</p>
  43. </div>
  44. <div class="message-body">
  45. {% if party.gamemasterIsAuthor %}<p>Partie animée par son auteur(rice)</p>{% endif %}
  46. <p><strong>Âge recommandé : </strong>{{ party.getGame.getAgeRecommendationLabel }}</p>
  47. <p><strong>Genres : </strong>{{ party.getGame.getGenre|map(g => g.genre)|join(', ') }}
  48. </div>
  49. </div>
  50. </div>
  51. </div>
  52. <div class="container is-hidden" id="tab-2">
  53. <article class="media">
  54. <figure class="media-left">
  55. <p class="image is-128x128">
  56. {% if party.getGamemaster.picture %}
  57. <img class="is-rounded" src="/images/gamemasters/{{ party.getGamemaster.picture }}" />
  58. {% else %}
  59. <twig:ux:icon name="bi:person-fill"/>
  60. {% endif %}
  61. </p>
  62. </figure>
  63. <div class="media-content">
  64. <div class="content">
  65. <h4>{{ party.getGamemaster.getPreferedName }}{% if party.gamemasterIsAuthor %} / auteur(rice) du jeu{% endif %}</h4>
  66. <p>
  67. {{ party.getGamemaster.description }}
  68. </p>
  69. </div>
  70. </div>
  71. </article>
  72. </div>
  73. {% if party.getDescription %}
  74. <div class="container is-hidden" id="tab-3">
  75. <p>{{ party.getDescription }}</p>
  76. </div>
  77. {% endif %}
  78. {% if party.getSeatsLeft > 0 %}
  79. {% if party.getEndOn > date() or is_granted('ROLE_MANAGER') %}
  80. <div class="container is-hidden" id="tab-4">
  81. {{ form_errors(form) }}
  82. {{ form_start(form, {action: path(pathController, {id: party.slots.first.getId}), attr: {'data-turbo-frame': 'modal-content'}}) }}
  83. {{ form_row(form.participantName) }}
  84. {{ form_row(form.participantEmail) }}
  85. {{ form_row(form.participantPhone) }}
  86. <div class="field">
  87. {{ form_widget(form.consentMail) }}
  88. {{ form_label(form.consentMail) }}
  89. </div>
  90. <div class="field">
  91. {{ form_widget(form.consentImage) }}
  92. {{ form_label(form.consentImage) }}
  93. {{ form_help(form.consentImage) }}
  94. </div>
  95. {% if party.getSeatsLeft > 1 %}
  96. <div class="box">
  97. <div class="block">
  98. <h3 class="title is-6">Participation de groupe</h3>
  99. <p>Si des joueur(euse)s vous accompagnent sur cette partie, inscrivez simplement leurs noms ci-dessous.</p>
  100. </div>
  101. <div class="block">
  102. {% for i in 2..party.getSeatsLeft %}
  103. <div class="field">
  104. <label class="label">Accompagnant(e) {{ i-1 }}</label>
  105. <input id="party_more_{{ i-1 }}" name="party_more[{{ i-1 }}]" class="input" type="text" />
  106. </div>
  107. {% endfor %}
  108. </div>
  109. </div>
  110. {% endif %}
  111. {{ form_widget(form)}}
  112. <div class="control">
  113. <button class="button is-primary" type="submit">Envoyer</button>
  114. </div>
  115. {{ form_end(form) }}
  116. </div>
  117. {% endif %}
  118. {% endif %}
  119. </div>
  120. {% endblock %}