diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 196ebf4..8f9ab4a 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -2357,21 +2357,6 @@ function theme_progress_bar($variables) { } /** - * Returns HTML for an indentation div; used for drag and drop tables. - * - * @param $variables - * An associative array containing: - * - size: Optional. The number of indentations to create. - */ -function theme_indentation($variables) { - $output = ''; - for ($n = 0; $n < $variables['size']; $n++) { - $output .= '
 
'; - } - return $output; -} - -/** * Returns HTML to wrap child elements in a container. * * Used for grouped form items. Can also be used as a #theme_wrapper for any @@ -3086,6 +3071,7 @@ function drupal_common_theme() { ), 'indentation' => array( 'variables' => array('size' => 1), + 'template' => 'indentation', ), // From theme.maintenance.inc. 'maintenance_page' => array( diff --git a/core/modules/system/templates/indentation.html.twig b/core/modules/system/templates/indentation.html.twig new file mode 100644 index 0000000..41bacde --- /dev/null +++ b/core/modules/system/templates/indentation.html.twig @@ -0,0 +1,14 @@ +{# +/** + * @file + * Default theme implementation for a set of indentation divs. + * + * These
tags are used for drag and drop tables. + * + * Available variables: + * - size: Optional. The number of indentations to create. + * + * @ingroup themeable + */ +#} +{% for i in 1..size if size > 0 %}
 
{% endfor %}