{% extends "modeladmin/wagtail_personalisation/segment/base.html" %} {% load i18n l10n staticfiles modeladmin_tags wagtail_personalisation_filters %} {% block toggle_view %}to List {% endblock%} {% block content_main %}
{% block content_cols %} {% block filters %} {% if view.has_filters and all_count %}

{% trans 'Filter' %}

{% for spec in view.filter_specs %}{% admin_list_filter view spec %}{% endfor %}
{% endif %} {% endblock %}
{% block result_list %}
{% if all_count %} {% for segment in object_list %}

{{ segment }}

  • {% trans "This segment has been visited" %} {{ segment.visit_count|localize }} {% trans "time" %}{{ segment.visit_count|pluralize }}
  • {% trans "This segment has been active for" %} {{ segment.enable_date|days_since:segment.disable_date }} {% trans "day" %}{{ segment.enable_date|days_since:segment.disable_date|pluralize }}
  • {% if segment.is_static %}
  • {% trans "This segment is Static" %} {{ segment.static_users.count|localize }} {% if segment.static_users.count < segment.count %} / {{ segment.count }} {% trans "member" %}{{ segment.count|pluralize }} {% else %} {% trans "member" %}{{ segment.count|pluralize }} {% endif %}
  • {% endif %}

  • {% trans "The visitor must match" %} {% if segment.match_any %} {% trans "Any rule" %} {% else %} {% trans "All rules" %} {% endif %}
  • {% trans "The persistence of this segment is" %} {% if segment.persistent %} {% trans "Persistent" %} {% else %} {% trans "Fleeting" %} {% endif %}
  • {% if segment.randomisation_percent is not None %}
  • {{ segment.randomisation_percent }} % {% trans "Chance that visitors matching the rules are added to the segment" %}
  • {% endif %} {% for rule in segment.get_rules %}
  • {{ rule.description.title }} {% if rule.description.code %}
    {{ rule.description.value }}
    {% else %} {{ rule.description.value }} {% endif %}
  • {% endfor %} {% if segment.matched_users_count > 0 %}
  • {{ segment.matched_users_count }} {% trans "user" %}{{ segment.matched_users_count|pluralize }} {% trans "were possible matches for this segment at creation" %}
  • {% endif %}
{% if user_can_create %} {% endif %}
{% endfor %} {% endif %} {% if user_can_create %} {% blocktrans with url=view.create_url name=view.verbose_name %} Add a new {{name}} {% endblocktrans %} {% endif %}
{% endblock %}
{% block pagination %} {% if paginator.num_pages > 1 %} {% endif %} {% endblock %} {% endblock %}
{% endblock %}