Zenjob templates updates. Notes for a few companies.
This commit is contained in:
@ -0,0 +1 @@
|
||||
{% capture course_path %}{% route course, id: course.id %}{% endcapture %}{% 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 href="{{ course_path }}" class="np-card"><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 }}" width="819" height="503" /> <div class="np-card-content np-card-content-vertical np-card-padding"><h3 class="np-card-content-title">{{ course.name }}</h3>{% if course.instructors.size > 0 %}<div class="np-card-content-subtitle">{{ course.instructor_names }}</div>{% endif %}<div class="card-info-wrapper">{% 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 | strip_html }}
|
||||
</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,38 @@
|
||||
{% 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" %}
|
||||
<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 %}
|
||||
{% 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,29 @@
|
||||
{% styles default %}
|
||||
{% styles colors %}
|
||||
{% styles custom %}
|
||||
|
||||
{% assign staging_school_id = "1ddd31d3-cabe-4809-b5d3-8abfbdd33458" %}
|
||||
{% assign production_sandbox_school_id = "a21f483c-cfa4-46f7-b30b-8753ec1e7f60" %}
|
||||
{% assign live_school_id = "3c8229bf-a77c-4c88-8c65-75a03b0b1212" %}
|
||||
|
||||
{% if current_school.id == staging_school_id %}
|
||||
{% comment %} <link rel="stylesheet" href="https://cdn.northpass.io/walmart/staging/walmart-styles_04262023_v1.min.css" /> {% endcomment %}
|
||||
{% elsif current_school.id == production_sandbox_school_id %}
|
||||
{% comment %} <link rel="stylesheet" href="https://cdn.northpass.io/walmart/production-sandbox/walmart-styles_04112023_v1.min.css" /> {% endcomment %}
|
||||
{% elsif current_school.id == live_school_id %}
|
||||
<link rel="stylesheet" href="https://cdn.northpass.io/walmart/live/walmart-styles_04062023_v1.min.css" />
|
||||
{% endif %}
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js" integrity="sha512-894YE6QWD5I59HgZOGReFYm4dnWc1Qt5NtvYSaNcOP+u1T9qYdvdihz0PPSiiqn/+/3e7Jo4EaG7TubfWGUrMQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.js" type="text/javascript"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/easy-toggle-state/1.16.0/easy-toggle-state.min.js" integrity="sha512-hG7MyW8uOh26+C0KutsTVCJm8waH4iA9vSa8gOsosTHdIh6JjOE/MRn8vmcFg2rLGTnpVWmSKcDJF48cB89/3w==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
|
||||
{% if current_school.id == staging_school_id %}
|
||||
{% comment %} <script src="https://cdn.northpass.io/walmart/staging/walmart-js_03062023_v1.min.js" defer ></script> {% endcomment %}
|
||||
{% include "js_scripts" %}
|
||||
{% elsif current_school.id == production_sandbox_school_id %}
|
||||
{% comment %} <script src="https://cdn.northpass.io/walmart/production-sandbox/walmart-js_10062023_v1.min.js" defer ></script> {% endcomment %}
|
||||
{% include "js_scripts" %}
|
||||
{% elsif current_school.id == live_school_id %}
|
||||
<script src="https://cdn.northpass.io/walmart/live/walmart-js_10062023_v1.min.js" defer ></script>
|
||||
{% endif %}
|
||||
@ -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,17 @@
|
||||
{% if result.type == "course" %}
|
||||
<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.sanitized_description }}</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
@ -0,0 +1,21 @@
|
||||
<nav class="np-sub-navigation navigation-mobile">
|
||||
<div class="np-sub-navigation-content">
|
||||
{% for link in navigations.sub_navigation %}
|
||||
{% if link.label == 'Home' %}
|
||||
<div class="np-sub-navigation-content-item {{ link.active_class }} home-link">
|
||||
<a class="np-sub-navigation-content-item-link" href="/app/courses">
|
||||
<i class="link-all-resources np-button-color np-sub-navigation-content-item-icon"></i>
|
||||
All Resources
|
||||
</a>
|
||||
</div>
|
||||
{% elsif link.label == 'Dashboard' %}
|
||||
<div class="np-sub-navigation-content-item {{ link.active_class }} my-resources-link">
|
||||
<a class="np-sub-navigation-content-item-link" href="/app/progress">
|
||||
<i class="link-my-resources np-button-color np-sub-navigation-content-item-icon"></i>
|
||||
Progress
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</nav>
|
||||
@ -0,0 +1,72 @@
|
||||
{% 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-container transparent-card">
|
||||
{% unless course.image_url contains "/assets/defaults/learning_experience/course-" %}
|
||||
<img src="{{ course.image_url }}" class="np-top-image" alt="{{ course.name }}" />
|
||||
{% endunless %}
|
||||
<div class="np-top-title">{{ course.name }}</div>
|
||||
<div class="cover-flex-container">
|
||||
<div class="card-content-length">
|
||||
{% if course.properties.course_length != 'NULL' %}
|
||||
<div class="card-content-length">{{ course.properties.course_length }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<hr class="hr-dotted" />
|
||||
</div>
|
||||
<div class="np-card-container np-card-padding np-card-spacing desc-block">
|
||||
<h3 class="np-card-heading">About the Resource</h3>
|
||||
<div class="np-card-text">{{ course.full_description }}</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() {
|
||||
if (sessionStorage.getItem('appContext') !== null && sessionStorage.getItem('appContext') !== 'Returning to App') {
|
||||
$(".mobile-header .exit-icon").attr("href", "javascript: sendMessage()")
|
||||
} else {
|
||||
if (document.referrer.includes("/search") || document.referrer.includes("/progress")) {
|
||||
$(".mobile-header .exit-icon").attr("href", "javascript: goBack()")
|
||||
}
|
||||
}
|
||||
}, 500)
|
||||
|
||||
</script>
|
||||
@ -0,0 +1,48 @@
|
||||
{% 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 unique_school_categories = available_school_categories | uniq | sort %}
|
||||
{% 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">Explore these videos and text-based 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">
|
||||
{% for course in courses.enrolled %}
|
||||
{% 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>
|
||||
@ -0,0 +1,4 @@
|
||||
<script>
|
||||
window.location.replace('/app/courses')
|
||||
</script>
|
||||
|
||||
@ -0,0 +1,10 @@
|
||||
{% capture icon %}
|
||||
fa-arrow-left
|
||||
{% endcapture %}
|
||||
{% include "mobile_header", title: learning_path.name, back_icon: icon, back_link: "/app/courses" %}
|
||||
|
||||
<main class="np-main np-max-width np-page-container">
|
||||
<div id="learning-path-mobile">
|
||||
{% include "learning_path_mobile_view" %}
|
||||
</div>
|
||||
</main>
|
||||
@ -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>
|
||||
@ -0,0 +1,54 @@
|
||||
{% include "mobile_header", title: "Search", back_icon: "fa-arrow-left", back_link: "javascript: goBack()" %}
|
||||
{% include "sub_navigation" %}
|
||||
|
||||
<main class="np-main np-search np-subpage-container np-max-width">
|
||||
<div class="np-header-search np-catalog-search np-header-search-expanded">
|
||||
<form action="{% route search %}" method="get" data-test="desktop-search">
|
||||
|
||||
<input
|
||||
aria-label="Search courses"
|
||||
class="np-header-search-input np-header-font-background-color"
|
||||
type="text"
|
||||
name="q"
|
||||
placeholder="Search"
|
||||
/>
|
||||
<i class="np-header-search-icon far fa-search"></i>
|
||||
</form>
|
||||
</div>
|
||||
<div class="np-search-header">
|
||||
<div class="np-resource-subtitle">
|
||||
<span class="np-resource-subtitle-number">{{ results.count }}</span>
|
||||
{% t .results_for %}
|
||||
<span class="results-term">"{{ results.term }}"</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if results.items.any? %}
|
||||
<div class="search-results-list">
|
||||
{% render "search_result" for results.items as result %}
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="np-card np-search-zero-state">
|
||||
<div class="np-card-container">
|
||||
<div class="np-card-content np-card-content-vertical np-search-zero-state-card">
|
||||
<div class="search-zero-state-img"></div>
|
||||
<div class="np-zero-state-text">
|
||||
<div class="zero-state-header">No results found</div>
|
||||
<div>Please try another search item.</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</main>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
const term = '{{ results.term }}'
|
||||
sortSearchResultsByTerm(term)
|
||||
|
||||
const resultsCount = document.querySelector(".np-resource-subtitle-number")
|
||||
const allResults = document.querySelectorAll(".np-search-result")
|
||||
resultsCount.innerHTML = allResults.length
|
||||
})
|
||||
</script>
|
||||
Reference in New Issue
Block a user