reverted: --- b/core/modules/node/node.module +++ a/core/modules/node/node.module @@ -97,9 +97,6 @@ $type = $route_match->getParameter('node_type'); $help = $type->getHelp(); return (!empty($help) ? Xss::filterAdmin($help) : ''); - - case "node.add_page": - return '

' . t('Choose which type of content to create. You can also add a new content type.', [':content-type' => Url::fromRoute('node.type_add')->toString()]); } } only in patch2: unchanged: --- a/core/modules/node/templates/node-add-list.html.twig +++ b/core/modules/node/templates/node-add-list.html.twig @@ -15,6 +15,7 @@ * @ingroup themeable */ #} +{% set create_content = path('node.type_add') %} {% if types is not empty %}

{% for type in types %} @@ -22,9 +23,13 @@
{{ type.description }}
{% endfor %}
+ {% if user.hasPermission('administer content types') %} + {% trans %} + You can also create a new content type. + {% endtrans %} + {% endif %} {% else %}

- {% set create_content = path('node.type_add') %} {% trans %} You have not created any content types yet. Go to the content type creation page to add a new content type. {% endtrans %} only in patch2: unchanged: --- a/core/profiles/demo_umami/themes/umami/templates/classy/content-edit/node-add-list.html.twig +++ b/core/profiles/demo_umami/themes/umami/templates/classy/content-edit/node-add-list.html.twig @@ -13,6 +13,7 @@ * @see template_preprocess_node_add_list() */ #} +{% set create_content = path('node.type_add') %} {% if types is not empty %}

{% for type in types %} @@ -20,9 +21,13 @@
{{ type.description }}
{% endfor %}
+ {% if user.hasPermission('administer content types') %} + {% trans %} + You can also create a new content type. + {% endtrans %} + {% endif %} {% else %}

- {% set create_content = path('node.type_add') %} {% trans %} You have not created any content types yet. Go to the content type creation page to add a new content type. {% endtrans %} only in patch2: unchanged: --- a/core/tests/Drupal/KernelTests/Core/Theme/ConfirmClassyCopiesTest.php +++ b/core/tests/Drupal/KernelTests/Core/Theme/ConfirmClassyCopiesTest.php @@ -741,7 +741,7 @@ protected function getClassyHash($type, $file) { 'file-widget-multiple.html.twig' => '93425e782dabe54b88b1516dc681f9ce', 'image-widget.html.twig' => '03d1151c7e99999174a0113d21375372', 'file-upload-help.html.twig' => 'd8fcf1f79c4eff6c89539c17d03c4731', - 'node-add-list.html.twig' => '43cef03ea415399b8e51e2e363479702', + 'node-add-list.html.twig' => 'b0a141dd15e26fb1c4d9ab0c4c6fdf5e', 'filter-guidelines.html.twig' => '250f9abf18cfc45f174d994dc505585b', 'filter-tips.html.twig' => 'fefcab317b602cbfe7f608bc481be889', 'file-managed-file.html.twig' => 'ee735232c3d782f09178bc56df8f89b1', only in patch2: unchanged: --- a/core/themes/bartik/templates/classy/content-edit/node-add-list.html.twig +++ b/core/themes/bartik/templates/classy/content-edit/node-add-list.html.twig @@ -13,6 +13,7 @@ * @see template_preprocess_node_add_list() */ #} +{% set create_content = path('node.type_add') %} {% if types is not empty %}

{% for type in types %} @@ -20,9 +21,13 @@
{{ type.description }}
{% endfor %}
+ {% if user.hasPermission('administer content types') %} + {% trans %} + You can also create a new content type. + {% endtrans %} + {% endif %} {% else %}

- {% set create_content = path('node.type_add') %} {% trans %} You have not created any content types yet. Go to the content type creation page to add a new content type. {% endtrans %} only in patch2: unchanged: --- a/core/themes/claro/templates/entity-add-list.html.twig +++ b/core/themes/claro/templates/entity-add-list.html.twig @@ -42,6 +42,8 @@ {% endfor %} + {% block extra %} + {% endblock %} {% elseif add_bundle_message is not empty %}

{{ add_bundle_message }} only in patch2: unchanged: --- a/core/themes/claro/templates/node-add-list.html.twig +++ b/core/themes/claro/templates/node-add-list.html.twig @@ -20,6 +20,13 @@ {% extends '@claro/entity-add-list.html.twig' %} {% set create_content = path('node.type_add') %} +{% block extra %} + {% if user.hasPermission('administer content types') %} + {% trans %} + You can also create a new content type. + {% endtrans %} + {% endif %} +{% endblock %} {% set add_bundle_message = 'You have not created any content types yet. Go to the content type creation page to add a new content type.'|t({ '@create-content': create_content }) %} only in patch2: unchanged: --- a/core/themes/classy/templates/content-edit/node-add-list.html.twig +++ b/core/themes/classy/templates/content-edit/node-add-list.html.twig @@ -13,6 +13,7 @@ * @see template_preprocess_node_add_list() */ #} +{% set create_content = path('node.type_add') %} {% if types is not empty %}

{% for type in types %} @@ -20,9 +21,13 @@
{{ type.description }}
{% endfor %}
+ {% if user.hasPermission('administer content types') %} + {% trans %} + You can also create a new content type. + {% endtrans %} + {% endif %} {% else %}

- {% set create_content = path('node.type_add') %} {% trans %} You have not created any content types yet. Go to the content type creation page to add a new content type. {% endtrans %} only in patch2: unchanged: --- a/core/themes/seven/templates/node-add-list.html.twig +++ b/core/themes/seven/templates/node-add-list.html.twig @@ -13,15 +13,20 @@ * @see seven_preprocess_node_add_list() */ #} +{% set create_content = path('node.type_add') %} {% if content %}

+ {% if user.hasPermission('administer content types') %} + {% trans %} + You can also create a new content type. + {% endtrans %} + {% endif %} {% else %}

- {% set create_content = path('node.type_add') %} {% trans %} You have not created any content types yet. Go to the content type creation page to add a new content type. {% endtrans %} only in patch2: unchanged: --- a/core/themes/stable/templates/content-edit/node-add-list.html.twig +++ b/core/themes/stable/templates/content-edit/node-add-list.html.twig @@ -13,6 +13,7 @@ * @see template_preprocess_node_add_list() */ #} +{% set create_content = path('node.type_add') %} {% if types is not empty %}

{% for type in types %} @@ -20,9 +21,13 @@
{{ type.description }}
{% endfor %}
+ {% if user.hasPermission('administer content types') %} + {% trans %} + You can also create a new content type. + {% endtrans %} + {% endif %} {% else %}

- {% set create_content = path('node.type_add') %} {% trans %} You have not created any content types yet. Go to the content type creation page to add a new content type. {% endtrans %} only in patch2: unchanged: --- a/core/themes/stable9/templates/content-edit/node-add-list.html.twig +++ b/core/themes/stable9/templates/content-edit/node-add-list.html.twig @@ -13,6 +13,7 @@ * @see template_preprocess_node_add_list() */ #} +{% set create_content = path('node.type_add') %} {% if types is not empty %}

{% for type in types %} @@ -20,9 +21,13 @@
{{ type.description }}
{% endfor %}
+ {% if user.hasPermission('administer content types') %} + {% trans %} + You can also create a new content type. + {% endtrans %} + {% endif %} {% else %}

- {% set create_content = path('node.type_add') %} {% trans %} You have not created any content types yet. Go to the content type creation page to add a new content type. {% endtrans %}