diff --git a/lms/lms/doctype/lms_settings/lms_settings.json b/lms/lms/doctype/lms_settings/lms_settings.json index 5f3b63ed..c1aa5437 100644 --- a/lms/lms/doctype/lms_settings/lms_settings.json +++ b/lms/lms/doctype/lms_settings/lms_settings.json @@ -7,7 +7,7 @@ "field_order": [ "search_placeholder", "portal_course_creation", - "add_to_navbar", + "is_onboarding_complete", "column_break_2", "custom_certificate_template", "livecode_url", @@ -141,15 +141,15 @@ }, { "default": "0", - "fieldname": "add_to_navbar", + "fieldname": "is_onboarding_complete", "fieldtype": "Check", - "label": "Add LMS pages to navbar" + "label": "Is Onboarding Complete" } ], "index_web_pages_for_search": 1, "issingle": 1, "links": [], - "modified": "2022-12-12 11:36:16.162795", + "modified": "2022-12-19 18:36:33.987735", "modified_by": "Administrator", "module": "LMS", "name": "LMS Settings", diff --git a/lms/public/css/style.css b/lms/public/css/style.css index 6445ae04..fe726f9c 100644 --- a/lms/public/css/style.css +++ b/lms/public/css/style.css @@ -130,6 +130,10 @@ input[type=checkbox] { stroke: none; } +.onboarding-parent .icon { + stroke: none; +} + .course-card-content { padding: 1rem; display: flex; @@ -1883,3 +1887,27 @@ select { .clickable-row { cursor: pointer; } + +.onboarding-parent { + background-color: var(--primary-light); + padding: 2rem 0; +} + +.onboarding-steps { + display: flex; + justify-content: space-between; + padding-top: 1.5rem; + font-weight: 500; + color: var(--gray-900); +} + +.onboarding-steps-link { + display: flex; + align-items: center; + color: inherit; +} + +.onboarding-steps-link:hover { + text-decoration: none; + color: inherit; +} diff --git a/lms/public/icons/symbol-defs.svg b/lms/public/icons/symbol-defs.svg index 17af9ab2..4e249cdf 100644 --- a/lms/public/icons/symbol-defs.svg +++ b/lms/public/icons/symbol-defs.svg @@ -64,4 +64,12 @@ + + + + + + + + diff --git a/lms/templates/onboarding_header.html b/lms/templates/onboarding_header.html new file mode 100644 index 00000000..06aed5dd --- /dev/null +++ b/lms/templates/onboarding_header.html @@ -0,0 +1,50 @@ +{% set is_onboarding_complete = frappe.db.get_single_value("LMS Settings", "is_onboarding_complete") %} + +{% if has_course_moderator_role() and not is_onboarding_complete %} + +{% set course_created = frappe.db.count("LMS Course") %} +{% set chapter_created = frappe.db.count("Course Chapter") %} +{% set lesson_created = frappe.db.count("Course Lesson") %} +{% set quiz_created = frappe.db.count("LMS Quiz") %} + + +
+
+

{{ _("Welcome") }} 🎉

+
+ {{ _("Lets start setting up your content on the LMS so that you can reclaim time and focus on growth.") }} +
+ + +
+
+{% endif %} diff --git a/lms/www/courses/index.html b/lms/www/courses/index.html index 4940c100..59c59ebb 100644 --- a/lms/www/courses/index.html +++ b/lms/www/courses/index.html @@ -12,6 +12,7 @@ {% block content %} +{% include "lms/templates/onboarding_header.html" %}
{% if restriction %}