2023-01-23 11:03:31 +01:00

38 lines
2.0 KiB
Twig

<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.iconSVG|default(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.iconSVG|default(action.icon) is not empty %}
<img src='{{ action.iconSVG|default(action.icon) }}' class="action-list-action-icon {{ action.type }}">
{% endif %}
{% if action.type == 'action' and action.pageTitle|default(false) is not empty %}<p>{% 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|safelink|e('html_attr') }}" rel="noreferrer noopener" 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>