{% set helper = _args.helper|default(null) %}
{% set title = _args.title %}
{% set text = _args.text|default(null) %}
{% set subtext = _args.subtext|default(null) %}
{% set statuses = _args.statuses|default([]) %}
{% set actions = _args.actions|default([]) %}
{% set bulk = _args.bulk|default(null) %}
{% set lazyload = _args.lazyload|default(false) %}
{% set htmlData = _args.htmlData|default({}) %}
{% embed '@ui/common/data/item.html.twig' with {
helper: helper,
lazyload: lazyload,
htmlData: htmlData,
} %}
{% block checkbox %}
{% if bulk is not empty %}
{% include '@ui/common/bulk/checkbox.html.twig' with {
value: bulk
} %}
{% else %}
<div class="checkbox hidden-xs"> </div>
{% endif %}
{% endblock %}
{% block details %}
<p class="module-li__title">{{ title|raw }}</p>
{% if text is not empty %}
<p class="module-li__url">{{ text|raw }}</p>
{% endif %}
{% if subtext is not empty %}
{% if subtext is iterable %}
{% for st in subtext %}
<p class="module-li__date">{{ st|raw }}</p>
{% endfor %}
{% else %}
<p class="module-li__date">{{ subtext|raw }}</p>
{% endif %}
{% endif %}
{% endblock %}
{% block statuses %}
{% if statuses is not empty %}
<div class="module-li__status">
{% for status in statuses %}
{% if status is not empty %}
{% set tooltipText = null %}
{% if status.text == 'Live' %}
{% set tooltipText = 'This item is live to the public.' %}
{% elseif status.text == 'Draft' %}
{% set tooltipText = 'There is a draft of this item.' %}
{% endif %}
<span
class="label label--{{ status.helper }}"
{% if tooltipText is not empty %}
data-toggle="tooltip"
data-original-title="{{ tooltipText }}"
data-placement="left"
{% endif %}
>
{{ status.text }}
</span>
{% endif %}
{% endfor %}
</div>
{% endif %}
{% endblock %}
{% block actions %}
{% if actions is not empty %}
<ul class="actions">
{% for action in actions %}
{% if action is not empty %}
<li class="actions-li{% if action.disabled|default(false) is same as(true) %} disabled{% endif %}">
{% if action.items|default([]) is not empty %}
<a class="actions-li__link" href="#" data-toggle="dropdown">
<em class="icon {{ action.icon }}"></em>
</a>
<ul class="dropdown-menu" role="menu" aria-labelledby="export">
{% for item in action.items %}
{% if item is not empty %}
<li role="presentation" class="text-{{ item.helper|default('default') }}">
<a role="menuitem" tabindex="-1" href="{{ item.link|default('#') }}">{{ item.title }}</a>
</li>
{% endif %}
{% endfor %}
</ul>
{% else %}
<a class="actions-li__link" href="{{ action.link|default('#') }}">
<em class="icon {{ action.icon }}"></em>
</a>
{% endif %}
</li>
{% endif %}
{% endfor %}
</ul>
{% endif %}
{% endblock %}
{% endembed %}