Files
Gainsight/Custom_Templates/customer_templates/Zenjob/course.html.liquid
2023-05-12 16:45:50 -04:00

75 lines
2.4 KiB
Plaintext

{% comment %} Skip cover page is course contains on the job category {% endcomment %}
{% for cat in course.categories %}
{% assign cat_name = cat.name | downcase %}
{% if cat_name == "on-the-job" or cat.id == "40b1f3d7-6faf-4d54-a74f-92d330831728" %}
{% if course.enrolled? %}
<script>window.location.replace("{% route course_viewer, course_id: course.id, learning_path_id: params.learning_path_id %}")</script>
{% else %}
<script>window.location.replace("{% route course_enrollment, code: course.enrollment_code %}")</script>
{% endif %}
{% endif %}
{% endfor %}
{% if course.properties.skip_course_cover_page == true %}
{% if course.enrolled? %}
<script>window.location.replace("{% route course_viewer, course_id: course.id, learning_path_id: params.learning_path_id %}")</script>
{% else %}
<script>window.location.replace("{% route course_enrollment, code: course.enrollment_code %}")</script>
{% endif %}
{% endif %}
{% include "header", current_page_orgin: "catalog" %}
<main class="np-main np-page-container page--course-overview">
{% comment %} Get the full size background image by removing the modifier from the URL {% endcomment %}
{% assign course_image_full_size = course.image_url | replace: '/resize=width:820,height:500,fit:crop/', '/' %}
<div class="np-card">
<div class="np-card-container">
<div class="np-resource-header details-card__header np-card-padding-dynamic">
{% include "course_header" %}
</div>
<div class="np-divider"></div>
<div class="details-card__card-content np-card-padding-dynamic">
{% if course.full_description and course.full_description.size > 0 %}
{% include "course_description" %}
{% endif %}
{% if course.instructors and course.instructors.any? %}
<div class="np-card-content-divider">
{% include "course_instructors" %}
</div>
{% endif %}
{% include "course_outline" %}
{% if course.events and course.events.any? %}
<div class="np-card-content-divider">
{% include "course_events" %}
</div>
{% endif %}
{% if course.enrolled? and course.started? %}
{% include "course_progress_and_cta" %}
{% else %}
{% include "course_cta_button" %}
{% endif %}
</div>
</div>
</div>
</main>
{% include "footer" %}
<style>
.np-main {
background:#8B78FA;
}
.np-top-button.disabled {
background-color: #ddd;
cursor: text;
}
</style>