commit 3a5dff3e1c0db8d6e623988b10796cfd1b70964e Author: Joel Pittet Date: Thu Aug 28 18:23:44 2014 -0700 cleanup and markup update to match changes, remove parens and move space inside the span tag. diff --git a/core/includes/theme.maintenance.inc b/core/includes/theme.maintenance.inc index e880d00..cb3d728 100644 --- a/core/includes/theme.maintenance.inc +++ b/core/includes/theme.maintenance.inc @@ -122,22 +122,21 @@ function template_preprocess_task_list(&$variables) { $active = $variables['active']; $done = isset($items[$active]) || $active == NULL; - $tasks = array(); - foreach ($items as $k => $item) { - $tasks[$k]['item'] = $item; - $tasks[$k]['attributes'] = new Attribute(array('class' => array())); + $variables['tasks'][$k]['item'] = $item; + $variables['tasks'][$k]['attributes'] = new Attribute(); if ($active == $k) { - $tasks[$k]['attributes']['class'][] = 'active'; - $tasks[$k]['status'] = t('active'); + $variables['tasks'][$k]['attributes']->addClass('active'); + $variables['tasks'][$k]['status'] = t('active'); $done = FALSE; } else { - $tasks[$k]['attributes']['class'][] = $done ? 'done' : ''; - $tasks[$k]['status'] = $done ? t('done') : ''; + if ($done) { + $variables['tasks'][$k]['attributes']->addClass('active'); + $variables['tasks'][$k]['status'] = t('done'); + } } } - $variables['tasks'] = $tasks; } /** diff --git a/core/modules/system/templates/task-list.html.twig b/core/modules/system/templates/task-list.html.twig index b707a0f..8de6d0d 100644 --- a/core/modules/system/templates/task-list.html.twig +++ b/core/modules/system/templates/task-list.html.twig @@ -19,7 +19,7 @@ {% for task in tasks %} {{ task.item }} - {% if task.status %} ({{ task.status }}){% endif %} + {% if task.status %} {{ task.status }}{% endif %} {% endfor %}