src/Cms/WorkflowsBundle/Resources/views/Dashboard/Drafts/includes/drafts.html.twig line 1

Open in your IDE?
  1. {% embed '@ui/features/workflows/lists/default.html.twig' with {
  2.     lazyload: (drafts|length > 0)
  3. } %}
  4.     {% block items %}
  5.         {% for draft in drafts %}
  6.             {% include '@ui/features/workflows/lists/items/draft.html.twig' with {
  7.                 lazyload: true,
  8.                 title: '%s <strong>%s</strong>'|format(
  9.                     ('cms.workflows.dashboard.misc.content_types.' ~ cms_class(draft))|trans,
  10.                     draft.draftTitle|escape('html')
  11.                 ),
  12.                 classes: [
  13.                     (not draft.proxy.placeholder) ? 'module-li--success' : null
  14.                 ]|join(' ')|trim,
  15.                 avatar: draft.blamedBy,
  16.                 text1: 'Department: <a href="%s">%s</a>'|format(
  17.                     path('campussuite.cms.module.dashboard.content.proxy_list', {
  18.                         container: draft.proxy.container.id,
  19.                         module: cms.moduleConfig(draft).key
  20.                     }),
  21.                     draft.proxy.container.name
  22.                 ),
  23.                 text2: '%s by %s %s'|format(
  24.                     (draft.updatedAt is not empty) ? 'Updated' : 'Created',
  25.                     (draft.updatedBy is not empty) ? draft.updatedBy.displayName : draft.createdBy.displayName,
  26.                     draft.timestampedAt|ui_datetime
  27.                 ),
  28.                 bulk: false,
  29.                 statuses: [
  30.                     {
  31.                         text: ('cms.workflows.dashboard.misc.content_types.' ~ cms_class(draft))|trans,
  32.                         helper: 'info'
  33.                     },
  34.                     (not draft.proxy.placeholder) ? {
  35.                         text: 'Live',
  36.                         helper: 'success'
  37.                     } : null,
  38.                     {
  39.                         text: 'Draft',
  40.                         helper: 'gray-light'
  41.                     }
  42.                 ],
  43.                 actions: [
  44.                     {
  45.                         title: 'Edit',
  46.                         icon: 'icon-solid-pencil',
  47.                         link: editCallback|call(draft)
  48.                     }
  49.                 ]
  50.             } %}
  51.         {% endfor %}
  52.     {% endblock %}
  53. {% endembed %}