Browse Source

ajusta menu Acessar em sapl as sapn

pull/3357/head
Leandro Roberto 5 years ago
parent
commit
e2b8868e1a
  1. 1
      sapl/settings.py
  2. 16
      sapl/templates/base.html
  3. 4
      sapl/urls.py

1
sapl/settings.py

@ -27,7 +27,6 @@ host = socket.gethostbyname_ex(socket.gethostname())[0]
BASE_DIR = Path(__file__).ancestor(1)
PROJECT_DIR = Path(__file__).ancestor(2)
SAPL_AS_SAPN = config('SAPL_AS_SAPN', default=False, cast=bool)
# SECURITY WARNING: keep the secret key used in production secret!

16
sapl/templates/base.html

@ -94,6 +94,15 @@
</div>
</header>
{% endif %}
{% else %}
<div class="container">
<div class="row justify-content-end px-3">
{% if sapl_as_sapn and not user.is_authenticated%}
<small><a href="{% url 'sapl.base:login' %}">Acessar</a></small>
{% endif %}
</div>
</div>
{% endif %}
{% if not request|has_iframe %}
{# Header #}
@ -209,12 +218,7 @@
<br>
<a href="{{endereco_web}}" class="url">{% trans 'Site' %}</a> |
<a href="mailto:{{email}}" class="email">{% trans 'Fale Conosco' %}</a>
<br>
{% if sapl_as_sapn and not user.is_authenticated%}
<a href="{% url 'sapl.base:login' %}">Acessar</a>
{% elif sapl_as_sapn and user.is_authenticated%}
<a href="{% url 'sapl.base:logout' %}">Sair</a>
{% endif %}
</small>
</address>
{% else %}

4
sapl/urls.py

@ -38,10 +38,6 @@ import sapl.sessao.urls
urlpatterns = []
if not settings.SAPL_AS_SAPN:
urlpatterns = [
]
urlpatterns += [
url(r'^message$', TemplateView.as_view(template_name='base.html')),
url(r'^admin/', admin.site.urls),

Loading…
Cancel
Save