_modal.add.html.twig 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  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. <p>{{ party.getGame.getDescription }}</p>
  37. <div class="cell message">
  38. <div class="message-header">
  39. <p>À propos du jeu</p>
  40. </div>
  41. <div class="message-body">
  42. {% if party.gamemasterIsAuthor %}<p>Partie animée par son auteur(rice)</p>{% endif %}
  43. <p><strong>Âge recommandé : </strong>{{ party.getGame.getAgeRecommendationLabel }}</p>
  44. <p><strong>Genres : </strong>{{ party.getGame.getGenre|map(g => g.name)|join(', ') }}
  45. </div>
  46. </div>
  47. </div>
  48. <div class="container is-hidden" id="tab-2">
  49. <article class="media">
  50. <figure class="media-left">
  51. <p class="image is-128x128">
  52. {% if party.getGamemaster.picture %}
  53. <img class="is-rounded" src="/images/gamemasters/{{ party.getGamemaster.picture }}" />
  54. {% else %}
  55. <twig:ux:icon name="bi:person-fill"/>
  56. {% endif %}
  57. </p>
  58. </figure>
  59. <div class="media-content">
  60. <div class="content">
  61. <h4>{{ party.getGamemaster.getPreferedName }}{% if party.gamemasterIsAuthor %} / auteur(rice) du jeu{% endif %}</h4>
  62. <p>
  63. {{ party.getGamemaster.description }}
  64. </p>
  65. </div>
  66. </div>
  67. </article>
  68. </div>
  69. {% if party.getDescription %}
  70. <div class="container is-hidden" id="tab-3">
  71. <p>{{ party.getDescription }}</p>
  72. </div>
  73. {% endif %}
  74. {% if party.getSeatsLeft > 0 %}
  75. {% if party.getEndOn > date() or is_granted('ROLE_MANAGER') %}
  76. <div class="container is-hidden" id="tab-4">
  77. {{ form_errors(form) }}
  78. {{ form_start(form, {action: path(pathController, {id: party.slots.first.getId}), attr: {'data-turbo-frame': 'modal-content'}}) }}
  79. {{ form_row(form.participantName) }}
  80. {{ form_row(form.participantEmail) }}
  81. {{ form_row(form.participantPhone) }}
  82. <div class="field">
  83. {{ form_widget(form.consentMail) }}
  84. {{ form_label(form.consentMail) }}
  85. </div>
  86. <div class="field">
  87. {{ form_widget(form.consentImage) }}
  88. {{ form_label(form.consentImage) }}
  89. {{ form_help(form.consentImage) }}
  90. </div>
  91. {% if party.getSeatsLeft > 1 %}
  92. <div class="box">
  93. <div class="block">
  94. <h3 class="title is-6">Participation de groupe</h3>
  95. <p>Si des joueur(euse)s vous accompagnent sur cette partie, inscrivez simplement leurs noms ci-dessous.</p>
  96. </div>
  97. <div class="block">
  98. {% for i in 2..party.getSeatsLeft %}
  99. <div class="field">
  100. <label class="label">Accompagnant(e) {{ i-1 }}</label>
  101. <input id="party_more_{{ i-1 }}" name="party_more[{{ i-1 }}]" class="input" type="text" />
  102. </div>
  103. {% endfor %}
  104. </div>
  105. </div>
  106. {% endif %}
  107. {{ form_widget(form)}}
  108. <div class="control">
  109. <button class="button is-primary" type="submit">Envoyer</button>
  110. </div>
  111. {{ form_end(form) }}
  112. </div>
  113. {% endif %}
  114. {% endif %}
  115. </div>
  116. {% endblock %}