mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-02-04 08:13:38 +00:00
Add logout button that is only shown when javascript is disabled.
This commit is contained in:
parent
07ee03941f
commit
62c4eb8f1e
@ -122,6 +122,13 @@
|
||||
Log in</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% if user.is_authenticated %}
|
||||
<li id="logout_nojs">
|
||||
<a href="{% url 'users:logout' %}" title="Log out">
|
||||
<i class="glyphicon glyphicon-remove-circle nav-icon"></i>
|
||||
Log out</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
||||
{% endblock %}
|
||||
@ -176,6 +183,12 @@
|
||||
<script type="text/javascript" src="{% static '/javascript/jquery/jquery.min.js' %}"></script>
|
||||
<!-- Local link to system Bootstrap JS -->
|
||||
<script type="text/javascript" src="{% static '/javascript/bootstrap/js/bootstrap.min.js' %}"></script>
|
||||
<!-- Hide log out button if user dropdown is available -->
|
||||
<script type="text/javascript">
|
||||
(function($) {
|
||||
$("#logout_nojs").hide();
|
||||
})(jQuery);
|
||||
</script>
|
||||
|
||||
{% block app_js %}<!-- placeholder for app-specific js files -->{% endblock %}
|
||||
{% block page_js %}<!-- placeholder for page-specific js files -->{% endblock %}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user