mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-15 22:13:13 +00:00
Handle guest access
This commit is contained in:

committed by
Romain Neutron

parent
d455af5767
commit
c04df2c481
9
templates/web/login/include/guest-access-block.html.twig
Normal file
9
templates/web/login/include/guest-access-block.html.twig
Normal file
@@ -0,0 +1,9 @@
|
||||
{% if guest_allowed %}
|
||||
<div class="well-large sidebar-block {% if last_item|default(false) %}last-child{% endif %}">
|
||||
<div class="row-fluid">
|
||||
<div class="span12 text-center">
|
||||
<a class="btn btn-info btn-trigger" href="{{ path("login_register", {"nolog" : "1"}) }}">{% trans "Guest access" %}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
@@ -2,6 +2,7 @@
|
||||
variable "feed" to get public feeds
|
||||
variable "recaptcha_display" should be setted Tell whether the recaptch should be displayed
|
||||
variable "recaptacha" should be setted The recaptcha object
|
||||
variable "guest_allowed" phrasea::guest_allowed($app)
|
||||
#}
|
||||
|
||||
{% extends "login/layout/sidebar-layout.html.twig" %}
|
||||
@@ -85,7 +86,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /sidebar block -->
|
||||
<div class="well-large sidebar-block {% if not login.register_enabled(app) %}last-child{% endif %}">
|
||||
<div class="well-large sidebar-block {% if not login.register_enabled(app) and not guest_allowed %}last-child{% endif %}">
|
||||
<div class="row-fluid">
|
||||
<div class="span12 text-center">
|
||||
{% trans "Or login with" %}
|
||||
@@ -98,7 +99,8 @@
|
||||
</div>
|
||||
</div><!-- /sidebar block -->
|
||||
|
||||
{% include "login/include/register-link-block.html.twig" with {"login" : login, "last_item" : login.register_enabled(app)} %}
|
||||
{% include "login/include/register-link-block.html.twig" with {"login" : login, "last_item" : login.register_enabled(app) and not guest_allowed} %}
|
||||
{% include "login/include/guest-access-block.html.twig" with {"guest_allowed" : guest_allowed, "last_item" : guest_allowed} %}
|
||||
{% endblock %}
|
||||
|
||||
{% block left_content %}
|
||||
|
Reference in New Issue
Block a user