Fixes #34
This commit is contained in:
parent
4b5f603e81
commit
79a209fb99
|
@ -1,3 +1,4 @@
|
|||
from shelfzilla.apps.config.models import SiteConfiguration
|
||||
from .models import User
|
||||
|
||||
|
||||
|
@ -8,10 +9,17 @@ def user_is_staff(request):
|
|||
|
||||
|
||||
def user_configuration(request):
|
||||
# TODO improve this shit
|
||||
use_pjax = True
|
||||
config = SiteConfiguration.objects.get()
|
||||
if not config.use_pjax:
|
||||
use_pjax = False
|
||||
|
||||
return {
|
||||
'USER_CONFIG': {
|
||||
'show_admin_links': False
|
||||
}
|
||||
'show_admin_links': False,
|
||||
'use_pjax': use_pjax
|
||||
},
|
||||
}
|
||||
|
||||
def auth(request):
|
||||
|
|
|
@ -109,6 +109,9 @@
|
|||
<script type="text/coffeescript" src="{% static "coffee/main.coffee" %}"></script>
|
||||
{% endblock %}
|
||||
{% endcompress %}
|
||||
{% if not USER_CONFIG.use_pjax %}
|
||||
<script type="text/javascript">$(function() { window.updateMessages(); });</script>
|
||||
{% endif %}
|
||||
|
||||
{% if social_config.google_analytics %}
|
||||
{% include "_includes/google_analytics.html" %}
|
||||
|
|
Reference in New Issue