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:
authorThomas Steur <thomas.steur@gmail.com>2015-11-18 05:25:52 +0300
committerThomas Steur <thomas.steur@gmail.com>2015-11-19 07:14:31 +0300
commit0bbf8eb60be3e205d7c230e430ebd7765ef38526 (patch)
tree8d40b56b04d52dc8f31e4803f51f80aff009753b /plugins
parent3154cba01693ef0d583567bc89659ea9868656fa (diff)
show union segments in a title if given
Diffstat (limited to 'plugins')
-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>