diff --git a/Custom_Templates/customer_templates/JJSV/_cards_catalog.html.liquid b/Custom_Templates/customer_templates/JJSV/_cards_catalog.html.liquid index b8928f65..c63feb0e 100644 --- a/Custom_Templates/customer_templates/JJSV/_cards_catalog.html.liquid +++ b/Custom_Templates/customer_templates/JJSV/_cards_catalog.html.liquid @@ -1,8 +1,15 @@ +{% assign content_expired = false %} +{% assign now = "now" | date: "%m/%d/%Y" %} + +{% if now >= course.properties.content_expiration %} + {% assign content_expired = true %} +{% endif %} + {% assign categories = '' | split: '' %} {% for cat in course.categories %} {% if cat.name contains "~" %} {% assign cat_name = cat.name | remove: "~" %} - {% assign cat_name = cat_name | split: "]" %} + {% assign cat_name = cat_name | split: "]" %} {% assign str_parts_size = cat_name | size %} {% assign cat_name = cat_name | slice: 1, 2 %} {% else %} @@ -12,8 +19,15 @@ {% assign categories = categories | concat: cat_name %} {% endfor %} -
+{% unless content_expired %} +{% capture course_path %}{% route course, id: course.id %}{% endcapture %} +
+ {% if course.ribbon %} +
+ {{ course.ribbon }} +
+ {% endif %} {{ course.name }} {{ course.full_description }}
- + {% comment %} {% for course_category in course.categories %}
{{course_category.name}}
{% endfor %} {% endcomment %} @@ -42,17 +56,23 @@ {% else %} Not viewed {% endif %} - +
{% unless course.properties.course_length contains 'NULL' %} - {{course.properties.course_length}} + | {{course.properties.course_length}} {% endunless %}
{% capture course_path %}{% route course, id: course.id %}{% endcapture %} - {% t shared.view %} + {% if course.started? == false %} + Start + {% elsif course.progress > 0 and course.progress < 100 %} + {% t shared.continue %} + {% elsif course.completed? %} + Resume + {% endif %} {% if course.has_to_restart? %} {% include "course_version_outdated_popup", path: course_path %} @@ -60,30 +80,22 @@ +{% endunless %} diff --git a/Custom_Templates/customer_templates/JJSV/_cards_course.html.liquid b/Custom_Templates/customer_templates/JJSV/_cards_course.html.liquid index a6905032..3d489b4c 100644 --- a/Custom_Templates/customer_templates/JJSV/_cards_course.html.liquid +++ b/Custom_Templates/customer_templates/JJSV/_cards_course.html.liquid @@ -1,17 +1,32 @@ -
+{% assign content_expired = false %} +{% assign now = "now" | date: "%m/%d/%Y" %} + +{% if now >= course.properties.content_expiration %} + {% assign content_expired = true %} +{% endif %} + +{% unless content_expired %} +
-
+ {% if course.ribbon %} +
+ {{ course.ribbon }}
- {{ course.name }} -
+ {% endif %} +
+ {{ course.name }} +
-
+
+{% endunless %} diff --git a/Custom_Templates/customer_templates/JJSV/_category_filter_sidebar.html.liquid b/Custom_Templates/customer_templates/JJSV/_category_filter_sidebar.html.liquid index 6bf1f8ee..9706cd69 100644 --- a/Custom_Templates/customer_templates/JJSV/_category_filter_sidebar.html.liquid +++ b/Custom_Templates/customer_templates/JJSV/_category_filter_sidebar.html.liquid @@ -4,12 +4,12 @@ {% for course in catalog_courses %} {% for cat in course.categories %} - {% assign cat_name = cat.name | split: '!@#$%^&*()' %} - {% if cat.name contains "~" %} - {% assign second_level_course_categories = second_level_course_categories | concat: cat_name %} - {% else %} - {% assign top_level_course_categories = top_level_course_categories | concat: cat_name %} - {% endif %} + {% assign cat_name = cat.name | split: '!@#$%^&*()' %} + {% if cat.name contains "~" %} + {% assign second_level_course_categories = second_level_course_categories | concat: cat_name %} + {% else %} + {% assign top_level_course_categories = top_level_course_categories | concat: cat_name %} + {% endif %} {% endfor %} {% endfor %} @@ -118,12 +118,4 @@ } } - - - \ No newline at end of file + \ No newline at end of file diff --git a/Custom_Templates/customer_templates/JJSV/_category_filter_sidebar_product_page.html.liquid b/Custom_Templates/customer_templates/JJSV/_category_filter_sidebar_product_page.html.liquid new file mode 100644 index 00000000..1e2ad414 --- /dev/null +++ b/Custom_Templates/customer_templates/JJSV/_category_filter_sidebar_product_page.html.liquid @@ -0,0 +1,120 @@ +{% assign product_education_course_categories = '' | split: '' %} + +{% assign top_level_course_categories = '' | split: '' %} +{% assign second_level_course_categories = '' | split: '' %} + +{% for course in catalog_courses %} + + {% for cat in course.categories %} + {% assign cat_name = cat.name | split: '!@#$%^&*()' %} + {% if cat.name contains "~[Product Education]" %} + {% assign product_education_course_categories = product_education_course_categories | concat: cat_name %} + {% endif %} + + {% comment %} {% if cat.name contains "Product Education" %} + + {% assign cat_name = cat.name | split: '!@#$%^&*()' %} + + {% if cat.name contains "~[Product Education]" %} + {% assign second_level_course_categories = product_education_course_categories | concat: cat_name %} + {% else %} + {% assign top_level_course_categories = top_level_course_categories | concat: cat_name %} + {% endif %} + {% endif %} {% endcomment %} + {% endfor %} +{% endfor %} + +{% assign unique_product_education_course_categories = product_education_course_categories | uniq | sort %} + +{% assign unique_top_level_course_categories = top_level_course_categories | uniq | sort %} +{% assign unique_second_level_course_categories = second_level_course_categories | uniq | sort %} + +
+
+
+ TOPICS +
+
+ All +
+ + {% for cat in unique_product_education_course_categories %} +
+
{{cat | remove: "~[Product Education] " }}
+
+ {% endfor %} +
+
+ + +{% comment %} + {% endcomment %} \ No newline at end of file diff --git a/Custom_Templates/customer_templates/JJSV/_course_desktop_view.html.liquid b/Custom_Templates/customer_templates/JJSV/_course_desktop_view.html.liquid index 68cf3909..3b1f0b4b 100644 --- a/Custom_Templates/customer_templates/JJSV/_course_desktop_view.html.liquid +++ b/Custom_Templates/customer_templates/JJSV/_course_desktop_view.html.liquid @@ -29,32 +29,4 @@ {% include "course_outline" %} - - - \ No newline at end of file + \ No newline at end of file diff --git a/Custom_Templates/customer_templates/JJSV/_courses_catalog.html.liquid b/Custom_Templates/customer_templates/JJSV/_courses_catalog.html.liquid index b43f109c..6cf8a0fa 100644 --- a/Custom_Templates/customer_templates/JJSV/_courses_catalog.html.liquid +++ b/Custom_Templates/customer_templates/JJSV/_courses_catalog.html.liquid @@ -1,9 +1,18 @@ {% if courses.in_catalog.any? %}
{% for course in courses.in_catalog %} -
- {% include "cards_catalog" %} -
+ + {% assign is_product_education_course = false %} + + {% for cat in course.categories %} + {% if cat.name contains "Product Education" %} + {% assign is_product_education_course = true %} + {% endif %} + {% endfor %} + +
+ {% include "cards_catalog" %} +
{% endfor %}
{% else %} diff --git a/Custom_Templates/customer_templates/JJSV/_courses_catalog_product_education.html.liquid b/Custom_Templates/customer_templates/JJSV/_courses_catalog_product_education.html.liquid new file mode 100644 index 00000000..c22a0034 --- /dev/null +++ b/Custom_Templates/customer_templates/JJSV/_courses_catalog_product_education.html.liquid @@ -0,0 +1,22 @@ +{% if courses.in_catalog.any? %} +
+ {% for course in courses.in_catalog %} + + {% assign is_product_education_course = false %} + + {% for cat in course.categories %} + {% if cat.name contains "Product Education" %} + {% assign is_product_education_course = true %} + {% endif %} + {% endfor %} + + {% if is_product_education_course %} +
+ {% include "cards_catalog" %} +
+ {% endif %} + {% endfor %} +
+{% else %} + {% include "catalog_zero_state" %} +{% endif %} diff --git a/Custom_Templates/customer_templates/JJSV/_courses_index.html.liquid b/Custom_Templates/customer_templates/JJSV/_courses_index.html.liquid new file mode 100644 index 00000000..cb36f731 --- /dev/null +++ b/Custom_Templates/customer_templates/JJSV/_courses_index.html.liquid @@ -0,0 +1,16 @@ +{% if courses.enrolled.any? %} +
+ {% for course in courses.enrolled %} +
+ {% include "cards_course_horizontal" with course %} +
+ {% endfor %} +
+{% else %} + {% capture message %} + {% t shared.zero_state.courses.index, + key: current_school.course_vocabulary + %} + {% endcapture %} + {% include "courses_zero_state", message: message %} +{% endif %} diff --git a/Custom_Templates/customer_templates/JJSV/_footer.html.liquid b/Custom_Templates/customer_templates/JJSV/_footer.html.liquid index 8324b96f..2f12ce83 100644 --- a/Custom_Templates/customer_templates/JJSV/_footer.html.liquid +++ b/Custom_Templates/customer_templates/JJSV/_footer.html.liquid @@ -1,9 +1,10 @@ - +