Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OPENEUROPA-1744: Implement site switcher in oe_theme. #190

Merged
merged 7 commits into from Apr 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion behat.yml.dist
Expand Up @@ -21,7 +21,7 @@ default:
page header: ".ecl-page-header__body"
priorities dropdown menu: "#nav-menu-expandable-group-3 .ecl-navigation-menu__links"
search form: ".ecl-search-form"
sites switcher: ".demo-block-site-switcher"
sites switcher: ".ecl-site-switcher--header"
dropdown content: ".ecl-link-block__list"
pages:
user registration: "/user/register"
Expand Down
19 changes: 19 additions & 0 deletions config/optional/block.block.oe_theme_site_switcher.yml
@@ -0,0 +1,19 @@
langcode: en
status: true
dependencies:
module:
- oe_corporate_blocks
theme:
- oe_theme
id: oe_theme_site_switcher
theme: oe_theme
region: site_top_bar
weight: 0
provider: null
plugin: oe_site_switcher
settings:
id: oe_site_switcher
label: 'Site switcher block'
provider: oe_corporate_blocks
label_display: '0'
visibility: { }
3 changes: 0 additions & 3 deletions modules/oe_theme_demo/README.md
Expand Up @@ -7,9 +7,6 @@ The demo module includes:

- A custom main menu with sub-menu items
- An overview page for all Drupal-related components called "Style guide"
- Placeholder blocks like:
- Language switcher
- Site switcher

### Requirements

Expand Down

This file was deleted.

3 changes: 0 additions & 3 deletions modules/oe_theme_demo/oe_theme_demo.demo_blocks.yml

This file was deleted.

5 changes: 0 additions & 5 deletions modules/oe_theme_demo/oe_theme_demo.info.yml
Expand Up @@ -6,8 +6,3 @@ package: OpenEuropa
dependencies:
- drupal:block
- styleguide:styleguide

config_devel:
optional:
- block.block.oe_theme_demo_header_site_switcher
- block.block.oe_theme_demo_main_navigation
24 changes: 0 additions & 24 deletions modules/oe_theme_demo/oe_theme_demo.module

This file was deleted.

4 changes: 0 additions & 4 deletions modules/oe_theme_demo/oe_theme_demo.services.yml

This file was deleted.

79 changes: 0 additions & 79 deletions modules/oe_theme_demo/src/DemoBlockPluginManager.php

This file was deleted.

41 changes: 0 additions & 41 deletions modules/oe_theme_demo/src/Plugin/Block/DemoBlock.php

This file was deleted.

61 changes: 0 additions & 61 deletions modules/oe_theme_demo/src/Plugin/Derivative/DemoBlock.php

This file was deleted.

This file was deleted.

25 changes: 25 additions & 0 deletions templates/navigation/oe-corporate-blocks-site-switcher.html.twig
@@ -0,0 +1,25 @@
{#
/**
* @file
* Theme override for rendering corporate site switcher block.
*
* Available variables:
* - links: list of site switcher links.
*
* @ingroup themeable
*/
#}

{% include '@ecl/ec-component-site-switcher' with {
'variant': 'header',
'political': {
'href': links.political.href,
'label': links.political.label,
'is_active': links.political.active
},
'info': {
'href': links.info.href,
'label': links.info.label,
'is_active': links.info.active
},
} only %}
2 changes: 1 addition & 1 deletion tests/Kernel/AbstractKernelTestBase.php
Expand Up @@ -21,7 +21,7 @@ abstract class AbstractKernelTestBase extends KernelTestBase {
/**
* {@inheritdoc}
*/
public static $modules = [
protected static $modules = [
'system',
'user',
'ui_patterns',
Expand Down