From 798b43cabbd5d28ef69248a93b1b17b32373c34d Mon Sep 17 00:00:00 2001 From: Alexandre Barbosa Date: Tue, 15 Dec 2015 15:15:50 -0200 Subject: [PATCH] Adding links between portals --- src/colab-spb-plugin/src/colab_spb/context_processors.py | 5 +++-- src/colab-spb-theme-plugin/colab_spb_theme/templates/header.html | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/colab-spb-plugin/src/colab_spb/context_processors.py b/src/colab-spb-plugin/src/colab_spb/context_processors.py index 3072c1e..27c1b64 100644 --- a/src/colab-spb-plugin/src/colab_spb/context_processors.py +++ b/src/colab-spb-plugin/src/colab_spb/context_processors.py @@ -1,5 +1,6 @@ from django.conf import settings -def sisp_url(request): - return {'SISP_URL': getattr(settings, 'SISP_URL', False)} +def multiportal_url(request): + return {'SISP_HOST': getattr(settings, 'SISP_HOST', False), + 'SPB_HOST': getattr(settings, 'SPB_HOST', False),} diff --git a/src/colab-spb-theme-plugin/colab_spb_theme/templates/header.html b/src/colab-spb-theme-plugin/colab_spb_theme/templates/header.html index c93e6bf..1e7705b 100644 --- a/src/colab-spb-theme-plugin/colab_spb_theme/templates/header.html +++ b/src/colab-spb-theme-plugin/colab_spb_theme/templates/header.html @@ -1,5 +1,5 @@ -{% if SISP_URL in request.META.HTTP_HOST|stringformat:"s" %} - {% include 'header_sisp.html' %} +{% if SISP_HOST in request.META.HTTP_HOST|stringformat:"s" %} + {% include 'header_sisp.html' with SPB_PORTAL='http://'|add:SPB_HOST %} {% else %} - {% include 'header_spb.html' %} + {% include 'header_spb.html' with SISP_PORTAL='http://'|add:SISP_HOST %} {% endif %} -- libgit2 0.21.2