templates/pages/_includes/details/_main-informations.html.twig line 1

Open in your IDE?
  1. {#
  2. Informations principales en haut de la page détail.
  3. Variables attendues : cruise (entité Cruise), content (CMS).
  4. #}
  5. {% set company = cruise.ship.company|default(null) %}
  6. {% set companyLogoUrl = company is not null
  7. ? (crea_media_get_media(['logo'], company).cdnUrl|default('/img/placeholder-company.svg'))
  8. : null %}
  9. {# Premier et dernier segment escale (hors journées en mer) pour les ports d'embarquement / débarquement. #}
  10. {% set departurePort = get_departure_port(cruise.itinerary).name|default('') %}
  11. {% set arrivalPort = get_arrival_port(cruise.itinerary).name|default(departurePort) %}
  12. {# Plage de dates de la croisière. #}
  13. {% set nb_days = cruise.itinerary.numberOfDays|default(1) %}
  14. {% set nb_nights = nb_days > 0 ? nb_days - 1 : 0 %}
  15. {# Meilleur prix. #}
  16. {% set best_price = getCruiseBestPrice(cruise) %}
  17. {% if best_price is not defined or best_price == 0 %}
  18. {% set best_price = null %}
  19. {% endif %}
  20. {% set partner = getCurrentPartner() %}
  21. {% set discountPercent = 0 %}
  22. {% if partner and company %}
  23. {% set discount = get_partner_company_discount(company) %}
  24. {% set discountPercent = discount ? discount.rate|default(0) : 0 %}
  25. {% endif %}
  26. {% set showPartnerDiscount = partner and discountPercent > 0 and partner.name|default('') is not empty %}
  27. {% set bestUpComingPrice = bestUpComingPrice|default(null) %}
  28. <div class="container-fluid mb-5">
  29. <div class="row">
  30. <div class="col-lg-1 col-md-1 col-sm-12"></div>
  31. <div class="col-lg-10 col-md-10 col-sm-12 main-informations">
  32. <div class="main-informations-left">
  33. <div class="block">
  34. <h1 class="text-3xl-bd">
  35. {{ getLucidIcon('ship') }}
  36. {{ getCruiseName(cruise)|default('') }}
  37. </h1>
  38. {% if companyLogoUrl is not null %}
  39. <img class="logo" src="{{ companyLogoUrl }}" alt="{{ company.name|default('') }}"/>
  40. {% endif %}
  41. <div class="duration-1 text-md-rg">
  42. <div>
  43. {{ nb_days }}
  44. {{ 'details.main_information.days_and'|trans }}
  45. {{ nb_nights }}
  46. {{ 'details.main_information.nights_with'|trans }}
  47. <span>
  48. <span class="text-md-sbd">{{ company.name|default('') }}</span>
  49. <div class="stars-rating" data-mark="4.5">
  50. {% for i in 1..5 %}
  51. <span class="star">
  52. <span class="star-empty">{{ getLucidIcon('star') }}</span>
  53. <span class="star-filled">{{ getLucidIcon('star') }}</span>
  54. </span>
  55. {% endfor %}
  56. </div>
  57. </span>
  58. </div>
  59. <div>{{ 'details.main_information.on_ship'|trans }}
  60. <span>
  61. <span class="text-md-sbd">{{ cruise.ship.name|default('') }}</span>
  62. <div class="stars-rating" data-mark="4.5">
  63. {% for i in 1..5 %}
  64. <span class="star">
  65. <span class="star-empty">{{ getLucidIcon('star') }}</span>
  66. <span class="star-filled">{{ getLucidIcon('star') }}</span>
  67. </span>
  68. {% endfor %}
  69. </div>
  70. </span>
  71. </div>
  72. </div>
  73. <div class="duration-2 text-md-rg">
  74. <div>
  75. {{ 'details.main_information.from'|trans }}
  76. <span class="text-md-sbd">{{ cruise.departureDate|date('d/m/Y') }}</span>
  77. {{ 'details.main_information.to'|trans }}
  78. <span class="text-md-sbd">{{ cruise.arrivalDate|date('d/m/Y') }}</span>
  79. </div>
  80. <div>{{ 'details.main_information.departure_from'|trans }}
  81. <span>
  82. <span class="text-md-sbd">{{ departurePort }}</span>
  83. <div class="stars-rating" data-mark="4.5">
  84. {% for i in 1..5 %}
  85. <span class="star">
  86. <span class="star-empty">{{ getLucidIcon('star') }}</span>
  87. <span class="star-filled">{{ getLucidIcon('star') }}</span>
  88. </span>
  89. {% endfor %}
  90. </div>
  91. </span>
  92. </div>
  93. <div>{{ 'details.main_information.return_to'|trans }}
  94. <span>
  95. <span class="text-md-sbd">{{ arrivalPort }}</span>
  96. <div class="stars-rating" data-mark="4.5">
  97. {% for i in 1..5 %}
  98. <span class="star">
  99. <span class="star-empty">{{ getLucidIcon('star') }}</span>
  100. <span class="star-filled">{{ getLucidIcon('star') }}</span>
  101. </span>
  102. {% endfor %}
  103. </div>
  104. </span>
  105. </div>
  106. </div>
  107. </div>
  108. {% if offers is iterable and offers is not empty %}
  109. <div class="block">
  110. <h2 class="text-sm-bd">
  111. {{ getLucidIcon('star') }}
  112. {{ 'details.main_information.active_promotions'|trans }}
  113. </h2>
  114. {% include 'pages/_includes/components/_special_offers.html.twig' with { offers: offers } only %}
  115. </div>
  116. {% endif %}
  117. <div class="block">
  118. <h2 class="text-sm-bd">
  119. {{ getLucidIcon('hand-platter') }}
  120. {{ 'details.main_information.onboard_benefits'|trans }}
  121. </h2>
  122. <div class="advantages">
  123. {% for advantage in company.advantages|default([]) %}
  124. <div class="advantage text-xs-rg">
  125. <span class="icon">{{ getLucidIcon(advantage.icon|default('percent')) }}</span>
  126. <span class="text">{{ advantage.name|default(advantage.title|default('')) }}</span>
  127. {% include 'pages/_includes/partials/_benefit_popup.html.twig' with {'benefit': advantage} %}
  128. </div>
  129. {% endfor %}
  130. </div>
  131. </div>
  132. </div>
  133. <div class="block block-price text-xs-rg">
  134. {% if content.isDevelopmentMode|default(false) and content.isFreeCard|default(false) %}
  135. <div class="free-card br2 shimmered">
  136. <div class="discount color-card-background">
  137. <div class="text text-lg-sebd">{{ 'details.main_information.instant_online_booking'|trans }}</div>
  138. </div>
  139. <div class=" text text-xs-md br1 color-card-background">
  140. {{ getLucidIcon('check') }}
  141. {{ 'details.main_information.instant_online_booking_description'|trans }}
  142. </div>
  143. </div>
  144. {% endif %}
  145. {% if showPartnerDiscount %}
  146. <div class="partner-card br2 shimmered">
  147. <div class="icon">{{ getLucidIcon('star') }}</div>
  148. <div class="tags">
  149. <div class="tag text-xs-bd color-price-tags-primary br1 ">{{ 'details.main_information.partner_tag'|trans }}</div>
  150. <div class="tag text-xs-bd br1">{{ partner.name }}</div>
  151. </div>
  152. <div class="discount color-card-background">
  153. <div class="reduction-value text-4xl-sebd">-{{ discountPercent }}%</div>
  154. <div class="text text-sm-bd">{{ 'details.main_information.exclusive_discount'|trans }}</div>
  155. </div>
  156. <div class=" text text-xs-md br1 color-card-background">
  157. {{ getLucidIcon('check') }}
  158. {{ 'details.main_information.partner_discount_applied'|trans }}
  159. </div>
  160. </div>
  161. {% endif %}
  162. {# {% if best_price is not null and showPartnerDiscount %}
  163. <div class="old-price">
  164. <div class="price text-2xl-sebd color-grey">
  165. {{ (best_price / (1 - discountPercent / 100))|number_format(0, ',', ' ') }}€
  166. </div>
  167. <div class="reduction-amount text-xs-md color-card-background br1">-{{ discountPercent }}%</div>
  168. </div>
  169. {% endif %} #}
  170. <div>
  171. <div>
  172. {{ cruise.bestPrice.cabinCategory.cabinSubType.name|default('') ?: 'details.cabin_choice.room'|trans }}
  173. <br>
  174. {{ 'common.from'|trans|lower }}
  175. </div>
  176. <div>
  177. {% if best_price is not null %}
  178. <span class="price text-4xl-sebd color-price-tags-primary">{{ best_price|number_format(0, ',', ' ') }}€</span>{{ 'common.per_person_short'|trans }}
  179. {% else %}
  180. <span class="price text-4xl-sebd color-price-tags-primary">-</span>
  181. {% endif %}
  182. </div>
  183. </div>
  184. {% if content.isFloa|default(false) %}
  185. <div class="floa text-sm-rg color-primary-dark">
  186. {{ 'ddd.pay_in_installments'|trans }}
  187. <img src="/img/logos/floa4x.svg" alt="FLOA"/>
  188. </div>
  189. {% endif %}
  190. <a class="btn style1 medium" href="#choix-cabine">
  191. {{ 'ddd.choose_cabin_type'|trans }}
  192. </a>
  193. </div>
  194. </div>
  195. <div class="col-lg-1 col-md-1 col-sm-12"></div>
  196. </div>
  197. </div>