Commit 798b43cabbd5d28ef69248a93b1b17b32373c34d

Authored by Alexandre Barbosa
1 parent 289d7134

Adding links between portals

Signed-off-by: Alexandre Barbosa <alexandreab@live.com>
Signed-off-by: Lucas Moura <lucas.moura128@gmail.com>
Signed-off-by: Matheus Fernandes <matheus.souza.fernandes@gmail.com>
src/colab-spb-plugin/src/colab_spb/context_processors.py
1 1 from django.conf import settings
2 2  
3 3  
4   -def sisp_url(request):
5   - return {'SISP_URL': getattr(settings, 'SISP_URL', False)}
  4 +def multiportal_url(request):
  5 + return {'SISP_HOST': getattr(settings, 'SISP_HOST', False),
  6 + 'SPB_HOST': getattr(settings, 'SPB_HOST', False),}
... ...
src/colab-spb-theme-plugin/colab_spb_theme/templates/header.html
1   -{% if SISP_URL in request.META.HTTP_HOST|stringformat:"s" %}
2   - {% include 'header_sisp.html' %}
  1 +{% if SISP_HOST in request.META.HTTP_HOST|stringformat:"s" %}
  2 + {% include 'header_sisp.html' with SPB_PORTAL='http://'|add:SPB_HOST %}
3 3 {% else %}
4   - {% include 'header_spb.html' %}
  4 + {% include 'header_spb.html' with SISP_PORTAL='http://'|add:SISP_HOST %}
5 5 {% endif %}
... ...