mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-08-26 12:46:08 +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>
|
Log in</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</li>
|
</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>
|
</ul>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@ -176,6 +183,12 @@
|
|||||||
<script type="text/javascript" src="{% static '/javascript/jquery/jquery.min.js' %}"></script>
|
<script type="text/javascript" src="{% static '/javascript/jquery/jquery.min.js' %}"></script>
|
||||||
<!-- Local link to system Bootstrap JS -->
|
<!-- Local link to system Bootstrap JS -->
|
||||||
<script type="text/javascript" src="{% static '/javascript/bootstrap/js/bootstrap.min.js' %}"></script>
|
<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 app_js %}<!-- placeholder for app-specific js files -->{% endblock %}
|
||||||
{% block page_js %}<!-- placeholder for page-specific js files -->{% endblock %}
|
{% block page_js %}<!-- placeholder for page-specific js files -->{% endblock %}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user