From 4ec9b563662f9b499953f933ff029eea7d1ae682 Mon Sep 17 00:00:00 2001 From: pateljannat Date: Thu, 26 Aug 2021 10:44:17 +0530 Subject: [PATCH] feat: course cards web template --- community/lms/web_template/__init__.py | 0 .../lms/web_template/course_cards/__init__.py | 0 .../course_cards/course_cards.html | 9 +++++ .../course_cards/course_cards.json | 39 +++++++++++++++++++ 4 files changed, 48 insertions(+) create mode 100644 community/lms/web_template/__init__.py create mode 100644 community/lms/web_template/course_cards/__init__.py create mode 100644 community/lms/web_template/course_cards/course_cards.html create mode 100644 community/lms/web_template/course_cards/course_cards.json diff --git a/community/lms/web_template/__init__.py b/community/lms/web_template/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/community/lms/web_template/course_cards/__init__.py b/community/lms/web_template/course_cards/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/community/lms/web_template/course_cards/course_cards.html b/community/lms/web_template/course_cards/course_cards.html new file mode 100644 index 00000000..548a3296 --- /dev/null +++ b/community/lms/web_template/course_cards/course_cards.html @@ -0,0 +1,9 @@ +
+

{{ title }}

+
+ {% for course_row in courses %} + {% set course = frappe.get_doc("LMS Course", course_row.course) %} + {{ widgets.CourseCard(course=course) }} + {% endfor %} +
+
diff --git a/community/lms/web_template/course_cards/course_cards.json b/community/lms/web_template/course_cards/course_cards.json new file mode 100644 index 00000000..8d58dcd9 --- /dev/null +++ b/community/lms/web_template/course_cards/course_cards.json @@ -0,0 +1,39 @@ +{ + "__unsaved": 1, + "creation": "2021-08-26 10:28:55.796139", + "docstatus": 0, + "doctype": "Web Template", + "fields": [ + { + "__unsaved": 1, + "fieldname": "title", + "fieldtype": "Data", + "label": "Title", + "reqd": 0 + }, + { + "__unsaved": 1, + "fieldname": "courses", + "fieldtype": "Table Break", + "label": "Courses", + "reqd": 0 + }, + { + "__unsaved": 1, + "fieldname": "course", + "fieldtype": "Link", + "label": "Course", + "options": "LMS Course", + "reqd": 0 + } + ], + "idx": 0, + "modified": "2021-08-26 10:35:35.903834", + "modified_by": "Administrator", + "module": "LMS", + "name": "Course Cards", + "owner": "Administrator", + "standard": 1, + "template": "", + "type": "Section" +} \ No newline at end of file