fix: empty state for courses enrolled
This commit is contained in:
@@ -13,15 +13,18 @@
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="common-card-style thread-card">
|
||||
<div class="w-25 text-center" style="margin: 0 auto;">
|
||||
<span class="font-weight-bold"> No Enrolled Courses </span>
|
||||
<div class="small">
|
||||
You have not enrolled in any course yet.
|
||||
</div>
|
||||
<a class="button is-primary ml-auto mr-auto mt-3" href="/courses">
|
||||
Explore Courses
|
||||
</a>
|
||||
{% set site_name = frappe.db.get_single_value("System Settings", "app_name") %}
|
||||
<div class="empty-state">
|
||||
<div class="course-home-headings text-center mb-0" style="color: inherit;">You haven't enrolled for any courses</div>
|
||||
<p class="text-center mb-8">Here are a few courses we recommend for you to get started with {{ site_name }}</p>
|
||||
{% set recommended_courses = [course1, course2, course3] %}
|
||||
<div class="cards-parent">
|
||||
{% for recommended_course in recommended_courses %}
|
||||
{% if recommended_course %}
|
||||
{% set course_details = frappe.get_doc("LMS Course", recommended_course) %}
|
||||
{{ widgets.CourseCard(course=course_details) }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
@@ -3,9 +3,41 @@
|
||||
"creation": "2021-10-21 11:29:50.424865",
|
||||
"docstatus": 0,
|
||||
"doctype": "Web Template",
|
||||
"fields": [],
|
||||
"fields": [
|
||||
{
|
||||
"__unsaved": 1,
|
||||
"fieldname": "recommended_courses",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "Recommended Courses for new users",
|
||||
"reqd": 0
|
||||
},
|
||||
{
|
||||
"__unsaved": 1,
|
||||
"fieldname": "course1",
|
||||
"fieldtype": "Link",
|
||||
"label": "Course 1",
|
||||
"options": "LMS Course",
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
"__unsaved": 1,
|
||||
"fieldname": "course2",
|
||||
"fieldtype": "Link",
|
||||
"label": "Course 2",
|
||||
"options": "LMS Course",
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
"__unsaved": 1,
|
||||
"fieldname": "course3",
|
||||
"fieldtype": "Link",
|
||||
"label": "Course 3",
|
||||
"options": "LMS Course",
|
||||
"reqd": 1
|
||||
}
|
||||
],
|
||||
"idx": 0,
|
||||
"modified": "2021-10-21 12:02:23.837501",
|
||||
"modified": "2021-10-28 19:36:11.372396",
|
||||
"modified_by": "Administrator",
|
||||
"module": "LMS",
|
||||
"name": "Courses Enrolled",
|
||||
|
||||
Reference in New Issue
Block a user