diff --git a/config/sync/block.block.openeuropawebtoolsetrans.yml b/config/sync/block.block.openeuropawebtoolsetrans.yml index be00fad6e3893c2398af5b54045276a563f81813..03daa05ccf46195175152bf2390b03e0a2600c01 100644 --- a/config/sync/block.block.openeuropawebtoolsetrans.yml +++ b/config/sync/block.block.openeuropawebtoolsetrans.yml @@ -4,6 +4,7 @@ status: true dependencies: module: - joinup_core + - node - oe_webtools_etrans - system theme: @@ -36,5 +37,15 @@ visibility: - entity.taxonomy_term.delete_form request_path: id: request_path + negate: true + pages: '' + 'entity_bundle:node': + id: 'entity_bundle:node' negate: false - pages: "/interoperable-europe/news/*\r\n/interoperable-europe/event/*\r\n/interoperable-europe/document/*\r\n/interoperable-europe/discussion/*" + context_mapping: { } + bundles: + custom_page: custom_page + discussion: discussion + document: document + event: event + news: news diff --git a/tests/features/communities/interoperable_europe/interoperable_europe.feature b/tests/features/communities/interoperable_europe/interoperable_europe.feature index bec750b3c6f6284643185862a12166e1f40ca78f..d1e1afeb22a3a05ef9460808edba27df36e0653f 100644 --- a/tests/features/communities/interoperable_europe/interoperable_europe.feature +++ b/tests/features/communities/interoperable_europe/interoperable_europe.feature @@ -9,15 +9,13 @@ Feature: When I click "Discover more" Then I should see the heading "Joinup is becoming Interoperable Europe Portal" And the page should be rendered using the "Interoperable Europe" theme - # Uncomment this in ISAICP-9192. - # And I should not see the link "Report abusive content" + And I should not see the link "Report abusive content" # Test other pages. When I visit "/interoperable-europe/initiatives" Then the page should be rendered using the "Interoperable Europe" theme And I should see the heading "Initiatives" And I should see the heading "Join our community!" - And I should not see the link "Report abusive content" # Event. When I visit "/interoperable-europe/event/save-date-semic-coming-back-8-december-2021" @@ -25,7 +23,6 @@ Feature: And I should see the text "Event" And I should not see the heading "Event" And I should see the link "more events" - And I should not see the link "Report abusive content" And I should see the text "Published on: 19/11/2021" And I should see the heading "Join our community!" When I click "more events" @@ -37,7 +34,6 @@ Feature: And I should see the text "News" And I should not see the heading "News" And I should see the link "more news" - And I should not see the link "Report abusive content" And I should see the text "Published on: 19/11/2021" And I should see the heading "Join our community!" When I click "more news" @@ -82,18 +78,7 @@ Feature: Then I should see the error message "Title field is required." @javascript - Scenario: Report link and eTranslate button are not available in IOP custom pages. - Given custom_page content: - | title | collection | - | IOP page | Interoperable Europe | - - When I am logged in as a user with the authenticated role - And I go to the "IOP page" custom page - Then I should not see the link "Report abusive content" - And I should not see the button "Translate" - - @javascript - Scenario Outline: Report link and eTranslate button are not available in IOP. + Scenario Outline: Visibility of Report link and eTranslate button. Given <type> content: | title | collection | | IOP <type> | Interoperable Europe | @@ -104,11 +89,12 @@ Feature: And I should see the button "Translate" Examples: - | type | - | news | - | event | - | discussion | - | document | + | type | + | news | + | event | + | discussion | + | document | + | custom_page | @javascript Scenario: Regression test that ensures that search bar works fine. diff --git a/web/themes/iop/iop.theme b/web/themes/iop/iop.theme index cb03ec267999d1b3b2e8681d76417ab8cc3b3e06..48d2113803dc0ef3d314c1a8d058f17275e2e57a 100644 --- a/web/themes/iop/iop.theme +++ b/web/themes/iop/iop.theme @@ -122,8 +122,7 @@ function iop_preprocess_node(array &$variables): void { } // Disables the "Report" link for IOP. - $node = \Drupal::routeMatch()->getParameter('node'); - if (!$node instanceof NodeInterface || isset($variables['content']['report'])) { + if (isset($variables['content']['report'])) { $variables['content']['report']['#access'] = FALSE; }