From fa8e9bbbf071f83a93363aca7f04964f89338102 Mon Sep 17 00:00:00 2001 From: Ivlev Denis Date: Thu, 15 Feb 2018 12:56:02 +0300 Subject: [PATCH] Fix courses in profile --- apps/course/templates/course/_items.html | 6 ++++++ apps/user/templates/user/profile.html | 8 ++++---- apps/user/views.py | 2 +- web/src/sass/_common.sass | 2 ++ 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/apps/course/templates/course/_items.html b/apps/course/templates/course/_items.html index 407526ca..81b06691 100644 --- a/apps/course/templates/course/_items.html +++ b/apps/course/templates/course/_items.html @@ -22,6 +22,12 @@
{% endif %} + {% if course.status == 1 %} +
+
КУРС ПРОХОДИТ МОДЕРАЦИЮ
+
+
+ {% endif %}
ОПУБЛИКОВАННЫЕ КУРСЫ - + {% endcomment %}
@@ -92,7 +92,7 @@
-
+ {% comment %}
{% include "course/course_items.html" with course_items=pending %} @@ -105,7 +105,7 @@ {% include "course/course_items.html" with course_items=drafts %}
-
+
{% endcomment %} diff --git a/apps/user/views.py b/apps/user/views.py index fe977a57..911cb06f 100644 --- a/apps/user/views.py +++ b/apps/user/views.py @@ -37,7 +37,7 @@ class UserView(DetailView): def get_context_data(self, object): context = super().get_context_data() context['published'] = Course.objects.filter( - author=self.object, status=Course.PUBLISHED + author=self.object, ) context['pending'] = Course.objects.filter( author=self.object, status=Course.PENDING diff --git a/web/src/sass/_common.sass b/web/src/sass/_common.sass index 13a6e6e0..0f733bc1 100755 --- a/web/src/sass/_common.sass +++ b/web/src/sass/_common.sass @@ -2755,6 +2755,8 @@ a.grey-link height: 56px margin-bottom: 40px border-bottom: 1px solid $border + align-items: center; + justify-content: center; +m margin: 0 -15px 30px &__btn