diff --git a/core/modules/system/templates/links.html.twig b/core/modules/system/templates/links.html.twig index 21ab95d..479f0dd 100644 --- a/core/modules/system/templates/links.html.twig +++ b/core/modules/system/templates/links.html.twig @@ -36,25 +36,25 @@ * @ingroup themeable */ #} -{% if links -%} - {%- if heading -%} - {%- if heading.level -%} +{% if links %} + {% if heading %} + {% if heading.level %} <{{ heading.level }}{{ heading.attributes }}>{{ heading.text }} - {%- else -%} + {% else %} {{ heading.text }} - {%- endif -%} - {%- endif -%} + {% endif %} + {% endif %} - {%- for key, item in links -%} + {% for key, item in links %} - {%- if item.link -%} + {% if item.link %} {{ item.link }} - {%- elseif item.text_attributes -%} + {% elseif item.text_attributes %} {{ item.text }} - {%- else -%} + {% else %} {{ item.text }} - {%- endif -%} + {% endif %} - {%- endfor -%} + {% endfor %} -{%- endif %} +{% endif %} diff --git a/core/modules/views_ui/src/Tests/DisplayTest.php b/core/modules/views_ui/src/Tests/DisplayTest.php index 12c06bd..5b1a8f8 100644 --- a/core/modules/views_ui/src/Tests/DisplayTest.php +++ b/core/modules/views_ui/src/Tests/DisplayTest.php @@ -191,7 +191,9 @@ public function testPageContextualLinks() { $response = $this->drupalPost('contextual/render', 'application/json', $post, array('query' => array('destination' => 'test-display'))); $this->assertResponse(200); $json = Json::decode($response); - $this->assertIdentical($json[$id], ''); + #$this->assertIdentical($json[$id], ''); + $rows = $this->xpath('//ul/li/a[href="@href"]',array('href'=>base_path().'admin/structure/views/view/test_display/edit/page_1'); + $this->assertEqual(1,count($rows),'One row with the matching href'); } /** diff --git a/core/themes/classy/templates/navigation/links.html.twig b/core/themes/classy/templates/navigation/links.html.twig index 5f62ac3..1d91953 100644 --- a/core/themes/classy/templates/navigation/links.html.twig +++ b/core/themes/classy/templates/navigation/links.html.twig @@ -34,25 +34,25 @@ * @see template_preprocess_links() */ #} -{% if links -%} - {%- if heading -%} - {%- if heading.level -%} +{% if links %} + {% if heading %} + {% if heading.level %} <{{ heading.level }}{{ heading.attributes }}>{{ heading.text }} - {%- else -%} + {% else %} {{ heading.text }} - {%- endif -%} - {%- endif -%} + {% endif %} + {% endif %} - {%- for key, item in links -%} + {% for key, item in links %} - {%- if item.link -%} + {% if item.link %} {{ item.link }} - {%- elseif item.text_attributes -%} + {% elseif item.text_attributes %} {{ item.text }} - {%- else -%} + {% else %} {{ item.text }} - {%- endif -%} + {% endif %} - {%- endfor -%} + {% endfor %} -{%- endif %} +{% endif %}