Files
Gainsight/Custom_Templates/customer_templates/Walmart Supplier Prod/_cards_course.html.liquid
2025-06-17 16:50:09 -04:00

51 lines
2.0 KiB
Plaintext

{% assign skip_course_page = false %}
{% for category in course.categories %}
{% if category.name == 'Blog' %}
{% comment %}{% or category.name == 'HelpDoc' %} {% endcomment %}
{% assign skip_course_page = true %}
{% endif %}
{% endfor %}
<div class="card-course" progress="{% if course.progress == 100 %}completed{% elsif course.progress == 0 %}not-started{% else %}in-progress{% endif %}">
<div class="np-card-container">
{% if course.ribbon %}
<div class="np-card-ribbon">
{{ course.ribbon }}
</div>
{% endif %}
<img
class="np-card-image"
alt="{{ course.name }}"
src="{{ course.image_url }}"
>
<div class="np-card-content np-card-content-vertical np-card-padding">
<h3 class="np-card-content-title">
{{ course.name }}
</h3>
<div class="np-card-content-subtitle">
{{ course.instructor_names }}
</div>
<div class="np-card-content-footer">
<div class="np-card-content-progress np-button-color">
{% t shared.progress, count: course.progress %}
</div>
{% capture course_path %}{% route course, id: course.id %}{% endcapture %}
{% if course.has_to_restart? %}
{% include "course_version_outdated_popup", path: course_path %}
{% endif %}
<div class="button-container">
{% if skip_course_page %}
<a class="button-course" {% if course.enrolled? == true %}href="{% route course_viewer, course_id: course.id, learning_path_id: params.learning_path_id %}"{% else %}href="{{ course_path }}"{% endif %}>
{% t shared.view %}
</a>
{% else %}
<a class="button-course" {% if course.properties.skip_course_page == true and course.enrolled? == true %}href="{% route course_viewer, course_id: course.id, learning_path_id: params.learning_path_id %}"{% else %}href="{{ course_path }}"{% endif %}>
{% t shared.view %}
</a>
{% endif %}
</div>
</div>
</div>
</div>
</div>