commit c629ebe10a611bd41b2c1ecf3c1f9e23947369b0 Author: Joel Pittet Date: Sat Oct 19 20:44:01 2013 -0700 trans fix and custom_block_add_list fix diff --git a/core/themes/seven/seven.theme b/core/themes/seven/seven.theme index 58abfc0..85af033 100644 --- a/core/themes/seven/seven.theme +++ b/core/themes/seven/seven.theme @@ -68,10 +68,11 @@ function seven_preprocess_node_add_list(&$variables) { */ function seven_preprocess_custom_block_add_list(&$variables) { if (!empty($variables['content'])) { - foreach ($variables['content'] as $id => $type) { - $variables['types'][$id]['label'] = String::checkPlain($type->label()); - $variables['types'][$id]['description'] = Xss::filterAdmin($type->description); - $variables['types'][$id]['path'] = \Drupal::l(String::checkPlain($type->name()), 'custom_block.add_form', array('custom_block_type' => $id), $options); + 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()]['path'] = \Drupal::url('custom_block.add_form', array('custom_block_type' => $type->id()), $options); } } } diff --git a/core/themes/seven/templates/node-add-list.html.twig b/core/themes/seven/templates/node-add-list.html.twig index dacbbd6..fe1fe1e 100644 --- a/core/themes/seven/templates/node-add-list.html.twig +++ b/core/themes/seven/templates/node-add-list.html.twig @@ -21,7 +21,8 @@ {% endfor %} {% else %} + {% set add_content_type_url = url('admin/structure/types/add') %} {% trans %} -

{{ 'You have not created any content types yet. Go to the content type creation page to add a new content type.'|t({'@create-content': url('admin/structure/types/add')}) }}

+

You have not created any content types yet. Go to the content type creation page to add a new content type.

{% endtrans %} {% endif %}