From b229219f09a715299875efd200e1ec1a539ed65d Mon Sep 17 00:00:00 2001 From: Jailson Dias Date: Fri, 11 Nov 2016 00:55:10 -0300 Subject: [PATCH] #278 reorganização do menu --- app/templates/home.html | 33 +++++++++++++++++---------------- core/templates/base.html | 10 +++++++++- courses/templates/category/create.html | 32 -------------------------------- courses/templates/category/index.html | 32 +------------------------------- courses/templates/category/update.html | 31 +------------------------------ courses/templates/course/course_card.html | 2 +- courses/templates/course/home.html | 23 ----------------------- courses/templates/course/index.html | 3 --- courses/templates/course/view.html | 19 +------------------ courses/templates/subject/index.html | 5 ----- courses/templates/subject_category/index.html | 4 ---- courses/templates/topic/index.html | 4 ---- forum/templates/forum/forum_view.html | 38 ++++++++++++-------------------------- users/templates/list_users.html | 23 +++++------------------ users/templates/users/index.html | 16 +++------------- users/templates/users/profile.html | 23 ++++++----------------- users/templates/users/view.html | 22 +--------------------- 17 files changed, 57 insertions(+), 263 deletions(-) delete mode 100644 courses/templates/course/home.html diff --git a/app/templates/home.html b/app/templates/home.html index 5c3919e..8f0983f 100644 --- a/app/templates/home.html +++ b/app/templates/home.html @@ -78,26 +78,27 @@
diff --git a/core/templates/base.html b/core/templates/base.html index ae7e4b7..cfc44a9 100644 --- a/core/templates/base.html +++ b/core/templates/base.html @@ -109,7 +109,15 @@
  • -
  • {{ user }}
  • +
  • + {{ user }} + +
  • diff --git a/courses/templates/category/create.html b/courses/templates/category/create.html index 55dc56a..6b45205 100644 --- a/courses/templates/category/create.html +++ b/courses/templates/category/create.html @@ -10,38 +10,6 @@ {% endblock %} -{% block sidebar %} -{{block.super}} - -{% if user|has_role:'professor' or user|has_role:'system_admin' %} - - - - - -{% endif %} - -{% endblock %} - {% block content %}
    diff --git a/courses/templates/category/index.html b/courses/templates/category/index.html index a92ab7b..89ee024 100644 --- a/courses/templates/category/index.html +++ b/courses/templates/category/index.html @@ -11,36 +11,6 @@ {% endblock %} -{% block sidebar %} -{{block.super}} - - {% if user|has_role:'professor' or user|has_role:'system_admin' %} - - - - -{% endif %} -{% endblock %} - {% block content %} {% if messages %} {% for message in messages %} @@ -104,4 +74,4 @@
    - \ No newline at end of file + diff --git a/courses/templates/course/home.html b/courses/templates/course/home.html deleted file mode 100644 index 42645eb..0000000 --- a/courses/templates/course/home.html +++ /dev/null @@ -1,23 +0,0 @@ -{% extends 'app/base.html' %} - -{% load static i18n %} -{% load widget_tweaks %} - -{% block breadcrumbs %} - -{% endblock %} - -{% block sidebar %} -
    - - {% trans 'Courses' %} - -
    -{% endblock %} - -{% block content %} - -{% endblock %} diff --git a/courses/templates/course/index.html b/courses/templates/course/index.html index 2b25c05..5b30bb9 100644 --- a/courses/templates/course/index.html +++ b/courses/templates/course/index.html @@ -63,9 +63,6 @@ {% endfor %} - {% if user|has_role:'professor' or user|has_role:'system_admin' %} - - {% endif %}
    {% endif %} diff --git a/courses/templates/subject/index.html b/courses/templates/subject/index.html index 222d560..3adfef3 100644 --- a/courses/templates/subject/index.html +++ b/courses/templates/subject/index.html @@ -21,11 +21,6 @@
  • {{ subject }}
  • {% endblock %} -{% block sidebar %} -{{block.super}} - - -{% endblock %} {% block content %}
    diff --git a/courses/templates/subject_category/index.html b/courses/templates/subject_category/index.html index a5b6606..f1f00c2 100644 --- a/courses/templates/subject_category/index.html +++ b/courses/templates/subject_category/index.html @@ -11,10 +11,6 @@ {% endblock %} -{% block sidebar %} -{{block.super}} -{% endblock %} - {% block content %}
    diff --git a/courses/templates/topic/index.html b/courses/templates/topic/index.html index ba545d7..ad9970f 100644 --- a/courses/templates/topic/index.html +++ b/courses/templates/topic/index.html @@ -26,10 +26,6 @@ {% endblock %} -{% block sidebar %} -{{block.super}} -{% endblock %} - {% block content %}
    diff --git a/forum/templates/forum/forum_view.html b/forum/templates/forum/forum_view.html index 8351b2b..f56bfae 100644 --- a/forum/templates/forum/forum_view.html +++ b/forum/templates/forum/forum_view.html @@ -1,4 +1,4 @@ -{% extends 'base.html' %} +{% extends 'home.html' %} {% load static i18n permission_tags list_post %} {% load widget_tweaks %} @@ -21,32 +21,19 @@ {% endblock %} -{% block sidebar %} - - {% if request.user|has_role:'system_admin' or request.user|has_role:'professor' and request.user in forum.topic.subject.professors.all %} -
    {% endblock %} - diff --git a/users/templates/list_users.html b/users/templates/list_users.html index 285627d..b069ce4 100644 --- a/users/templates/list_users.html +++ b/users/templates/list_users.html @@ -9,23 +9,11 @@ {% endblock %} -{% if user|has_role:'system_admin' %} - {% block sidebar %} - - {% endblock %} -{% endif %} - +{% block menu %} + {% if user|has_role:'system_admin' %} +
  • {% trans 'Add User' %}
  • + {% endif %} +{% endblock %} {% block content %} {% if messages %} @@ -108,4 +96,3 @@
    {% endif %} {% endblock %} - diff --git a/users/templates/users/index.html b/users/templates/users/index.html index b24b7fa..7a94e73 100644 --- a/users/templates/users/index.html +++ b/users/templates/users/index.html @@ -1,4 +1,4 @@ -{% extends 'app/base.html' %} +{% extends 'home.html' %} {% load static i18n %} @@ -9,18 +9,8 @@ {% endblock %} -{% block sidebar %} - +{% block menu %} +
  • {% trans 'Add User' %}
  • {% endblock %} {% block content %} diff --git a/users/templates/users/profile.html b/users/templates/users/profile.html index 715ff98..2ff9b5f 100644 --- a/users/templates/users/profile.html +++ b/users/templates/users/profile.html @@ -1,8 +1,8 @@ -{% extends 'home_student.html' %} +{% extends 'home.html' %} {% load static i18n %} {% load widget_tweaks %} -{% load django_bootstrap_breadcrumbs %} +{% load django_bootstrap_breadcrumbs permission_tags%} {% block breadcrumbs %} @@ -11,21 +11,10 @@ {% endblock %} -{% block sidebar %} - +{% block menu %} + {% if user|has_role:'system_admin' %} +
  • {% trans 'Add User' %}
  • + {% endif %} {% endblock %} {% block content %} diff --git a/users/templates/users/view.html b/users/templates/users/view.html index b3a0fa0..6c9b6f7 100644 --- a/users/templates/users/view.html +++ b/users/templates/users/view.html @@ -1,4 +1,4 @@ -{% extends 'app/base.html' %} +{% extends 'users/profile.html' %} {% load static i18n %} @@ -9,26 +9,6 @@ {% endblock %} -{% block sidebar %} - -{% endblock %} - {% block content %}
    -- libgit2 0.21.2