Spark Prod and Sandbox templates. Updated search results for Walmart Prod to hide the metrics program course. Big Ideas sandbox templates along with Mizuno Golf and Aiim's custom css tab.
This commit is contained in:
Binary file not shown.
@ -0,0 +1,39 @@
|
||||
{% capture course_label %}{% endcapture %}
|
||||
{% capture course_data_label %}none{% endcapture %}
|
||||
{% assign course_is_new = false %}
|
||||
{% assign created_at_date_seconds = current_person.created_at | date: "%s" %}
|
||||
{% assign course_published_date_seconds = course.properties.initial_publish_date | date: "%s" %}
|
||||
{% if course_published_date_seconds > created_at_date_seconds %}{% assign course_is_new = true %}{% endif %}
|
||||
{% if course_is_new %}
|
||||
{% if course.progress == 0 %}
|
||||
{% capture course_label %}<div class="label label-green new-topic-label">New</div>{% endcapture %}
|
||||
{% capture course_data_label %}new{% endcapture %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if course.progress > 0 and course.progress < 100 %}
|
||||
{% capture course_label %}<div class="label label-orange">In progress</div>{% endcapture %}
|
||||
{% capture course_data_label %}in-progress{% endcapture %}
|
||||
{% elsif course.completed? %}
|
||||
{% capture course_label %}<div class="label label-gray">Viewed</div>{% endcapture %}
|
||||
{% capture course_data_label %}viewed{% endcapture %}
|
||||
{% endif %}
|
||||
|
||||
<a class="np-card featured-card" href="{% route course, id: course.id %}">
|
||||
<div class="np-card-container">
|
||||
<img src="{{ course.image_url }}" alt="{{ course.name }}" />
|
||||
<div class="card-content-wrapper">
|
||||
<div class="featured-card-title">
|
||||
{{ course.name }}
|
||||
</div>
|
||||
<div class="featured-card-desc">
|
||||
{{ course.short_description }}
|
||||
</div>
|
||||
<div class="card-info">
|
||||
{% if course.properties.course_length != 'NULL' %}
|
||||
<div class="card-content-length">{{ course.properties.course_length }}</div>
|
||||
{% endif %}
|
||||
{{course_label}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
@ -0,0 +1,42 @@
|
||||
{% capture course_path %}{% route course, id: course.id %}{% endcapture %}
|
||||
{% capture course_label %}{% endcapture %}{% capture course_data_label %}none{% endcapture %}
|
||||
|
||||
{% assign is_new = false %}
|
||||
{% assign created_at_date_seconds = current_person.created_at | date: "%s" %}
|
||||
{% assign course_published_date_seconds = course.properties.initial_publish_date | date: "%s" %}
|
||||
|
||||
{% if course_published_date_seconds > created_at_date_seconds %}
|
||||
{% assign is_new = true %}
|
||||
{% endif %}
|
||||
|
||||
{% if is_new %}
|
||||
{% if course.progress == 0 %}
|
||||
{% capture course_label %}<div class="label label-green new-topic-label">New</div>{% endcapture %}
|
||||
{% capture course_data_label %}new{% endcapture %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if course.progress > 0 and course.progress < 100 %}
|
||||
{% capture course_label %}<div class="label label-orange">In progress</div>{% endcapture %}
|
||||
{% capture course_data_label %}in-progress{% endcapture %}
|
||||
{% elsif course.completed? %}
|
||||
{% capture course_label %}<div class="label label-gray">Viewed</div>{% endcapture %}
|
||||
{% capture course_data_label %}viewed{% endcapture %}
|
||||
{% endif %}
|
||||
|
||||
<a href="{{ course_path }}" class="np-card-condensed" data-label="{{course_data_label}}">
|
||||
<div class="np-card-condensed-content-wrapper">
|
||||
<div class="title-wrapper">
|
||||
<div class="np-course-title">{{ course.name }}</div>
|
||||
<div class="np-card-condensed-content-description">
|
||||
{{ course.full_description }}
|
||||
</div>
|
||||
<div class="info-wrapper">
|
||||
{% if course.properties.course_length != 'NULL' %}
|
||||
<div class="card-content-length">{{ course.properties.course_length }}</div>
|
||||
{% endif %}
|
||||
<div class="labels-wrapper">{{course_label}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
@ -0,0 +1,55 @@
|
||||
{% if courses.enrolled.any? %}{% comment %} GETTING STARTED {% endcomment %}{% for school_category in school_categories %} {% if school_category == "Getting Started" %}<div class="np-category-card" data-category='{{school_category | replace: " ", "-" | downcase }}'><div class="np-category-card-content-wrapper"><div class="np-category-card-img"><img src="https://cdn.northpass.io/walmart/categories-img-label.webp" width="60" height="60" alt="Getting Started Category Icon"></div><div class="title-wrapper"><div class="labels-wrapper"><div class="label label-green new-topic-label">New</div></div> <div class="np-category-title">{{school_category}}</div></div></div><i class="fas fa-chevron-right"></i></div>{% include "filtered_courses_tray", category_name: school_category %}{% endif %}{% endfor %}{% comment %} EARNINGS {% endcomment %}{% for school_category in school_categories %}{% if school_category == "Earnings" %}<div class="np-category-card" data-category='{{school_category | replace: " ", "-" | downcase }}'><div class="np-category-card-content-wrapper"><div class="np-category-card-img"><img src="https://cdn.northpass.io/walmart/category-earnings-icon.webp" width="61" height="60" alt="Earnings Category Icon"></div><div class="title-wrapper"><div class="labels-wrapper"> <div class="label label-green new-topic-label">New</div></div><div class="np-category-title">{{school_category}}</div></div></div><i class="fas fa-chevron-right"></i></div>{% include "filtered_courses_tray", category_name: school_category %}{% endif %}{% endfor %}{% comment %} SHOPPING & DELIVERY {% endcomment %}{% for school_category in school_categories %}{% if school_category == "Shopping & Delivery" %}<div class="np-category-card" data-category='{{school_category | replace: " ", "-" | downcase }}'><div class="np-category-card-content-wrapper"><div class="np-category-card-img"><img src="https://cdn.northpass.io/walmart/category-shopping-delivery-icon.webp" width="61" height="60" alt="Shopping & Delivery Category Icon"></div><div class="title-wrapper"><div class="labels-wrapper"><div class="label label-green new-topic-label">New</div></div><div class="np-category-title">{{school_category}}</div></div></div><i class="fas fa-chevron-right"></i></div>{% include "filtered_courses_tray", category_name: school_category %}{% endif %}{% endfor %}{% comment %} DELIVERY {% endcomment %}{% for school_category in school_categories %}{% if school_category == "Delivery" %}<div class="np-category-card" data-category='{{school_category | replace: " ", "-" | downcase }}'><div class="np-category-card-content-wrapper"><div class="np-category-card-img"><img src="https://cdn.northpass.io/walmart/category-delivery-icon.webp" width="61" height="60" alt="Delivery Category Icon"></div><div class="title-wrapper"><div class="labels-wrapper"><div class="label label-green new-topic-label">New</div></div><div class="np-category-title">{{school_category}}</div></div></div><i class="fas fa-chevron-right"></i></div>{% include "filtered_courses_tray", category_name: school_category %}{% endif %}{% endfor %}{% comment %} USING THE APP {% endcomment %}{% for school_category in school_categories %}{% if school_category == "Using the App" %}<div class="np-category-card" data-category='{{school_category | replace: " ", "-" | downcase }}'><div class="np-category-card-content-wrapper"><div class="np-category-card-img"><img src="https://cdn.northpass.io/walmart/category-using-the-app-icon.webp" width="60" height="60" alt="Using the App Category Icon"></div><div class="title-wrapper"><div class="labels-wrapper"><div class="label label-green new-topic-label">New</div></div><div class="np-category-title">{{school_category}}</div></div></div><i class="fas fa-chevron-right"></i></div>{% include "filtered_courses_tray", category_name: school_category %}{% endif %}{% endfor %}{% comment %} CONTACTING CUSTOMERS {% endcomment %}{% for school_category in school_categories %}{% if school_category == "Contacting Customers" %}<div class="np-category-card" data-category='{{school_category | replace: " ", "-" | downcase }}'><div class="np-category-card-content-wrapper"><div class="np-category-card-img"><img src="https://cdn.northpass.io/walmart/category-contacting-customers-icon.webp" width="61" height="60" alt="Contacting Customers Category Icon"></div><div class="title-wrapper"><div class="labels-wrapper"><div class="label label-green new-topic-label">New</div></div><div class="np-category-title">{{school_category}}</div></div></div><i class="fas fa-chevron-right"></i></div> {% include "filtered_courses_tray", category_name: school_category %}{% endif %}{% endfor %}
|
||||
|
||||
{% comment %} NON SPECIFIED {% endcomment %}
|
||||
{% for school_category in school_categories %}
|
||||
{% unless school_category == "Getting Started" or school_category == "Earnings" or school_category == "Shopping & Delivery" or school_category == "Delivery" or school_category == "Using the App" or school_category == "Contacting Customers" %}
|
||||
{% if school_category == "Resource Bundles" %}
|
||||
{% if features.learning_paths? and learning_paths.enrolled.any? %}
|
||||
<div class="np-category-card" data-category='resource-bundles'>
|
||||
<div class="np-category-card-content-wrapper">
|
||||
<div class="np-category-card-img">
|
||||
<img src="https://cdn.northpass.io/walmart/category-resource-bundles-icon.webp" width="60" height="60" alt="Category Icon">
|
||||
</div>
|
||||
<div class="title-wrapper">
|
||||
<div class="np-category-title">Resource Bundles</div>
|
||||
</div>
|
||||
</div>
|
||||
<i class="fas fa-chevron-right"></i>
|
||||
</div>
|
||||
{% include "filtered_learning_paths_tray", category_name: "Resource Bundles" %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<div class="np-category-card" data-category='{{school_category | replace: " ", "-" | downcase }}'>
|
||||
<div class="np-category-card-content-wrapper">
|
||||
<div class="np-category-card-img">
|
||||
{% if school_category == "Arrival & Pick Up" %}
|
||||
<img src="https://cdn.northpass.io/walmart/category-arrival-pickup-icon.webp" width="60" height="60" alt="Category Icon">
|
||||
{% elsif school_category == "Drop Off & Returns" %}
|
||||
<img src="https://cdn.northpass.io/walmart/category-dropoff-returns-icon.webp" width="60" height="60" alt="Category Icon">
|
||||
{% elsif school_category == "Troubleshooting" %}
|
||||
<img src="https://cdn.northpass.io/walmart/category-troubleshooting-icon.webp" width="60" height="60" alt="Category Icon">
|
||||
{% elsif school_category == "Trust & Safety" %}
|
||||
<img src="https://cdn.northpass.io/walmart/category-trust-safety-icon.webp" width="60" height="60" alt="Category Icon">
|
||||
{% elsif school_category == "Offer Acceptance" %}
|
||||
<img src="https://cdn.northpass.io/walmart/category-offer-acceptance-icon.webp" width="60" height="60" alt="Category Icon">
|
||||
{% elsif school_category == "Returns" %}
|
||||
<img src="https://cdn.northpass.io/walmart/category-returns-icon.webp" width="60" height="60" alt="Category Icon">
|
||||
{% else %}
|
||||
<img src="https://cdn.northpass.io/walmart/category-spark-icon.webp" width="61" height="60" alt="Category Icon">
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="title-wrapper">
|
||||
<div class="labels-wrapper">
|
||||
<div class="label label-green new-topic-label">New</div>
|
||||
</div>
|
||||
<div class="np-category-title">{{school_category}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<i class="fas fa-chevron-right"></i>
|
||||
</div>
|
||||
{% include "filtered_courses_tray", category_name: school_category %}
|
||||
{% endif %}
|
||||
{% endunless %}
|
||||
{% endfor %}
|
||||
|
||||
{% endif %}
|
||||
@ -0,0 +1 @@
|
||||
<a href="{% route activity_viewer, id: activity.id, course_id: params.course_id, learning_path_id: params.learning_path_id %}" class="{{ class }}">{{ activity.title }}</a><i class="fas fa-chevron-right np-course-outline-content-activity-icon-chevron"></i>
|
||||
@ -0,0 +1 @@
|
||||
<div class="np-course-outline"><div class="np-text-title np-course-outline-title">Contents</div><div class="np-course-outline-content"><ol class="np-course-outline-content-section">{% assign activity_count = 0 %}{% assign num_of_sections = course.sections | size %}{% assign num_of_activities_in_first_section = course.sections.first.activities | size %}{% for section in course.sections %}<li class="np-course-outline-content-section-list">{% if num_of_activities_in_first_section > 1 or num_of_sections > 1 %}<div class="np-course-outline-content-section-name">{{ section.name }}</div>{% endif %}<ol class="np-course-outline-content-activity">{% for activity in section.activities %}{% assign activity_count = activity_count | plus: 1 %}<li class="np-course-outline-content-activity-list">{% if activity.completed? %}<svg class="np-course-outline-content-activity-icon icon-check" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12Z" fill="#3171FF"/><path d="M7 12.2478L10.2561 15.5039L16.76 9" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>{% if activity.locked? %}<span class="np-course-outline-content-activity-title">{{ activity.title }}</span>{% else %}{% include "course_activity_unlocked", class: "np-course-outline-content-activity-link-completed" %}{% endif %}<div class="np-list-bar-completed np-course-outline-content-activity-list-bar"></div>{% else %}<div class="np-course-outline-content-activity-icon number-circle">{{ activity_count }}</div>{% if activity.locked? %}<span class="np-course-outline-content-activity-title"> {{ activity.title }}</span>{% else %}{% include "course_activity_unlocked", class: "np-course-outline-content-activity-link" %}{% endif %}<div class="np-course-outline-content-activity-list-bar"></div>{% endif %}</li>{% endfor %}</ol></li>{% endfor %} </ol></div></div>
|
||||
@ -0,0 +1 @@
|
||||
<div class="filtered-courses-tray" data-tray='{{school_category | replace: " ", "-" | downcase }}'><div class="tray-header"> <div class="close-tray"><i class="fal fa-arrow-left"></i></div><div class="header-title">{{category_name}}</div></div>{% if current_person.signed_in? %}<div class="np-courses-search np-header-search-expanded tray-search"><form action="{% route search %}" method="get" data-test="mobile-search"><i class="np-header-search-icon far fa-search"></i><input aria-label="Search courses" class="np-header-search-input np-header-font-background-color" type="text" name="q" placeholder="Search" /></form></div>{% endif %}<div class="tray-wrapper">{% assign enrolled_courses_by_progress = enrolled_courses | sort: "name" %}{% for course in enrolled_courses_by_progress %}{% for course_category in course.categories %}{% if school_category == course_category.name %}{% include "cards_course_condensed" with course %}{% endif %}{% endfor %}{% endfor %}</div></div>
|
||||
@ -0,0 +1,4 @@
|
||||
<div class="mobile-header">
|
||||
<a href="{{back_link}}" class="exit-icon"><i class="fal {{back_icon}}"></i></a>
|
||||
<div class="header-title">{{title}}</div>
|
||||
</div>
|
||||
@ -0,0 +1,18 @@
|
||||
{% if result.type == "course" %}
|
||||
{% unless result.item.id == "2a025042-0d2e-42d8-a6b1-08b3e07d1412" %}
|
||||
<div class="np-card np-search-result">
|
||||
<div class="np-card-container">
|
||||
<a class="np-card-content" href="{% if result.path contains 'activities' %}{{ result.path }}{% else %}{{ result.path | replace: '?search_sid=', '/cover?search_sid='}}{% endif %}">
|
||||
<div class="np-search-result-content">
|
||||
<div>
|
||||
<div class="np-search-result-title">
|
||||
{{ result.name }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="np-search-result-snippet">{{ result.item.full_description }}</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endunless %}
|
||||
{% endif %}
|
||||
@ -0,0 +1,94 @@
|
||||
{% if course.properties.skip_course_outline_page %}
|
||||
<script>
|
||||
window.location.replace('{% route course_viewer, course_id: course.id, learning_path_id: params.learning_path_id %}')
|
||||
</script>
|
||||
{% else %}
|
||||
{% assign back_button_url = "/app/courses" %}
|
||||
{% for category in course.categories %}
|
||||
{% assign cat_name = category.name | replace: " ", "-" | downcase %}
|
||||
{% assign back_button_url = '/app/courses#' | append: cat_name %}
|
||||
{% endfor %}
|
||||
|
||||
<div class="mobile-header">
|
||||
<a href="{{back_button_url}}" class="exit-icon">
|
||||
<i class="fal fa-arrow-left"></i>
|
||||
</a>
|
||||
<div class="header-title">{{ course.name }}</div>
|
||||
</div>
|
||||
|
||||
<main class="np-main np-max-width np-page-container course-cover-page">
|
||||
<div id="course-mobile">
|
||||
<div class="np-card cover-page-card">
|
||||
<div class="np-card-container">
|
||||
<img src="{{ course.image_url }}" alt="{{ course.name }}" />
|
||||
<div class="card-content-wrapper">
|
||||
<div class="cover-page-card-title">{{ course.name }}</div>
|
||||
<div class="cover-page-card-desc">{{ course.full_description }}</div>
|
||||
<div class="card-info">
|
||||
{% if course.properties.course_length != 'NULL' %}
|
||||
<div class="card-content-length">{{ course.properties.course_length }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="np-card-container np-card-padding np-card-spacing">
|
||||
{% include "course_outline" %}
|
||||
</div>
|
||||
<div class="np-top-cta stick-to-bottom">
|
||||
{% if course.learner_can_retake? %}
|
||||
<form action="{% route course_retake, id: course.id %}" method="POST">
|
||||
{% form_authenticity_token %}
|
||||
<button type="submit" class="np-top-button np-button-font-color np-button np-button-big">Review</button>
|
||||
</form>
|
||||
{% else %}
|
||||
<a
|
||||
class="np-top-button np-button-font-color np-button np-button-big"
|
||||
{% if course.enrolled? %}
|
||||
href="{% route course_viewer, course_id: course.id, learning_path_id: params.learning_path_id %}"
|
||||
{% else %}
|
||||
href="{% route course_enrollment, code: course.enrollment_code %}"
|
||||
{% endif %}>
|
||||
{% if course.progress > 0 and course.progress < 100 %}
|
||||
Resume
|
||||
{% elsif course.completed? %}
|
||||
Review
|
||||
{% else %}
|
||||
Start
|
||||
{% endif %}
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
{% endif %}
|
||||
|
||||
<script>
|
||||
|
||||
setTimeout(function() {
|
||||
const isAppContextAware = sessionStorage.getItem('appContext') !== null && sessionStorage.getItem('appContext') !== 'Returning to App';
|
||||
const appContextCategoryOrigin = sessionStorage.getItem('appContextCategoryOrigin')
|
||||
|
||||
if (document.referrer.includes("/search") || document.referrer.includes("/progress")) {
|
||||
console.log("User came directly from 'Search' or 'Progress' Tab.")
|
||||
if (isAppContextAware && !appContextCategoryOrigin) {
|
||||
console.log("Go back to app.")
|
||||
$(".mobile-header .exit-icon").attr("href", "javascript: sendMessage()")
|
||||
} else {
|
||||
console.log("Go back to previous page")
|
||||
$(".mobile-header .exit-icon").attr("href", "javascript: goBack()")
|
||||
}
|
||||
} else {
|
||||
if (window.location.pathname.includes("learning_paths")) {
|
||||
console.log("User navigating a learning path, Arrow will redirect back to learning path cover page.")
|
||||
const pathParts = window.location.pathname.split("/")
|
||||
$(".mobile-header .exit-icon").attr("href", `/app/learning_paths/${pathParts[3]}`)
|
||||
} else {
|
||||
if (isAppContextAware && !appContextCategoryOrigin) {
|
||||
console.log("App Context value exists. Category Origin does not. Go back to app.")
|
||||
$(".mobile-header .exit-icon").attr("href", "javascript: sendMessage()")
|
||||
}
|
||||
}
|
||||
}
|
||||
}, 500)
|
||||
</script>
|
||||
@ -0,0 +1,108 @@
|
||||
{% assign available_school_categories = '' | split: '' %}
|
||||
{% assign enrolled_courses = courses.enrolled %}
|
||||
{% for course in enrolled_courses %}
|
||||
{% for cat in course.categories %}
|
||||
{% assign cat_name = cat.name | split: '!@#$%^&*()' %}
|
||||
{% assign available_school_categories = available_school_categories | concat: cat_name %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% assign enrolled_learning_paths = learning_paths.enrolled %}
|
||||
{% for learning_path in enrolled_learning_paths %}
|
||||
{% for lp_cat in learning_path.categories %}
|
||||
{% assign lp_cat_name = lp_cat.name | split: '!@#$%^&*()' %}
|
||||
{% assign available_school_categories = available_school_categories | concat: lp_cat_name %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% assign unique_school_categories = available_school_categories | uniq | sort %}
|
||||
|
||||
{% assign resource_bundles_to_display = "" %}
|
||||
{% if features.learning_paths? %}
|
||||
{% if enrolled_learning_paths.any? %}
|
||||
{% if current_person.properties.access_level == "EXPERIENCED" %}
|
||||
{% assign resource_bundles_to_display = current_school.properties.featured_resource_bundles_experienced | downcase %}
|
||||
{% elsif current_person.properties.access_level == "BEGINNER" %}
|
||||
{% assign resource_bundles_to_display = current_school.properties.featured_resource_bundles_beginner | downcase %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% assign resource_bundles_to_display_array = resource_bundles_to_display | split: "," %}
|
||||
|
||||
{% capture icon %}
|
||||
fa-arrow-left{% endcapture %}
|
||||
{% include "mobile_header", title: "Resource Center", back_icon: icon, back_link: "javascript:sendMessage();" %}
|
||||
{% include "sub_navigation" %}
|
||||
<main class="np-main np-courses np-subpage-container np-max-width">
|
||||
{% if current_person.signed_in? %}
|
||||
<div class="np-courses-search np-header-search-expanded">
|
||||
<form
|
||||
action="{% route search %}"
|
||||
method="get"
|
||||
data-test="mobile-search">
|
||||
<i class="np-header-search-icon far fa-search"></i><input
|
||||
aria-label="Search courses"
|
||||
class="np-header-search-input np-header-font-background-color"
|
||||
type="text"
|
||||
name="q"
|
||||
placeholder="Search" /></form>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if current_person.properties.show_welcome_message %}
|
||||
<div class="intro-msg"><div class="intro-msg-icon-wrapper"><div class="intro-msg-icon"></div></div><div class="intro-msg-text">Questions? We can help! Check out these optional resources to get the most out of the Spark Driver™ app.</div></div>
|
||||
{% endif %}
|
||||
{% if courses.enrolled.any? %}
|
||||
<div class="recommended-courses-section">
|
||||
<div class="np-courses-section-label">Featured</div>
|
||||
<div class="recommended-courses-carousel-outer-container">
|
||||
<div class="recommended-courses-carousel">
|
||||
{% if features.learning_paths? %}
|
||||
{% if enrolled_learning_paths.any? %}
|
||||
{% for bundle in resource_bundles_to_display_array %}
|
||||
{% assign bundle_name = bundle | strip | escape_once %}
|
||||
{% for learning_path in enrolled_learning_paths %}
|
||||
{% assign lp_title_downcase = learning_path.name | downcase | strip | escape_once %}
|
||||
{% if lp_title_downcase contains bundle_name %}
|
||||
<div class="course-slide lp-slide">
|
||||
{% include "cards_learning_path" with learning_path, enrolled_courses: enrolled_courses %}
|
||||
</div>
|
||||
{% break %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% for course in enrolled_courses %}
|
||||
{% if course.properties.is_recommended_course == true %}
|
||||
{% if course.properties.access_level == current_person.properties.access_level %}
|
||||
<div
|
||||
class="course-slide"
|
||||
data-initialpublishdate="{{course.properties.initial_publish_date}}"
|
||||
data-position="{{course.properties.featured_course_position}}">
|
||||
{% include "cards_course" with course %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="all-categories-section">
|
||||
<div class="np-courses-section-label" style="margin-bottom:15px;">All Categories</div>
|
||||
<div class="category-cards-wrapper">
|
||||
{% include "category_cards", school_categories: unique_school_categories %}
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
const showWelcomeMessage = '{{current_person.properties.show_welcome_message}}'
|
||||
if (showWelcomeMessage == 'true') {
|
||||
let userData = {
|
||||
learner_uuid: '{{current_person.id}}'
|
||||
}
|
||||
const schoolUuid = '{{current_school.id}}'
|
||||
hideWelcomeMessage(userData, schoolUuid)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
@ -0,0 +1,3 @@
|
||||
<script>
|
||||
window.location.replace('/app/courses')
|
||||
</script>
|
||||
@ -1,7 +1,6 @@
|
||||
<div class="np-top-cta stick-to-bottom np-hidden">
|
||||
{% learning_path_next_step_button learning_path, class: "lp-button np-top-button np-button-font-color np-button np-button-big" %}
|
||||
</div>
|
||||
{% include "sub_navigation" %}
|
||||
<script>
|
||||
const learningPathBtnText = document.querySelector(".lp-button").innerText
|
||||
console.log(learningPathBtnText)
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
<div class="np-top-cta stick-to-bottom np-hidden">
|
||||
{% learning_path_next_step_button learning_path, class: "lp-button np-top-button np-button-font-color np-button np-button-big" %}
|
||||
</div>
|
||||
{% include "sub_navigation" %}
|
||||
<script>
|
||||
const learningPathBtnText = document.querySelector(".lp-button").innerText
|
||||
console.log(learningPathBtnText)
|
||||
|
||||
@ -0,0 +1,60 @@
|
||||
{% capture icon %}
|
||||
fa-arrow-left
|
||||
{% endcapture %}
|
||||
{% include "mobile_header", title: "Resource Center", back_icon: icon, back_link: "javascript:sendMessage();" %}
|
||||
|
||||
{% include "sub_navigation" %}
|
||||
|
||||
<main class="np-main np-dashboard np-subpage-container np-max-width">
|
||||
<div class="row np-flex-center">
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
{% if courses.enrolled.any? %}
|
||||
{% assign courses_in_progress = 0 %}
|
||||
{% assign enrolled_courses = courses.enrolled %}
|
||||
{% assign courses_ordered_by_progress = enrolled_courses | sort: "progress" %}
|
||||
{% for course in courses_ordered_by_progress %}
|
||||
|
||||
{% if course.progress > 0 %}
|
||||
{% assign courses_in_progress = courses_in_progress | plus: 1 %}
|
||||
{% capture course_path %}{% route course, id: course.id %}{% endcapture %}
|
||||
<a href="{{ course_path }}" class="np-card-condensed dashboard-card">
|
||||
<div class="np-card-condensed-content-wrapper">
|
||||
<div class="title-wrapper">
|
||||
|
||||
<div class="np-course-title">{{ course.name }}</div>
|
||||
<div class="info-wrapper">
|
||||
{% if course.properties.course_length != 'NULL' %}
|
||||
<div class="card-content-length">
|
||||
{{ course.properties.course_length }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="labels-wrapper">
|
||||
{% if course.progress > 0 and course.progress < 100 %}
|
||||
<div class="label label-orange">
|
||||
In progress
|
||||
</div>
|
||||
{% elsif course.completed? %}
|
||||
<div class="label label-gray">
|
||||
Viewed
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if courses_in_progress == 0 %}
|
||||
<div class="np-dashboard-resources-container">
|
||||
<div class="courses-zero-state-img"></div>
|
||||
<div class="np-zero-state-text">
|
||||
<p>You haven't viewed any resources yet.<br>Visit <a href="/app/courses">All Resources</a> to see what's available.</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
Reference in New Issue
Block a user