diff --git a/lms/lms/doctype/lms_class/lms_class.json b/lms/lms/doctype/lms_class/lms_class.json index be46771e..fd0edc2e 100644 --- a/lms/lms/doctype/lms_class/lms_class.json +++ b/lms/lms/doctype/lms_class/lms_class.json @@ -11,6 +11,7 @@ "title", "start_date", "end_date", + "paid_class", "column_break_4", "seat_count", "start_time", @@ -75,6 +76,12 @@ "label": "Custom Component", "options": "HTML" }, + { + "default": "0", + "fieldname": "paid_class", + "fieldtype": "Check", + "label": "Paid Class" + }, { "fieldname": "seat_count", "fieldtype": "Int", diff --git a/lms/lms/doctype/lms_class/lms_class.py b/lms/lms/doctype/lms_class/lms_class.py index e4aae569..60726434 100644 --- a/lms/lms/doctype/lms_class/lms_class.py +++ b/lms/lms/doctype/lms_class/lms_class.py @@ -75,25 +75,11 @@ def add_student(email, class_name): @frappe.whitelist() def remove_student(student, class_name): frappe.db.delete("Class Student", {"student": student, "parent": class_name}) - return True @frappe.whitelist() -def update_course(class_name, course, value): - if cint(value): - doc = frappe.get_doc( - { - "doctype": "Class Course", - "parent": class_name, - "course": course, - "parenttype": "LMS Class", - "parentfield": "courses", - } - ) - doc.save() - else: - frappe.db.delete("Class Course", {"parent": class_name, "course": course}) - return True +def remove_course(course, parent): + frappe.db.delete("Class Course", {"course": course, "parent": parent}) @frappe.whitelist() diff --git a/lms/public/css/style.css b/lms/public/css/style.css index 6ed745ce..c04f26b1 100644 --- a/lms/public/css/style.css +++ b/lms/public/css/style.css @@ -124,7 +124,7 @@ textarea.field-input { border-bottom: none; } -.level { +.outline-lesson .level { justify-content: start; } @@ -526,24 +526,6 @@ input[type=checkbox] { margin: 0.25rem 0; } -.button { - border-radius: var(--border-radius); - cursor: pointer; - display: flex; - align-items: center; - justify-content: center; - padding: 0.25rem 1.25rem; - font-size: var(--text-md); - line-height: 20px; - box-shadow: var(--btn-shadow); - border: none; - width: fit-content; -} - -.button:disabled { - cursor: not-allowed; -} - .wide-button { padding: 0.3rem 4rem; width: 100%; @@ -555,35 +537,6 @@ input[type=checkbox] { } } -.is-secondary { - background: #FFFFFF; - color: var(--gray-900); -} - -.is-secondary:hover { - text-decoration: none; - color: var(--gray-900); -} - -.is-default { - background: var(--gray-100); - color: var(--gray-900); -} - -.is-default:disabled { - color: var(--gray-500); -} - -.is-primary { - background: var(--primary-color); - color: #FFFFFF; -} - -.is-primary:hover { - text-decoration: none; - color: #FFFFFF; -} - .course-home-page .course-home-outline { padding-bottom: 4rem; } @@ -2144,10 +2097,10 @@ select { .lms-card { display: flex; flex-direction: column; - border-radius: 0.75rem; - /* border: 1px solid var(--gray-200); */ - box-shadow: var(--shadow-sm); - padding: 0.5rem; + border-radius: 0.75rem; + border: 1px solid var(--gray-300); + /* box-shadow: var(--shadow-sm); */ + padding: 0.5rem; height: 100%; position: relative; } @@ -2194,3 +2147,11 @@ select { background-color: var(--red-50); } +.list-row { + border-bottom: 1px solid var(--gray-300); + padding: 0.75rem 0; +} + +.list-row:last-child { + border-bottom: none; +} \ No newline at end of file diff --git a/lms/www/classes/class.html b/lms/www/classes/class.html index 1df30575..e115cb31 100644 --- a/lms/www/classes/class.html +++ b/lms/www/classes/class.html @@ -31,10 +31,10 @@ {% macro ClassDetails(class_info) %}
-
+
{{ class_info.title }}
-
+
@@ -46,7 +46,7 @@
{% if class_info.description %} -
+
{{ class_info.description }}
{% endif %} @@ -62,20 +62,28 @@ {% macro ClassSections(class_info, class_courses, class_students, published_courses) %}
- + {% endif %}
-{% endmacro %} - - -{% macro AddStudents() %} -
-
- -
+ {% endmacro %} {% macro LiveClassSection(class_info, live_classes) %} -
+
+
+
+ {{ _("Live Class") }} +
+ {% if is_moderator %} + + {% endif %} +
{{ CreateLiveClass(class_info) }} {{ LiveClassList(class_info, live_classes) }}
@@ -199,9 +230,6 @@ {% macro CreateLiveClass(class_info) %} {% if is_moderator %} -