From f7ba72217b84a84b9d29a600d79bf908e4b8eed2 Mon Sep 17 00:00:00 2001 From: Jannat Patel Date: Fri, 16 Sep 2022 11:37:11 +0530 Subject: [PATCH] fix: controls script loading --- lms/hooks.py | 2 +- lms/www/courses/course.html | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/lms/hooks.py b/lms/hooks.py index 9c94b94c..fc70e0e6 100644 --- a/lms/hooks.py +++ b/lms/hooks.py @@ -21,7 +21,7 @@ app_license = "AGPL" # include js, css files in header of web template web_include_css = "lms.bundle.css" # web_include_css = "/assets/lms/css/lms.css" -web_include_js = "website.bundle.js" +web_include_js = ["website.bundle.js", "controls.bundle.js"] # include custom scss in every website theme (without file extension ".scss") # website_theme_scss = "lms/public/scss/website" diff --git a/lms/www/courses/course.html b/lms/www/courses/course.html index 163e1c5e..27e7257a 100644 --- a/lms/www/courses/course.html +++ b/lms/www/courses/course.html @@ -6,7 +6,6 @@ {% block head_include %} {% include "public/icons/symbol-defs.svg" %} - {% endblock %} @@ -22,7 +21,7 @@ {{ Description(course) }} {{ Save(course) }} {{ widgets.CourseOutline(course=course, membership=membership, is_user_interested=is_user_interested) }} - {% if not course.edit_mode and course.staus == "Approved" and not course.upcoming %} + {% if not course.edit_mode and course.status == "Approved" and not frappe.utils.cint(course.upcoming) %} {{ widgets.Reviews(course=course, membership=membership) }} {% endif %} @@ -423,9 +422,3 @@ {% endmacro %} - - -{% block base_scripts %} - {{ include_script("frappe-web.bundle.js") }} - {{ include_script('controls.bundle.js') }} -{% endblock %}