From 93032820b4e92715ac87a182f6402513acdef795 Mon Sep 17 00:00:00 2001 From: Matheus Lins Date: Wed, 5 Oct 2016 01:27:18 -0300 Subject: [PATCH] improvemented course's and subject's template --- courses/templates/course/index.html | 52 +++++++++++++++++++++++++++++++--------------------- courses/templates/course/view.html | 8 ++++++-- courses/templates/subject/index.html | 4 +++- 3 files changed, 40 insertions(+), 24 deletions(-) diff --git a/courses/templates/course/index.html b/courses/templates/course/index.html index 0f53ed3..783ea37 100644 --- a/courses/templates/course/index.html +++ b/courses/templates/course/index.html @@ -53,10 +53,20 @@ {% endfor %} {% endif %} +
+
+
+ + + +
+
{% if user|has_role:'professor, system_admin' %}
- {% if courses_teacher|length > 0 %} + {% if courses|length > 0 %} {% for course in courses_teacher %}
@@ -130,21 +140,11 @@
+{% endif %} -{% else %} +{% if user|has_role:'students' %} -
-
-
- - - -
-
- - {% if subjects_student|length > 0 %} + {% if courses|length > 0 %} {% for course in courses_student %}
@@ -154,9 +154,15 @@ {% endif %} -->
-

Course

- {{ course.category }} - {{ course.max_students }} {% trans 'students tops' %} +
+
+

{{course.name}}

+
+
+ {{ course.category }} + {{ course.max_students }} {% trans 'students tops' %} +
+

Course Name: {{ course.name }}

@@ -165,18 +171,22 @@

Description: - "Lorem ipsum dolor sit amet, consecctetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." + {% if couse.description %} + {{course.description|linebreaks}} + {% else %} + {% trans 'No description' %} + {% endif %}

- {% if user|has_role:'professor, system_admin' %} + View Course
@@ -185,7 +195,6 @@ {% endfor %} -
+ + {% endfor %} diff --git a/courses/templates/subject/index.html b/courses/templates/subject/index.html index 9bcea4b..91f9a38 100644 --- a/courses/templates/subject/index.html +++ b/courses/templates/subject/index.html @@ -67,7 +67,9 @@ {% endfor %} {% if user|has_role:'system_admin' or topic.owner == user%} - {% trans "Create Topic" %} + {% endif %} {% endblock %} -- libgit2 0.21.2