diff --git a/apps/course/templates/course/inclusion/category_items.html b/apps/course/templates/course/inclusion/category_items.html
index 5e6aeef5..8dd8a0e9 100644
--- a/apps/course/templates/course/inclusion/category_items.html
+++ b/apps/course/templates/course/inclusion/category_items.html
@@ -1,5 +1,6 @@
{% for cat in category_items %}
-
+
{% endfor %}
\ No newline at end of file
diff --git a/apps/course/templatetags/lilcity_category.py b/apps/course/templatetags/lilcity_category.py
index 957e50c2..f4596935 100644
--- a/apps/course/templatetags/lilcity_category.py
+++ b/apps/course/templatetags/lilcity_category.py
@@ -9,7 +9,7 @@ register = template.Library()
def category_items(category=None):
return {
'category_items': Category.objects.filter(courses__status=Course.PUBLISHED).exclude(courses=None).distinct(),
- 'category': category,
+ 'category': int(category[0]) if category and category[0] else None,
}
diff --git a/web/src/js/modules/courses.js b/web/src/js/modules/courses.js
index 2581df46..1353ae43 100644
--- a/web/src/js/modules/courses.js
+++ b/web/src/js/modules/courses.js
@@ -12,6 +12,10 @@ moment.locale('ru');
const history = createHistory();
$(document).ready(function () {
+ const currentCategory = $('div.js-select-option.active[data-category-option]').attr('data-category-name');
+ if(currentCategory) {
+ $('.js-select[data-category-select] .js-select-head').text(currentCategory);
+ }
// Обработчик отложенных курсов
setInterval(() => {
$('div[data-future-course]').each((_, element) => {
@@ -129,4 +133,4 @@ function load_courses(coursesUrl, fromStart) {
buttonElement.removeClass('loading');
}
});
-}
\ No newline at end of file
+}