From 5309b7f9039eba1f22c0c6ee1da63bd27f6befab Mon Sep 17 00:00:00 2001 From: Matheus Lins Date: Mon, 31 Oct 2016 12:38:34 -0300 Subject: [PATCH] colapse category #189 --- courses/templates/course/index.html | 44 +++++++++++++++++++++++++++++++++----------- courses/views.py | 2 +- 2 files changed, 34 insertions(+), 12 deletions(-) diff --git a/courses/templates/course/index.html b/courses/templates/course/index.html index f0c0b78..a4f5785 100644 --- a/courses/templates/course/index.html +++ b/courses/templates/course/index.html @@ -44,18 +44,41 @@ {% if user|has_role:'professor' or user|has_role:'system_admin' %} -
-
-

{% trans 'Category' %}

+
+
+

{% trans 'Category' %}

+
+
-
- + {% endif %} +
+
+ +
+
+ + {% for category in categorys_courses %} + + + + {% endfor %} +
+ {{category.name}} +
+
+
+
-
- {% endif %} {% endblock %} @@ -85,7 +108,6 @@
-
{% if courses|length > 0 %} diff --git a/courses/views.py b/courses/views.py index af0974f..1a1fff9 100644 --- a/courses/views.py +++ b/courses/views.py @@ -31,7 +31,7 @@ class IndexView(LoginRequiredMixin, NotificationMixin, generic.ListView): queryset = Course.objects.all() template_name = 'course/index.html' context_object_name = 'courses' - paginate_by = 2 + paginate_by = 10 aparece = True -- libgit2 0.21.2