From e04e04128c5058c65e7e3e7b25a90583db55e324 Mon Sep 17 00:00:00 2001 From: Serghei MIHAI Date: Wed, 22 Oct 2014 00:53:19 +0200 Subject: [PATCH 3/3] template files can be uploaded with file manager Closes #5570 --- usr/local/univnautes/sp/sp/settings.py | 1 + usr/local/univnautes/sp/sp/templates/base.html | 10 ++-------- usr/local/univnautes/sp/sp/templates/header.html | 7 +++++++ usr/local/univnautes/sp/sp/templates/idp_list.html | 20 ++++++++++++++++++++ .../sp/sp/templates/registration/login.html | 21 +-------------------- 5 files changed, 31 insertions(+), 28 deletions(-) create mode 100644 usr/local/univnautes/sp/sp/templates/header.html create mode 100644 usr/local/univnautes/sp/sp/templates/idp_list.html diff --git a/usr/local/univnautes/sp/sp/settings.py b/usr/local/univnautes/sp/sp/settings.py index 185c964..862d337 100644 --- a/usr/local/univnautes/sp/sp/settings.py +++ b/usr/local/univnautes/sp/sp/settings.py @@ -114,6 +114,7 @@ ROOT_URLCONF = 'sp.urls' WSGI_APPLICATION = 'sp.wsgi.application' TEMPLATE_DIRS = ( + '/var/db/cpelements/', os.path.join(PROJECT_PATH, 'sp', 'templates'), ) diff --git a/usr/local/univnautes/sp/sp/templates/base.html b/usr/local/univnautes/sp/sp/templates/base.html index d3d85cb..dd1c40d 100644 --- a/usr/local/univnautes/sp/sp/templates/base.html +++ b/usr/local/univnautes/sp/sp/templates/base.html @@ -12,13 +12,7 @@ {% block wrapper %}
{% endblock %} - {% if not popup %} - - {% endif %} + {% include "header.html" %}
{% if messages %}
@@ -38,5 +32,5 @@ {% block page-end %}{% endblock %} - + diff --git a/usr/local/univnautes/sp/sp/templates/header.html b/usr/local/univnautes/sp/sp/templates/header.html new file mode 100644 index 0000000..1e2ec72 --- /dev/null +++ b/usr/local/univnautes/sp/sp/templates/header.html @@ -0,0 +1,7 @@ +{% if not popup %} + +{% endif %} diff --git a/usr/local/univnautes/sp/sp/templates/idp_list.html b/usr/local/univnautes/sp/sp/templates/idp_list.html new file mode 100644 index 0000000..19b3d0c --- /dev/null +++ b/usr/local/univnautes/sp/sp/templates/idp_list.html @@ -0,0 +1,20 @@ +
+
+ {% if defaultidps %} +
    + {% for defaultidp in defaultidps %}{% for idp in idps %}{% if idp.entity_id == defaultidp %}
  • {{ idp.name }}
  • + {% endif %}{% endfor %}{% endfor %} +
+ {% endif %} +
    +
  • +
+
+ +
+ +
+
diff --git a/usr/local/univnautes/sp/sp/templates/registration/login.html b/usr/local/univnautes/sp/sp/templates/registration/login.html index e7e687e..0b76cb3 100644 --- a/usr/local/univnautes/sp/sp/templates/registration/login.html +++ b/usr/local/univnautes/sp/sp/templates/registration/login.html @@ -9,26 +9,7 @@ {% block content %}
map
- -
-
- {% if defaultidps %} -
    - {% for defaultidp in defaultidps %}{% for idp in idps %}{% if idp.entity_id == defaultidp %}
  • {{ idp.name }}
  • - {% endif %}{% endfor %}{% endfor %} -
- {% endif %} -
    -
  • -
-
-
- -
-
+{% include "idp_list.html" %} {% endblock %} {% block page-end %} -- 2.1.1