templates\course\detail.html.twig line 1

Open in your IDE?
  1. {% extends '_base.html.twig' %}
  2. {% import '_macro/breadcrumbs.html.twig' as breadcrumbs %}
  3. {% block title %}
  4. {% include 'parts/_page-title.html.twig' %}
  5. {% endblock %}
  6. {% block stylesheets %}
  7.     {{ parent() }}
  8.     {{ encore_entry_link_tags('course', null, site|lower) }}
  9.     {{ encore_entry_link_tags('custom', null, site|lower) }}
  10. {% endblock %}
  11. {% block body %}
  12. {% include '_header.html.twig' %}
  13. <div class="main">
  14.     {#{{ dump(course) }}#}
  15.     {% include 'parts/_pageText.html.twig' %}  
  16.   <div class="inner courses">
  17.     <div class="container">
  18.       <div class="row">
  19.         <div class="offset-xl-1 col-xl-10 col-12">
  20.           <div class="inner__header">
  21.             <div class="inner__backlink">
  22.                 <span class="backlink__name backlink">
  23.               {{ breadcrumbs.render(breadcrumbsData) }}
  24.             </span>
  25.             </div>
  26.             {% include 'parts/_home-cards.html.twig' %}
  27.             <div class="inner__title">
  28.               <h1 style="color: {{course.coursedetail_inner_title_hex_color}}">
  29.                 {{ course.courseTitle }}
  30.               </h1>
  31.               {% include 'parts/_alert.html.twig' %}
  32.               {% if course["alertMessage"] is not null %}
  33.               <div class="alert {{course["alertMessage-alertClass"]}}">
  34.                   {{course["alertMessage"]}}
  35.               </div>
  36.               {% endif %}
  37.               {% if course["courseInstanceStopPress"] is not null %}
  38.               <div class="alert {{course["courseInstanceStopPress-alertClass"]}}">           
  39.                   {{ course["courseInstanceStopPress"] }}
  40.               </div> 
  41.               {% endif %}
  42.             </div>
  43.             
  44.             {% for key,btn in course["enrolControl_btns"] %}
  45.                 {#{{ dump(btn) }}#}
  46.               <div class="btn--action">
  47.                 <a 
  48.                     {% if btn["enrolControl_btn_route_type"]=="endpoint" %}href="{{path(btn["enrolControl_btn_route"],btn["enrolControl_btn_route_params"])}}"{% endif %} 
  49.                     class="btn btn--md inner__btn"
  50.                     data-btn-action="{{btn["enrolControl_btn_action"]}}"
  51.                     data-route-type="{{btn["enrolControl_btn_route_type"]}}"
  52.                     {% if btn["redirect_url"] is defined %}
  53.                         data-redirect="{{btn["redirect_url"]}}"
  54.                     {% endif %}
  55.                     style="color:{{course["enrolControl_btns_css"][0]["btn_color"]}};background-color:{{course["enrolControl_btns_css"][0]["btn_background_color"]}}"
  56.                     >
  57.                   <span>{{ btn["enrolControl_btn"] }}</span>
  58.                 </a>
  59.               </div>
  60.             {% endfor %}
  61.     
  62.           </div>
  63.          
  64.     
  65.     <div class="c-details__header">
  66.       <div class="c-details__title">Course code: {{ course.courseCode }}</div>  
  67.           <div class="c-details__short-descr">{{ course["courseShortDescription"] }}</div>
  68.           
  69.           {% if course["tutor"] is not null %}
  70.               <div class="c-details__tutor"><p><span class="title">Tutor:</span> {{course["tutor"]}}</p></div>
  71.           {% endif %}
  72.     </div>
  73.     
  74.           <div class="wrap--c-details__frames">
  75.             <div class="c-details__frames when-where" style="border-color:{{course.coursedetails_frames_hex_color}}">
  76.                 <div class="c-details__frames__title">
  77.                     <p>When & Where</p>
  78.                 </div>
  79.                 <div class="c-details__frames__content"> 
  80.                     {% if course["provider"] is defined and course["provider"] is not null %}
  81.                     <p>
  82.                         <a href="{{path('courseList', {id:course["providerID"], idType:"providerID"})}}">
  83.                             {{course["provider"]}}
  84.                         </a>
  85.                     </p>
  86.                     {% endif %}
  87.                     {% if course["locationID"] is defined and course["locationID"] is not null %}
  88.                     <p>
  89.                         <a href="{{path('courseList', {id:course["locationID"], idType:"locationID"})}}">
  90.                             {{course["locationLabel"]}}
  91.                         </a>
  92.                     </p>
  93.                     {% endif %}
  94.                     <p>From {{ course["startDate"] }} to {{ course["endDate"] }}</p>
  95.                     <p>{{ course["times"] }}</p>
  96.                     <p>{{ course["weeks"] }} weeks</p>
  97.                     <p>{{ course["posttown"] }}</p>
  98.                     <p>{{ course["postcode"] }}</p>
  99.                     {% if course.maplink is defined and course.maplink is not null %}
  100.                         <div class="c-details__location">
  101.                           <a target="_blank" class="c-details__location-link link" href="
  102.                                           {{ course.maplink }}
  103.                                       ">
  104.                           <span>Show on map</span>
  105.                           </a>
  106.                         </div>
  107.                     {% endif %}
  108.                 </div>                
  109.                     {# {{ dump(course) }} #}
  110.             </div>
  111.             <div class="c-details__frames fees" style="border-color: {{course.coursedetails_frames_hex_color}}">
  112.                 <div class="c-details__frames__title">
  113.                     <p>Fees</p>
  114.                 </div>                
  115.                 <div class="c-details__frames__content">
  116.                     {% if course["fullFee"] is not null %}
  117.                     <p>Full fee: &pound;{{ course["fullFee"]|round(2) }}</p>
  118.                     {% endif %}
  119.                     {% if course["concessionFee"] is not null %}
  120.                     <p>Concession fee: &pound;{{ course["concessionFee"]|round(2) }}</p>
  121.                     {% endif %}
  122.                     {% if course["fullFee"] is null and course["concessionFee"] is null %}
  123.                         Free
  124.                     {% endif %}
  125.                     {% if course["feeInformationText"] is defined and course["feeInformationText"] is not null %}
  126.                         <div class="c-details__fee-information-text">
  127.                             <p>{{course["feeInformationText"]}}</p>
  128.                         </div>
  129.                     {% endif %}
  130.                 </div>
  131.             </div>
  132.             <div class="clearfix"></div>
  133.         </div>
  134.        
  135.         <div class="wrap--timetable-btns">
  136.           <div id="BtnTimeTableShow" class="btn--show-timetable">
  137.               <p>
  138.                 <a href="#" class="btn btn--md btn--dark inner__btn btn--show-timetable" style="background-color:{{course.coursedetails_btn_dark_hex_color}}">
  139.                   <span>Show Timetable</span>
  140.                 </a>
  141.               </p>
  142.           </div>
  143.           <div id="BtnTimeTableHide" class="btn--hide-timetable">
  144.               <p>
  145.                   <a href="#" class="btn btn--md btn--dark inner__btn btn--show-timetable" style="background-color:{{course.coursedetails_btn_dark_hex_color}}">
  146.                     <span>Hide Timetable</span>
  147.                   </a>
  148.               </p>        
  149.           </div>
  150.         </div>
  151.         <div id="WrapperTimeTable" style="borde-color:{{course.coursedetails_frames_hex_color}}">
  152.             {% for session in courseSessions %}
  153.                 <div class="timetable-day">
  154.                     <div class="timetable-date">
  155.                         <p class="timetable-title">Date</p>
  156.                         <p>{{ session.start.date }}</p>
  157.                     </div>
  158.                     <div class="timetable-time">
  159.                         <p class="timetable-title">Time</p>
  160.                         <p>{{ session.start.time }}-{{ session.end.time }}</p>
  161.                     </div>
  162.                     {% if session.room is not null %}
  163.                     <div class="timetable-room">
  164.                         <p class="timetable-title">Room</p>
  165.                         <p>{{ session.room }}</p>
  166.                     </div>
  167.                     {% endif %}
  168.                 </div>
  169.             {% endfor %}
  170.         </div>
  171.     {% if courseInfo['text'] %}            
  172.     <div>
  173.         <h2>{{courseInfo['title']}}</h2>
  174.         {{courseInfo["text"]|raw}}
  175.     </div>          
  176.     {% endif %}           
  177.      <div class="btn--print">
  178.         <a onClick="event.preventDefault(); window.print();" href="#" class="btn btn--md btn--dark inner__btn btn--create-enquiry">
  179.           <span>Print this page</span>
  180.         </a>
  181.       </div>           
  182.       
  183.     </div>
  184.   </div>
  185. </div>
  186. {% include 'parts/_m-nav.html.twig' %}
  187. {% include '_tools-modal.html.twig' %}
  188. {% include '_footer.html.twig' %}
  189. {#<pre>
  190. {{ dump(course)}}
  191. {{ dump(courseInfo)}}
  192. </pre>#}
  193. {% block javascripts %}
  194.     {{ encore_entry_script_tags('course', null, site|lower) }}
  195.     {{ encore_entry_script_tags('custom', null, site|lower) }}
  196. {% endblock %}
  197. {% endblock %}