templates/client/courses/show.html.twig line 1

Open in your IDE?
  1. {% extends '/client/common/base.html.twig' %}
  2. {% block title %}Home{% endblock %}
  3. {% block body %}
  4. <div class="uk-container uk-container-large uk-margin-large uk-margin-large-top">
  5.     <h1>{{ entry.title }}</h1>
  6.     <div>
  7.         <div class="uk-card">
  8.             <div class="uk-card-media-top">
  9.                 {% if (entry.imageIntro.imageName) %}
  10.                 <picture>
  11.                     <source srcset="{{ vich_uploader_asset(entry.imageFull, 'imageFile') | imagine_filter('course_large_webp') }}" type="image/webp">
  12.                     <source srcset="{{ vich_uploader_asset(entry.imageFull, 'imageFile') | imagine_filter('course_large') }}" type="image/jpeg">
  13.                     <img src="{{ vich_uploader_asset(entry.imageFull, 'imageFile') | imagine_filter('course_large') }}" alt="{{ entry.title }}">
  14.                 </picture>
  15.                 {% endif %}
  16.             </div>
  17.             <div class="uk-card-body">
  18.                 <div class="uk-text-meta uk-margin-bottom">
  19.                     {{ 'Created at'|trans }}: {{ entry.createdAt|date("d/m/Y") }},
  20.                     {{ 'Posted at'|trans }}:
  21.                     {% for category in entry.categoryOrdering %}
  22.                         <a href="{{ path('client_course_category_list', {'slug': category.category.slug }) }}">{{ category.category.title }}</a>
  23.                         {% if not (loop.last) %}, {% endif %}
  24.                     {% endfor %}
  25.                 </div>
  26.                 <div>{{ entry.description|raw }}</div>
  27.                 {% if is_granted('ROLE_CLIENT') %}
  28.                 <div class="cart">
  29.                     <h3>{{ 'Price' }}: {{ entry.priceFinal }} &euro;</h3>
  30.                     <form method="post" action="{{ path('app_client_add_cart') }}">
  31.                         <input type="hidden" name="course" value="{{ entry.id }}" />
  32.                         <button class="uk-button uk-button-primary" type="submit">{{ 'Add to Cart'|trans }}</button>
  33.                     </form>
  34.                 </div>
  35.                 {% endif %}
  36.             </div>
  37.         </div>
  38.     </div>
  39. </div>
  40. {% endblock %}