Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/SegmentEditor')
-rw-r--r--plugins/SegmentEditor/lang/en.json3
-rw-r--r--plugins/SegmentEditor/templates/_segmentSelector.twig12
2 files changed, 13 insertions, 2 deletions
diff --git a/plugins/SegmentEditor/lang/en.json b/plugins/SegmentEditor/lang/en.json
index 46bdf5fef2..933ac73884 100644
--- a/plugins/SegmentEditor/lang/en.json
+++ b/plugins/SegmentEditor/lang/en.json
@@ -26,6 +26,7 @@
"YouMayChangeSetting": "Alternatively you may change the setting in the config file (%s), or edit this Segment and choose '%s'.",
"YouMustBeLoggedInToCreateSegments": "You must be logged in to create and edit custom visitor segments.",
"YouDontHaveAccessToCreateSegments": "You don't have the required access level to create and edit segments.",
- "AddingSegmentForAllWebsitesDisabled": "Adding segments for all websites has been disabled."
+ "AddingSegmentForAllWebsitesDisabled": "Adding segments for all websites has been disabled.",
+ "SegmentXIsAUnionOf": "%s is a union of these segments:"
}
} \ No newline at end of file
diff --git a/plugins/SegmentEditor/templates/_segmentSelector.twig b/plugins/SegmentEditor/templates/_segmentSelector.twig
index 7a8019d37e..1ffb4b3d47 100644
--- a/plugins/SegmentEditor/templates/_segmentSelector.twig
+++ b/plugins/SegmentEditor/templates/_segmentSelector.twig
@@ -99,7 +99,17 @@
<a class="metric_category" href="#">{{ category }}</a>
<ul style="display:none;">
{% for segmentInCategory in segmentsInCategory %}
- <li data-metric="{{ segmentInCategory.segment }}"><a class="ddmetric" href="#">{{ segmentInCategory.name }}</a></li>
+ {% set title = segmentInCategory.name %}
+ {% if segmentInCategory.unionOfSegments is defined and segmentInCategory.unionOfSegments %}
+ {% set title = 'SegmentEditor_SegmentXIsAUnionOf'|translate(title) %}
+ {% for unionSegment in segmentInCategory.unionOfSegments %}
+ {% set title = title ~ ' ' ~ unionSegment %}
+ {% if not loop.last %}
+ {% set title = title ~ ',' %}
+ {% endif %}
+ {% endfor %}
+ {% endif %}
+ <li data-metric="{{ segmentInCategory.segment }}" title="{{ title|e('html_attr') }}"><a class="ddmetric" href="#">{{ segmentInCategory.name }}</a></li>
{% endfor %}
</ul>
</li>