Loading core/includes/theme.inc +2 −1 Original line number Diff line number Diff line Loading @@ -1049,6 +1049,7 @@ function template_preprocess_table(&$variables) { * @see https://www.drupal.org/node/1842756 */ function template_preprocess_item_list(&$variables) { $variables['wrapper_attributes'] = new Attribute($variables['wrapper_attributes']); foreach ($variables['items'] as &$item) { $attributes = array(); // If the item value is an array, then it is a render array. Loading Loading @@ -1752,7 +1753,7 @@ function drupal_common_theme() { 'variables' => array('status' => MARK_NEW), ), 'item_list' => array( 'variables' => array('items' => array(), 'title' => '', 'list_type' => 'ul', 'attributes' => array(), 'empty' => NULL, 'context' => array()), 'variables' => array('items' => array(), 'title' => '', 'list_type' => 'ul', 'wrapper_attributes' => array(), 'attributes' => array(), 'empty' => NULL, 'context' => array()), ), 'feed_icon' => array( 'variables' => array('url' => NULL, 'title' => NULL), Loading core/modules/system/css/components/item-list.module.css 0 → 100644 +19 −0 Original line number Diff line number Diff line /** * @file * Styles for item list. */ .item-list__comma-list, .item-list__comma-list li { display: inline; } .item-list__comma-list { margin: 0; padding: 0; } .item-list__comma-list li:after { content: ", "; } .item-list__comma-list li:last-child:after { content: ""; } core/modules/system/system.libraries.yml +1 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ base: css/components/clearfix.module.css: { weight: -10 } css/components/details.module.css: { weight: -10 } css/components/hidden.module.css: { weight: -10 } css/components/item-list.module.css: { weight: -10 } css/components/js.module.css: { weight: -10 } css/components/nowrap.module.css: { weight: -10 } css/components/position-container.module.css: { weight: -10 } Loading core/modules/system/templates/item-list.html.twig +3 −2 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ * - value: The content of the list element. * - title: The title of the list. * - list_type: The tag for list element ("ul" or "ol"). * - wrapper_attributes: HTML attributes to be applied to the list wrapper. * - attributes: HTML attributes to be applied to the list. * - empty: A message to display when there are no items. Allowed value is a * string or render array. Loading @@ -21,9 +22,9 @@ */ #} {% if context.list_style %} {% set attributes = attributes.addClass('item-list__' ~ context.list_style) %} {%- set attributes = attributes.addClass('item-list__' ~ context.list_style) %} {% endif %} {%- if items or empty -%} {% if items or empty %} {%- if title is not empty -%} <h3>{{ title }}</h3> {%- endif -%} Loading core/themes/bartik/css/components/item-list.css +0 −1 Original line number Diff line number Diff line Loading @@ -25,6 +25,5 @@ .item-list .item-list__comma-list li, [dir="rtl"] .item-list .item-list__comma-list, [dir="rtl"] .item-list .item-list__comma-list li { margin: 0; padding: 0; } Loading
core/includes/theme.inc +2 −1 Original line number Diff line number Diff line Loading @@ -1049,6 +1049,7 @@ function template_preprocess_table(&$variables) { * @see https://www.drupal.org/node/1842756 */ function template_preprocess_item_list(&$variables) { $variables['wrapper_attributes'] = new Attribute($variables['wrapper_attributes']); foreach ($variables['items'] as &$item) { $attributes = array(); // If the item value is an array, then it is a render array. Loading Loading @@ -1752,7 +1753,7 @@ function drupal_common_theme() { 'variables' => array('status' => MARK_NEW), ), 'item_list' => array( 'variables' => array('items' => array(), 'title' => '', 'list_type' => 'ul', 'attributes' => array(), 'empty' => NULL, 'context' => array()), 'variables' => array('items' => array(), 'title' => '', 'list_type' => 'ul', 'wrapper_attributes' => array(), 'attributes' => array(), 'empty' => NULL, 'context' => array()), ), 'feed_icon' => array( 'variables' => array('url' => NULL, 'title' => NULL), Loading
core/modules/system/css/components/item-list.module.css 0 → 100644 +19 −0 Original line number Diff line number Diff line /** * @file * Styles for item list. */ .item-list__comma-list, .item-list__comma-list li { display: inline; } .item-list__comma-list { margin: 0; padding: 0; } .item-list__comma-list li:after { content: ", "; } .item-list__comma-list li:last-child:after { content: ""; }
core/modules/system/system.libraries.yml +1 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ base: css/components/clearfix.module.css: { weight: -10 } css/components/details.module.css: { weight: -10 } css/components/hidden.module.css: { weight: -10 } css/components/item-list.module.css: { weight: -10 } css/components/js.module.css: { weight: -10 } css/components/nowrap.module.css: { weight: -10 } css/components/position-container.module.css: { weight: -10 } Loading
core/modules/system/templates/item-list.html.twig +3 −2 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ * - value: The content of the list element. * - title: The title of the list. * - list_type: The tag for list element ("ul" or "ol"). * - wrapper_attributes: HTML attributes to be applied to the list wrapper. * - attributes: HTML attributes to be applied to the list. * - empty: A message to display when there are no items. Allowed value is a * string or render array. Loading @@ -21,9 +22,9 @@ */ #} {% if context.list_style %} {% set attributes = attributes.addClass('item-list__' ~ context.list_style) %} {%- set attributes = attributes.addClass('item-list__' ~ context.list_style) %} {% endif %} {%- if items or empty -%} {% if items or empty %} {%- if title is not empty -%} <h3>{{ title }}</h3> {%- endif -%} Loading
core/themes/bartik/css/components/item-list.css +0 −1 Original line number Diff line number Diff line Loading @@ -25,6 +25,5 @@ .item-list .item-list__comma-list li, [dir="rtl"] .item-list .item-list__comma-list, [dir="rtl"] .item-list .item-list__comma-list li { margin: 0; padding: 0; }