_modal.add.html.twig 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  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="columns">
  18. <div class="column has-text-right is-one-quarter">
  19. <strong>Horaires</strong>
  20. </div>
  21. <div class="column has-text-left">
  22. le {{ party.getStartOn|date('d/m/Y \\d\\e H:i', app_timezone)}} à {{ party.getEndOn|date('H:i', app_timezone)}}
  23. </div>
  24. </div>
  25. <div class="columns">
  26. <div class="column has-text-right is-one-quarter">
  27. <strong>Espace</strong>
  28. </div>
  29. <div class="column has-text-left">
  30. {{ party.getSlots.first.getSpace.getName }}
  31. </div>
  32. </div>
  33. <div class="columns">
  34. <div class="column has-text-right is-one-quarter">
  35. <strong>Meneur(euse)</strong>
  36. </div>
  37. <div class="column has-text-left">
  38. <span class="icon">
  39. <figure class="image is-24x24 is-inline-block">
  40. {% if party.getGamemaster.picture %}
  41. <img class="is-rounded" src="/images/gamemasters/{{ party.getGamemaster.picture }}" />
  42. {% else %}
  43. <twig:ux:icon name="bi:person-fill"/>
  44. {% endif %}
  45. </figure>
  46. </span>
  47. {{ party.getGamemaster.getPreferedName }}{% if party.gamemasterIsAuthor %} / auteur(rice) du jeu{% endif %}
  48. </div>
  49. </div>
  50. <div class="columns">
  51. <div class="column has-text-right is-one-quarter">
  52. <strong>Jeu</strong>
  53. </div>
  54. <div class="column has-text-left">
  55. {{ party.getGame.getName }}
  56. </div>
  57. </div>
  58. <div class="columns">
  59. <div class="column has-text-right is-one-quarter">
  60. <strong>Âge</strong>
  61. </div>
  62. <div class="column has-text-left">
  63. {{ party.getGame.getAgeRecommendationLabel }}
  64. </div>
  65. </div>
  66. </div>
  67. <div class="tabs is-boxed" {{ stimulus_controller('bulma_tabs') }}>
  68. <ul>
  69. <li class="is-active" data-id="tab-1"><a>Le jeu</a></li>
  70. {% if party.getDescription %}<li data-id="tab-2"><a>Le scénario</a></li>{% endif %}
  71. {% if party.getSeatsLeft > 0 %}{% if party.getEndOn > date() or is_granted('ROLE_MANAGER') %}<li data-id="tab-3"><a>S'incrire</a></li>{% endif %}{% endif %}
  72. </ul>
  73. </div>
  74. <div id="tabs-content">
  75. <div class="container" id="tab-1">
  76. <p>{{ party.getGame.getDescription }}</p>
  77. </div>
  78. {% if party.getDescription %}
  79. <div class="container is-hidden" id="tab-2">
  80. <p>{{ party.getDescription }}</p>
  81. </div>
  82. {% endif %}
  83. {% if party.getSeatsLeft > 0 %}
  84. {% if party.getEndOn > date() or is_granted('ROLE_MANAGER') %}
  85. <div class="container is-hidden" id="tab-3">
  86. {{ form_errors(form) }}
  87. {{ form_start(form, {action: path(pathController, {id: party.slots.first.getId}), attr: {'data-turbo-frame': 'modal-content'}}) }}
  88. {{ form_row(form.participantName) }}
  89. {{ form_row(form.participantEmail) }}
  90. {{ form_row(form.participantPhone) }}
  91. <div class="field">
  92. {{ form_widget(form.consentMail) }}
  93. {{ form_label(form.consentMail) }}
  94. </div>
  95. <div class="field">
  96. {{ form_widget(form.consentImage) }}
  97. {{ form_label(form.consentImage) }}
  98. {{ form_help(form.consentImage) }}
  99. </div>
  100. {% if party.getSeatsLeft > 1 %}
  101. <div class="box">
  102. <div class="block">
  103. <h3 class="title is-6">Participation de groupe</h3>
  104. <p>Si des joueur(euse)s vous accompagnent sur cette partie, inscrivez simplement leurs noms ci-dessous.</p>
  105. </div>
  106. <div class="block">
  107. {% for i in 2..party.getSeatsLeft %}
  108. <div class="field">
  109. <label class="label">Accompagnant(e) {{ i-1 }}</label>
  110. <input id="party_more_{{ i-1 }}" name="party_more[{{ i-1 }}]" class="input" type="text" />
  111. </div>
  112. {% endfor %}
  113. </div>
  114. </div>
  115. {% endif %}
  116. {{ form_widget(form)}}
  117. <div class="control">
  118. <button class="button is-primary" type="submit">Envoyer</button>
  119. </div>
  120. {{ form_end(form) }}
  121. </div>
  122. {% endif %}
  123. {% endif %}
  124. </div>
  125. {% endblock %}