Binary file src/cm/locale/bg/LC_MESSAGES/django.mo has changed
--- a/src/cm/locale/bg/LC_MESSAGES/django.po Thu Feb 13 18:54:19 2014 +0100
+++ b/src/cm/locale/bg/LC_MESSAGES/django.po Thu Feb 13 18:55:46 2014 +0100
@@ -2209,3 +2209,8 @@
#, fuzzy
msgid "To disable this category for this text whatever the configuration for the workspace, enter: "
msgstr "За да деактивирате тази категория за този текст, независимо от конфигурацията на работната област, въведете: "
+
+#: /header.html:8
+#, fuzzy
+msgid "Privacy policy"
+msgstr "политика за поверителност"
--- a/src/cm/locale/en/LC_MESSAGES/django.po Thu Feb 13 18:54:19 2014 +0100
+++ b/src/cm/locale/en/LC_MESSAGES/django.po Thu Feb 13 18:55:46 2014 +0100
@@ -2078,3 +2078,8 @@
#: models.py:266 models.py:267 models.py:268 models.py:269 models.py:270
msgid "To disable this category for this text whatever the configuration for the workspace, enter: "
msgstr ""
+
+#: /header.html:8
+#, fuzzy
+msgid "Privacy policy"
+msgstr ""
Binary file src/cm/locale/es/LC_MESSAGES/django.mo has changed
--- a/src/cm/locale/es/LC_MESSAGES/django.po Thu Feb 13 18:54:19 2014 +0100
+++ b/src/cm/locale/es/LC_MESSAGES/django.po Thu Feb 13 18:55:46 2014 +0100
@@ -2374,3 +2374,8 @@
#, fuzzy
msgid "To disable this category for this text whatever the configuration for the workspace, enter: "
msgstr "Para desactivar esta categoría para este texto sea cual sea la configuración del espacio de trabajo, escriba: "
+
+#: /header.html:8
+#, fuzzy
+msgid "Privacy policy"
+msgstr "Política de confidencialidad"
Binary file src/cm/locale/fr/LC_MESSAGES/django.mo has changed
--- a/src/cm/locale/fr/LC_MESSAGES/django.po Thu Feb 13 18:54:19 2014 +0100
+++ b/src/cm/locale/fr/LC_MESSAGES/django.po Thu Feb 13 18:55:46 2014 +0100
@@ -2299,3 +2299,8 @@
#: models.py:266 models.py:267 models.py:268 models.py:269 models.py:270
msgid "To disable this category for this text whatever the configuration for the workspace, enter: "
msgstr "Pour désactiver cette catégorie pour ce texte quelle que soit la configuration de l'espace de travail, entrez : "
+
+#: /header.html:8
+#, fuzzy
+msgid "Privacy policy"
+msgstr "Vie privée"
Binary file src/cm/locale/it/LC_MESSAGES/django.mo has changed
--- a/src/cm/locale/it/LC_MESSAGES/django.po Thu Feb 13 18:54:19 2014 +0100
+++ b/src/cm/locale/it/LC_MESSAGES/django.po Thu Feb 13 18:55:46 2014 +0100
@@ -2327,3 +2327,8 @@
#, fuzzy
msgid "To disable this category for this text whatever the configuration for the workspace, enter: "
msgstr "Per disabilitare questa categoria per questo testo qualunque sia la configurazione per l'area di lavoro, digitare: "
+
+#: /header.html:8
+#, fuzzy
+msgid "Privacy policy"
+msgstr "Politica della privacy"
Binary file src/cm/locale/no/LC_MESSAGES/django.mo has changed
--- a/src/cm/locale/no/LC_MESSAGES/django.po Thu Feb 13 18:54:19 2014 +0100
+++ b/src/cm/locale/no/LC_MESSAGES/django.po Thu Feb 13 18:55:46 2014 +0100
@@ -2188,3 +2188,8 @@
#, fuzzy
msgid "To disable this category for this text whatever the configuration for the workspace, enter: "
msgstr "For å deaktivere denne kategorien for denne teksten uansett konfigurasjon for arbeidsområdet, skriver du: "
+
+#: /header.html:8
+#, fuzzy
+msgid "Privacy policy"
+msgstr "Personvern"
Binary file src/cm/locale/pt_BR/LC_MESSAGES/django.mo has changed
--- a/src/cm/locale/pt_BR/LC_MESSAGES/django.po Thu Feb 13 18:54:19 2014 +0100
+++ b/src/cm/locale/pt_BR/LC_MESSAGES/django.po Thu Feb 13 18:55:46 2014 +0100
@@ -2213,3 +2213,8 @@
#, fuzzy
msgid "To disable this category for this text whatever the configuration for the workspace, enter: "
msgstr "Para desativar esta categoria para este texto seja qual for a configuração do espaço de trabalho, digite: "
+
+#: /header.html:8
+#, fuzzy
+msgid "Privacy policy"
+msgstr "Política de privacidade"
--- a/src/cm/media/css/base.css Thu Feb 13 18:54:19 2014 +0100
+++ b/src/cm/media/css/base.css Thu Feb 13 18:55:46 2014 +0100
@@ -863,4 +863,20 @@
font: 16px "Droid Sans", Verdana, sans-serif;
}
+#hide-piwik-cookies-optout {
+ cursor: help;
+}
+#piwik-cookies-optout {
+ position: fixed;
+ left: 25%;
+ top: 3%;
+ width: 900px;
+ background-color: #ddd;
+ opacity:0.4;
+ filter:alpha(opacity=40); /* For IE8 and earlier */
+}
+
+#piwik-cookies-optout iframe {
+ display: none;
+}
--- a/src/cm/templates/site/layout/header.html Thu Feb 13 18:54:19 2014 +0100
+++ b/src/cm/templates/site/layout/header.html Thu Feb 13 18:55:46 2014 +0100
@@ -4,6 +4,9 @@
<div id="header_controls">
+{% if not DISABLE_TRACKING %}
+ <a id="hide-piwik-cookies-optout">{% blocktrans %}Privacy policy{% endblocktrans %} ▼ </a> ·
+{% endif %}
{% if user.is_authenticated %}<b>{{ user.username }}</b> ·{% endif %}
<a title="{% blocktrans %}Home{% endblocktrans %}" href="{% url index %}">{% blocktrans %}Home{% endblocktrans %}</a>
{% if can_create_text %}
--- a/src/cm/templates/site/tracking.html Thu Feb 13 18:54:19 2014 +0100
+++ b/src/cm/templates/site/tracking.html Thu Feb 13 18:55:46 2014 +0100
@@ -6,14 +6,38 @@
<!-- Piwik -->
<script type="text/javascript">
-var pkBaseURL = (("https:" == document.location.protocol) ? "https://stats.co-ment.com/" : "http://piwik.sopinspace.net/");
-document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
-</script><script type="text/javascript">
-try {
-var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 17);
-piwikTracker.trackPageView();
-piwikTracker.enableLinkTracking();
-} catch( err ) {}
-</script><noscript><p><img src="https://stats.co-ment.com/piwik.php?idsite=17" style="border:0" alt=""/></p></noscript>
-<!-- End Piwik Tag -->
+<!--
+ var _paq = _paq || [];
+ _paq.push(["trackPageView"]);
+ _paq.push(["enableLinkTracking"]);
+
+ _paq.push([function() {
+ function getOriginalVisitorCookieTimeout(obj) {
+ var now = new Date(),
+ nowTs = Math.round(now.getTime() / 1000),
+ visitorInfo = obj.getVisitorInfo();
+ var createTs = parseInt(visitorInfo[2]);
+ var cookieTimeout = 33696000; // 13 mois en secondes
+ var originalTimeout = createTs + cookieTimeout - nowTs;
+ return originalTimeout;
+ }
+ this.setVisitorCookieTimeout(getOriginalVisitorCookieTimeout(this));
+ }]);
+
+ (function() {
+ var u=(("https:" == document.location.protocol) ? "https" : "http") + "://stats.co-ment.com/";
+ _paq.push(["setTrackerUrl", u+"piwik.php"]);
+ _paq.push(["setSiteId", "17"]);
+ var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";
+ g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
+ })();
+<!-- End Piwik Code -->
+$(document).ready(function() {
+ $('#hide-piwik-cookies-optout').click(function() {
+ $('#piwik-cookies-optout iframe').slideToggle("fast");
+ });
+});
+-->
+</script>
+<div id="piwik-cookies-optout"><iframe frameborder="no" width="900px" height="90px" src="https://stats.co-ment.com/index.php?module=CustomOptOut&action=optOut&idSite=17&language={{ LANGUAGE_CODE }}"></iframe></div>
{% endif %}
--- a/src/cm/views/site.py Thu Feb 13 18:54:19 2014 +0100
+++ b/src/cm/views/site.py Thu Feb 13 18:55:46 2014 +0100
@@ -21,6 +21,7 @@
from django.views.generic.list_detail import object_list
from django.contrib.auth.models import User
from cm.models import Text, TextVersion, Attachment, Comment, Configuration, Activity
+from django.core.cache import cache
ACTIVITY_PAGINATION = 10
RECENT_TEXT_NB = 5
@@ -79,6 +80,7 @@
user = form.get_user()
user.backend = 'django.contrib.auth.backends.ModelBackend'
cm_login(request, user)
+ cache.clear()
display_message(request, _(u"You're logged in!"))
return HttpResponseRedirect(reverse('index'))
else: