Skip to content

Commit

Permalink
Merge pull request #289 from localgovdrupal/1.x
Browse files Browse the repository at this point in the history
PR for 1.7.0
  • Loading branch information
andybroomfield committed Oct 2, 2023
2 parents 8320b74 + 93f9a15 commit 006f9d4
Show file tree
Hide file tree
Showing 25 changed files with 1,459 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
pull_request:
branches:
- '1.x'
workflow_dispatch:

env:
LOCALGOV_DRUPAL_PROJECT: localgovdrupal/localgov_alert_banner
Expand Down Expand Up @@ -100,6 +101,9 @@ jobs:
with:
path: ${{ env.LOCALGOV_DRUPAL_PROJECT_PATH }}

- name: Obtain suggested dependencies
run: composer --working-dir=./html/${LOCALGOV_DRUPAL_PROJECT_PATH} suggests --list | xargs composer --working-dir=./html require

phpcs:
name: Coding standards checks
needs: build
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
},
"suggest": {
"drupal/scheduled_transitions": "Gives the ability to schedule the publishing and unpublishing of alert banners",
"localgovdrupal/localgov_core": "^1 || ^2"
"localgovdrupal/localgov_core": "^1 || ^2",
"drupal/group": "For Group integration."
}
}
16 changes: 16 additions & 0 deletions modules/group_alert_banner/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Group Alert banner
LocalGov Alert banner integration with the [Group module](https://www.drupal.org/project/group).

## Configuration
### User permissions
If you are using this module alongside the [localgov_microsites_group](https://github.com/localgovdrupal/localgov_microsites_group) module, then user permissions will be automatically setup during module installation.

Otherwise enable at least the following permissions for **Groups**:
- "Entity: View any alert banner entities" for both anonymous and authenticated users.
- "Access Alert banner listing page" for group admins.

### Block placement
If you are using the [localgov_microsites_base theme](https://github.com/localgovdrupal/localgov_microsites_base), which is the default theme of the [LocalGov Drupal Microsites distribution](https://github.com/localgovdrupal/localgov_microsites_project), an Alert banner block will be automatically placed in the *Header* region. For all other themes, place an Alert banner block in a theme region towards the top of the page.

## Banner listing
Once this module is installed, an *Alert banner* tab should appear in each Group page. This page will list all the banners belonging to a Group.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
langcode: en
status: true
dependencies:
module:
- localgov_alert_banner
theme:
- localgov_microsites_base
id: localgov_alert_banner_microsites_base
theme: localgov_microsites_base
region: header
weight: -10
provider: null
plugin: localgov_alert_banner_block
settings:
id: localgov_alert_banner_block
label: 'Alert banner'
label_display: '0'
provider: localgov_alert_banner
include_types:
localgov_alert_banner: '0'
visibility: { }
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
langcode: en
status: true
dependencies:
config:
- group.type.microsite
- localgov_alert_banner.localgov_alert_banner_type.localgov_alert_banner
module:
- group_alert_banner
- localgov_alert_banner
id: microsite-41d536b28977e933e431cc
group_type: microsite
content_plugin: 'group_localgov_alert_banner:localgov_alert_banner'
plugin_config:
group_cardinality: 0
entity_cardinality: 1
use_creation_wizard: false
Loading

0 comments on commit 006f9d4

Please sign in to comment.