commit
ce382e0673
|
@ -1,6 +1,6 @@
|
|||
def is_preview(request):
|
||||
from django.conf import settings
|
||||
return {'jquery_home': settings.JQUERY_HOME, 'jquery_ui_home': settings.JQUERY_UI_HOME, 'is_preview': settings.IS_PREVIEW}
|
||||
return {'jquery_home': settings.JQUERY_HOME, 'jquery_ui_home': settings.JQUERY_UI_HOME, 'is_preview': settings.IS_PREVIEW, 'show_google_analytics': settings.SHOW_GOOGLE_ANALYTICS}
|
||||
|
||||
def count_unseen(request):
|
||||
from notification.models import Notice, NoticeManager
|
||||
|
|
|
@ -101,7 +101,11 @@
|
|||
|
||||
{% block news %}
|
||||
<div class="launch_top">
|
||||
{% if is_preview %}
|
||||
It's here: our first unglued edition. You can now download <a href="/work/81834/"><I>Oral Literature in Africa</I></a>.<br /><br />Campaigns to unglue more books <a href="http://blog.unglue.it/2012/09/13/update-on-unglue-it-relaunch/">will relaunch soon</a>.
|
||||
{% else %}
|
||||
We unglued <a href="/work/81834/">one book</a>. Amazon <a href="http://blog.unglue.it/2012/08/09/open-thread-amazon-forces-unglue-it-to-suspend-crowdfunding-for-creative-commons-ebooks/">shut us down</a>. Now we're back. Help us unglue <a href="https://unglue.it/campaigns/ending">five more books</a>! <br />
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
@ -157,7 +161,8 @@
|
|||
</div>
|
||||
{% endblock %}
|
||||
{% block counter %}
|
||||
<script type="text/javascript">
|
||||
{% if show_google_analytics %}
|
||||
<script type="text/javascript">
|
||||
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-28369982-1']);
|
||||
|
@ -169,7 +174,8 @@
|
|||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
|
||||
</script>
|
||||
</script>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -427,7 +427,6 @@ def manage_campaign(request, id):
|
|||
'premium_form' : new_premium_form,
|
||||
'work': work,
|
||||
'activetab': activetab,
|
||||
'is_preview': settings.IS_PREVIEW
|
||||
})
|
||||
|
||||
def googlebooks(request, googlebooks_id):
|
||||
|
|
|
@ -293,3 +293,6 @@ class NONPROFIT:
|
|||
is_on = False
|
||||
name = 'Library Renewal'
|
||||
link = 'http://127.0.0.1:8000/donate_to_campaign/'
|
||||
|
||||
# we should suppress Google Analytics outside of production
|
||||
SHOW_GOOGLE_ANALYTICS = False
|
||||
|
|
|
@ -151,3 +151,6 @@ try:
|
|||
from regluit.settings.local import *
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
# we should suppress Google Analytics outside of production
|
||||
SHOW_GOOGLE_ANALYTICS = True
|
||||
|
|
Loading…
Reference in New Issue