From 2ff29cc375d7f6d052520d38cb7634ca25b17600 Mon Sep 17 00:00:00 2001 From: Saeed Marzban Date: Tue, 13 Feb 2018 13:47:45 +0200 Subject: [PATCH 1/2] get the number of users in a static segment from static_users variable --- .../wagtail_personalisation/segment/dashboard.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wagtail_personalisation/templates/modeladmin/wagtail_personalisation/segment/dashboard.html b/src/wagtail_personalisation/templates/modeladmin/wagtail_personalisation/segment/dashboard.html index d6858dd..1fe3756 100644 --- a/src/wagtail_personalisation/templates/modeladmin/wagtail_personalisation/segment/dashboard.html +++ b/src/wagtail_personalisation/templates/modeladmin/wagtail_personalisation/segment/dashboard.html @@ -38,11 +38,11 @@
  • {% trans "This segment is Static" %} - {{ segment.sessions.count|localize }} - {% if segment.sessions.count < segment.count %} + {{ segment.static_users.count }} + {% if segment.static_users.count < segment.count %} / {{ segment.count }} {% trans "member" %}{{ segment.count|pluralize }} {% else %} - {% trans "member" %}{{ segment.sessions.count|pluralize }} + {% trans "member" %}{{ segment.count|pluralize }} {% endif %}
  • From 59f4877e0476aef001679a536a068dc89e694ed1 Mon Sep 17 00:00:00 2001 From: Saeed Marzban Date: Tue, 13 Feb 2018 13:57:00 +0200 Subject: [PATCH 2/2] add localize filter --- .../modeladmin/wagtail_personalisation/segment/dashboard.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wagtail_personalisation/templates/modeladmin/wagtail_personalisation/segment/dashboard.html b/src/wagtail_personalisation/templates/modeladmin/wagtail_personalisation/segment/dashboard.html index 1fe3756..b0fcf2e 100644 --- a/src/wagtail_personalisation/templates/modeladmin/wagtail_personalisation/segment/dashboard.html +++ b/src/wagtail_personalisation/templates/modeladmin/wagtail_personalisation/segment/dashboard.html @@ -38,7 +38,7 @@
  • {% trans "This segment is Static" %} - {{ segment.static_users.count }} + {{ segment.static_users.count|localize }} {% if segment.static_users.count < segment.count %} / {{ segment.count }} {% trans "member" %}{{ segment.count|pluralize }} {% else %}