From 1fa68bbde899b56e2371ff5ab18ecad230b83587 Mon Sep 17 00:00:00 2001 From: fbormann Date: Wed, 2 Nov 2016 14:32:59 -0300 Subject: [PATCH] added support for teachers and admins for courses #201 --- core/static/css/base/amadeus.css | 8 ++++++++ courses/templates/course/course_card.html | 2 +- courses/templates/course/index.html | 29 +++++++++-------------------- 3 files changed, 18 insertions(+), 21 deletions(-) diff --git a/core/static/css/base/amadeus.css b/core/static/css/base/amadeus.css index ea5d9ad..7a5d07b 100644 --- a/core/static/css/base/amadeus.css +++ b/core/static/css/base/amadeus.css @@ -420,6 +420,14 @@ ul, li { .course, .subject, .topic{ padding-top: 0px; padding-bottom: 0px; } .course-detail{padding-top: 10px; padding-bottom: 10px;} +.course-card{ + margin-bottom: 0.4% !important; +} + +.course-card-group{ + margin-bottom: 1%; +} + .category-course-link{ font-size: 24px; color: black !important; diff --git a/courses/templates/course/course_card.html b/courses/templates/course/course_card.html index a9288c6..44038fd 100644 --- a/courses/templates/course/course_card.html +++ b/courses/templates/course/course_card.html @@ -1,6 +1,6 @@ {% load static i18n permission_tags %} {% load django_bootstrap_breadcrumbs %} -
+
diff --git a/courses/templates/course/index.html b/courses/templates/course/index.html index 617e8cb..1d66b67 100644 --- a/courses/templates/course/index.html +++ b/courses/templates/course/index.html @@ -111,17 +111,20 @@
{% for category in categorys_courses %} -
+
-

- {{category.name}} -

- +
+ +
{% for course in category.course_category.all %} - {% if user in course.students.all %} + {% if user in course.students.all or user in course.professors.all or user|has_role:'system_admin' %} {% include "course/course_card.html" %} {% endif %} {% endfor %} @@ -131,20 +134,6 @@ {% endfor %} -