{% embed '@ui/features/workflows/lists/default.html.twig' with {
lazyload: (drafts|length > 0)
} %}
{% block items %}
{% for draft in drafts %}
{% include '@ui/features/workflows/lists/items/draft.html.twig' with {
lazyload: true,
title: '%s <strong>%s</strong>'|format(
('cms.workflows.dashboard.misc.content_types.' ~ cms_class(draft))|trans,
draft.draftTitle|escape('html')
),
classes: [
(not draft.proxy.placeholder) ? 'module-li--success' : null
]|join(' ')|trim,
avatar: draft.blamedBy,
text1: 'Department: <a href="%s">%s</a>'|format(
path('campussuite.cms.module.dashboard.content.proxy_list', {
container: draft.proxy.container.id,
module: cms.moduleConfig(draft).key
}),
draft.proxy.container.name
),
text2: '%s by %s %s'|format(
(draft.updatedAt is not empty) ? 'Updated' : 'Created',
(draft.updatedBy is not empty) ? draft.updatedBy.displayName : draft.createdBy.displayName,
draft.timestampedAt|ui_datetime
),
bulk: false,
statuses: [
{
text: ('cms.workflows.dashboard.misc.content_types.' ~ cms_class(draft))|trans,
helper: 'info'
},
(not draft.proxy.placeholder) ? {
text: 'Live',
helper: 'success'
} : null,
{
text: 'Draft',
helper: 'gray-light'
}
],
actions: [
{
title: 'Edit',
icon: 'icon-solid-pencil',
link: editCallback|call(draft)
}
]
} %}
{% endfor %}
{% endblock %}
{% endembed %}