templates/client/career-paths/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('careerpath_large_webp') }}" type="image/webp">
  12.                     <source srcset="{{ vich_uploader_asset(entry.imageFull, 'imageFile') | imagine_filter('careerpath_large') }}" type="image/jpeg">
  13.                     <img src="{{ vich_uploader_asset(entry.imageFull, 'imageFile') | imagine_filter('careerpath_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.                 <div uk-grid class="uk-child-width-1-3@s">
  28.                     {% for ccourse in courses %}
  29.                     {% set course = ccourse.course %}
  30.                     <div>
  31.                         <div class="uk-card uk-card-default">
  32.                             <div class="uk-card-media-top">
  33.                                 {% if (course.imageIntro.imageName) %}
  34.                                 <picture>
  35.                                     <source srcset="{{ vich_uploader_asset(course.imageIntro, 'imageFile') | imagine_filter('course_list_webp') }}" type="image/webp">
  36.                                     <source srcset="{{ vich_uploader_asset(course.imageIntro, 'imageFile') | imagine_filter('course_list') }}" type="image/jpeg">
  37.                                     <img src="{{ vich_uploader_asset(course.imageIntro, 'imageFile') | imagine_filter('course_list') }}" alt="{{ entry.title }}">
  38.                                 </picture>
  39.                                 {% endif %}
  40.                             </div>
  41.                             <div class="uk-card-body">
  42.                                 <h3 class="uk-card-title">{{ course.title }}</h3>
  43.                                 <div class="uk-text-meta uk-margin-small">
  44.                                     {{ 'Created at'|trans }}: {{ course.createdAt|date("d/m/Y") }},
  45.                                     {{ 'Posted at'|trans }}:
  46.                                     {% for category in course.categoryOrdering %}
  47.                                         <a href="{{ path('client_course_category_list', {'slug': category.category.slug }) }}">{{ category.category.title }}</a>
  48.                                         {% if not (loop.last) %}, {% endif %}
  49.                                     {% endfor %}
  50.                                 </div>
  51.                                 <div>{{ course.intro|raw }}</div>
  52.                                 <div>
  53.                                     <a class="uk-button uk-button-primary" href="{{ path('client_course_view', {'slug': course.slug}) }}">{{ 'Read more...'|trans }}</a>
  54.                                 </div>
  55.                             </div>
  56.                         </div>
  57.                     </div>
  58.                     {% endfor %}
  59.                 </div>
  60.                 {% if is_granted('ROLE_CLIENT') and not userActive %}
  61.                 <div class="uk-margin">
  62.                     <form method="post" action="{{ path('client_assign_career_path') }}">
  63.                         <input type="hidden" name="_csrf_token" value="{{ csrf_token('addcareerpath') }}">
  64.                         <input type="hidden" name="careerPath" value="{{ entry.id }}" />
  65.                         <button class="uk-button uk-button-primary" type="submit">{{ 'Add to my Paths'|trans }}</button>
  66.                     </form>
  67.                 </div>
  68.                 {% endif %}
  69.             </div>
  70.         </div>
  71.     </div>
  72. </div>
  73. {% endblock %}