diff --git a/core/themes/seven/seven.theme b/core/themes/seven/seven.theme index 43f6f80..d2a3992 100644 --- a/core/themes/seven/seven.theme +++ b/core/themes/seven/seven.theme @@ -127,26 +127,24 @@ function seven_preprocess_node_add_list(&$variables) { } /** - * Implements hook_preprocess_HOOK() for custom block add list templates. + * Implements hook_preprocess_HOOK() for block content add list templates. * * Displays the list of available custom block types for creation, adding * separate variables for the label, description, and url. */ -function seven_preprocess_custom_block_add_list(&$variables) { +function seven_preprocess_block_content_add_list(&$variables) { if (!empty($variables['content'])) { foreach ($variables['content'] as $type) { $variables['types'][$type->id()]['label'] = String::checkPlain($type->label()); $variables['types'][$type->id()]['description'] = Xss::filterAdmin($type->description); $options = array('query' => \Drupal::request()->query->all()); - $variables['types'][$type->id()]['url'] = \Drupal::url('custom_block.add_form', array('custom_block_type' => $type->id()), $options); + $variables['types'][$type->id()]['url'] = \Drupal::url('block_content.add_form', array('block_content_type' => $type->id()), $options); } } } /** * Implements hook_preprocess_HOOK() for block admin page templates. - * - * Uses an unordered list markup in both compact and extended mode. */ function seven_preprocess_admin_block_content(&$variables) { if (!empty($variables['content'])) { diff --git a/core/themes/seven/templates/admin-block-content.html.twig b/core/themes/seven/templates/admin-block-content.html.twig index 175dc79..7dc0a92 100644 --- a/core/themes/seven/templates/admin-block-content.html.twig +++ b/core/themes/seven/templates/admin-block-content.html.twig @@ -3,10 +3,12 @@ * @file * Seven's theme implementation for the content of an administrative block. * + * Uses unordered list markup in both compact and extended modes. + * * Available variables: * - content: List of administrative menu items. Each menu item contains: * - url: Path to the admin section. - * - label: Short name of the section. + * - title: Short name of the section. * - description: Description of the administrative menu item. * - attributes: HTML attributes to be added to the element. * @@ -17,7 +19,7 @@ {% if content %} {% for item in content %} -
  • {{ item.label }}
    {{ item.description }}
  • +
  • {{ item.title }}
    {{ item.description }}
  • {% endfor %} {% endif %} diff --git a/core/themes/seven/templates/custom-block-add-list.html.twig b/core/themes/seven/templates/block-content-add-list.html.twig similarity index 75% rename from core/themes/seven/templates/custom-block-add-list.html.twig rename to core/themes/seven/templates/block-content-add-list.html.twig index 02ba5cf..0c0c496 100644 --- a/core/themes/seven/templates/custom-block-add-list.html.twig +++ b/core/themes/seven/templates/block-content-add-list.html.twig @@ -1,21 +1,20 @@ {# /** * @file - * Overrides custom-block-add-list.html.twig. + * Seven's theme implementation to display a list of custom block types. * * Displays the list of available custom block types for creation. * * Available variables: * - types: A collection of all the available custom block types. * Each type contains: - * - type: The custom block type, containing all the items below. * - url: A link to add a block of this type. * - description: A description of this custom block type. * - label: The title of the custom block type. * - path: A path for the link to add a block of this type. * - * @see template_preprocess_custom_block_add_list() - * @see seven_preprocess_custom_block_add_list() + * @see template_preprocess_block_content_add_list() + * @see seven_preprocess_block_content_add_list() */ #}