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/Live/templates/_actionCommon.twig')
-rw-r--r--plugins/Live/templates/_actionCommon.twig38
1 files changed, 38 insertions, 0 deletions
diff --git a/plugins/Live/templates/_actionCommon.twig b/plugins/Live/templates/_actionCommon.twig
new file mode 100644
index 0000000000..a978588527
--- /dev/null
+++ b/plugins/Live/templates/_actionCommon.twig
@@ -0,0 +1,38 @@
+<li class="{% if action.goalName is defined %}goal{% else %}action{% endif %}"
+ title="{{ postEvent('Live.renderActionTooltip', action, visitInfo) }}">
+ <div>
+ {# Page view / Download / Outlink #}
+ {% if action.pageTitle|default(false) is not empty %}
+ <span class="truncated-text-line">{{ action.pageTitle|rawSafeDecoded }}</span>
+ {% endif %}
+ {% if action.siteSearchKeyword is defined %}
+ {% if action.type == 'search' %}
+ <img src='{{ action.icon }}' title='{{ 'Actions_SubmenuSitesearch'|translate }}'
+ class="action-list-action-icon search">
+ {% endif %}
+ <span class="truncated-text-line">{{ action.siteSearchKeyword|rawSafeDecoded }}</span>
+ {% endif %}
+ {% if action.url is not empty %}
+ {% if action.type == 'action' and action.pageTitle|default(false) is not empty %}<p>{% endif %}
+ {% if action.type == 'download' or action.type == 'outlink' %}
+ <img src='{{ action.icon }}' class="action-list-action-icon {{ action.type }}">
+ {% endif %}
+
+ {% if action.url|trim|lower starts with 'javascript:' or
+ action.url|trim|lower starts with 'vbscript:' or
+ action.url|trim|lower starts with 'data:' %}
+ {{ action.url }}
+ {% else %}
+ <a href="{{ action.url }}" rel="noreferrer" target="_blank"
+ class="action-list-url truncated-text-line">
+ {{ action.url|replace({'http://': '', 'https://': ''}) }}
+ </a>
+ {% endif %}
+ {% if action.type == 'action' and action.pageTitle|default(false) is not empty %}</p>{% endif %}
+ {% elseif action.type != 'search' %}
+ <p>
+ <span>{{ 'General_NotDefined'|translate('Actions_ColumnPageURL'|translate) }}</span>
+ </p>
+ {% endif %}
+ </div>
+</li>