From 01a31a1d01a0928297c52bb02388588b5d57acb1 Mon Sep 17 00:00:00 2001 From: Zambom Date: Fri, 13 Jan 2017 16:46:33 -0200 Subject: [PATCH] Adding no subjects message --- amadeus/static/css/base/amadeus.css | 8 ++++++++ amadeus/static/css/themes/black.css | 9 +++++++++ amadeus/static/css/themes/green.css | 4 ++++ amadeus/static/css/themes/red.css | 9 +++++++++ subjects/templates/subjects/initial.html | 21 +++++++++++++++------ subjects/templates/subjects/list.html | 223 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------------------------------------------------ 6 files changed, 160 insertions(+), 114 deletions(-) diff --git a/amadeus/static/css/base/amadeus.css b/amadeus/static/css/base/amadeus.css index 317c667..3b3fdf7 100755 --- a/amadeus/static/css/base/amadeus.css +++ b/amadeus/static/css/base/amadeus.css @@ -603,4 +603,12 @@ ul, li { .form-group input[type=file] { margin-top: 20px; height: initial; +} + +.no-subjects i { + font-size: 50px; +} +.no-subjects h4 { + font-family: Roboto; + font-weight: normal; } \ No newline at end of file diff --git a/amadeus/static/css/themes/black.css b/amadeus/static/css/themes/black.css index 00ef3c6..c615f3a 100644 --- a/amadeus/static/css/themes/black.css +++ b/amadeus/static/css/themes/black.css @@ -267,4 +267,13 @@ a, a:focus, a:hover { .filedrag { color: #555; border: 2px dashed #555; +} + +.footer { + color: #FFFFFF; + background: #26A69A; +} + +.no-subjects { + color: #999999; } \ No newline at end of file diff --git a/amadeus/static/css/themes/green.css b/amadeus/static/css/themes/green.css index cc7f2b6..308a431 100644 --- a/amadeus/static/css/themes/green.css +++ b/amadeus/static/css/themes/green.css @@ -272,4 +272,8 @@ a, a:focus, a:hover { .footer { color: #FFFFFF; background: #26A69A; +} + +.no-subjects { + color: #999999; } \ No newline at end of file diff --git a/amadeus/static/css/themes/red.css b/amadeus/static/css/themes/red.css index 6b95703..28cb149 100644 --- a/amadeus/static/css/themes/red.css +++ b/amadeus/static/css/themes/red.css @@ -267,4 +267,13 @@ a, a:focus, a:hover { .filedrag { color: #555; border: 2px dashed #555; +} + +.footer { + color: #FFFFFF; + background: #26A69A; +} + +.no-subjects { + color: #999999; } \ No newline at end of file diff --git a/subjects/templates/subjects/initial.html b/subjects/templates/subjects/initial.html index df6002e..f9bb73b 100644 --- a/subjects/templates/subjects/initial.html +++ b/subjects/templates/subjects/initial.html @@ -27,14 +27,23 @@

{% trans "Meus Assuntos" %}

-
- {% for subject in subjects %} - {% include "subjects/subject_card.html" with accordion_id="subject-accordion" %} - {% endfor %} -
+ + {% if subjects|length > 0 %} +
+ {% for subject in subjects %} + {% include "subjects/subject_card.html" with accordion_id="subject-accordion" %} + {% endfor %} + + {% pagination request paginator page_obj %} +
+ {% else %} +
+ +

{% trans 'You still do not posses any subject in our platform' %}

+
+ {% endif %}
- {% pagination request paginator page_obj %} {% endblock content %} \ No newline at end of file diff --git a/subjects/templates/subjects/list.html b/subjects/templates/subjects/list.html index 4f9e365..b012fe7 100644 --- a/subjects/templates/subjects/list.html +++ b/subjects/templates/subjects/list.html @@ -45,128 +45,135 @@
-
- {% for category in categories %} - {% if category.visible %} -
-
-
-
-

- - {{ category.name }} ({{ category.subject_category.count }}) - -

- -
- {% if request.user.is_staff or user in category.coordinators.all %} -

+ {{ category.name }} ({{ category.subject_category.count }}) - - {% endif %} - - - - +

+ +
+ {% if request.user.is_staff or user in category.coordinators.all %} + + + {% endif %} + + + + +
-
-
- - - {% if category.coordinators.all|length > 0 %} -

{% trans "Coordinator(s) " %}: - {{ category.coordinators.all|join:', ' }} -

- {% else %} -

{% trans "It doesn't possess coordinators" %}

- {% endif %} - - {{category.description|safe}} - - {% if request.user in category.coordinators.all or request.user.is_staff %} - - {% endif %} +
+ + + {% if category.coordinators.all|length > 0 %} +

{% trans "Coordinator(s) " %}: + {{ category.coordinators.all|join:', ' }} +

+ {% else %} +

{% trans "It doesn't possess coordinators" %}

+ {% endif %} + + {{category.description|safe}} -
- {% for subject in category.subject_category.all %} - {% if request.user in subject.students.all or request.user.is_staff or request.user in subject.professor.all or all or request.user in subject.category.coordinators.all %} - - {% include "subjects/subject_card.html" %} - {% endif %} - {% endfor %} + {% if request.user in category.coordinators.all or request.user.is_staff %} + + {% endif %} + +
+ {% for subject in category.subject_category.all %} + {% if request.user in subject.students.all or request.user.is_staff or request.user in subject.professor.all or all or request.user in subject.category.coordinators.all %} + + {% include "subjects/subject_card.html" %} + {% endif %} + {% endfor %} +
-
- {% elif request.user in category.coordinators.all or request.user.is_staff %} -
-
-
-
-

- - {{category.name}} ({{ category.subject_category.count }}) - -

- -
- {% if request.user.is_staff or user in category.coordinators.all %} -

+ {{category.name}} ({{ category.subject_category.count }}) - - {% endif %} - - - - +

+ +
+ {% if request.user.is_staff or user in category.coordinators.all %} + + + {% endif %} + + + + +
-
-
- - - {% if category.coordinators.all|length > 0 %} -

{% trans "Coordinator(s) " %}: - {{ category.coordinators.all|join:', ' }} -

- {% else %} -

{% trans "It doesn't possess coordinators" %}

- {% endif %} - - {{category.description|safe}} - - {% if request.user in category.coordinators.all or request.user.is_staff %} - - {% endif %} +
+ + + {% if category.coordinators.all|length > 0 %} +

{% trans "Coordinator(s) " %}: + {{ category.coordinators.all|join:', ' }} +

+ {% else %} +

{% trans "It doesn't possess coordinators" %}

+ {% endif %} + + {{category.description|safe}} + + {% if request.user in category.coordinators.all or request.user.is_staff %} + + {% endif %} -
- {% for subject in category.subject_category.all %} - {% include "subjects/subject_card.html" %} - {% endfor %} +
+ {% for subject in category.subject_category.all %} + {% include "subjects/subject_card.html" %} + {% endfor %} +
-
- {% endif %} - {% endfor %} - {% pagination request paginator page_obj %} -
+ {% endif %} + {% endfor %} + {% pagination request paginator page_obj %} +
+ {% else %} +
+ +

{% trans 'You still do not posses any subject in our platform' %}

+
+ {% endif %}
-- libgit2 0.21.2