-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #376 from itk-dev/feature/HRIN-767-gis-map
HRIN-767: Added GIS map token
- Loading branch information
Showing
16 changed files
with
389 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
uuid: d4a16c11-faf2-4617-bd62-c28ad4eb5f31 | ||
langcode: da | ||
status: true | ||
dependencies: | ||
config: | ||
- filter.format.hearing_description | ||
module: | ||
- ckeditor5 | ||
format: hearing_description | ||
editor: ckeditor5 | ||
settings: | ||
toolbar: | ||
items: | ||
- bold | ||
- italic | ||
- '|' | ||
- link | ||
- '|' | ||
- bulletedList | ||
- numberedList | ||
- '|' | ||
- blockQuote | ||
- '|' | ||
- sourceEditing | ||
- '|' | ||
- heading | ||
- tokenBrowser | ||
plugins: | ||
ckeditor5_heading: | ||
enabled_headings: | ||
- heading2 | ||
- heading3 | ||
- heading4 | ||
ckeditor5_list: | ||
reversed: false | ||
startIndex: true | ||
ckeditor5_sourceEditing: | ||
allowed_tags: | ||
- '<cite>' | ||
- '<a hreflang target>' | ||
- '<blockquote cite>' | ||
- '<ul type>' | ||
- '<ol type>' | ||
- '<h2 id>' | ||
- '<h3 id>' | ||
- '<h4 id>' | ||
editor_advanced_link_link: | ||
enabled_attributes: | ||
- target | ||
token_filter_token_browser: | ||
token_types: { } | ||
image_upload: | ||
status: false | ||
scheme: public | ||
directory: inline-images | ||
max_size: '' | ||
max_dimensions: | ||
width: null | ||
height: null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
uuid: 15881684-2eac-4426-bae4-7e44d395c82a | ||
langcode: da | ||
status: true | ||
dependencies: | ||
module: | ||
- token_filter | ||
name: 'Hearing description' | ||
format: hearing_description | ||
weight: 0 | ||
filters: | ||
filter_autop: | ||
id: filter_autop | ||
provider: filter | ||
status: true | ||
weight: 9 | ||
settings: { } | ||
filter_htmlcorrector: | ||
id: filter_htmlcorrector | ||
provider: filter | ||
status: true | ||
weight: -50 | ||
settings: { } | ||
filter_url: | ||
id: filter_url | ||
provider: filter | ||
status: false | ||
weight: -50 | ||
settings: | ||
filter_url_length: 72 | ||
filter_html: | ||
id: filter_html | ||
provider: filter | ||
status: true | ||
weight: 0 | ||
settings: | ||
allowed_html: '<br> <p> <h2 id> <h3 id> <h4 id> <cite> <a hreflang target href> <blockquote cite> <ul type> <ol type start> <strong> <em> <li>' | ||
filter_html_help: true | ||
filter_html_nofollow: false | ||
token_filter: | ||
id: token_filter | ||
provider: token_filter | ||
status: true | ||
weight: 15 | ||
settings: | ||
replace_empty: '1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
web/modules/custom/hoeringsportal_hearing/assets/css/gis-minimap.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.hoeringsportal-hearing-gis-minimap { | ||
/* We use a `span` element to render the map (it's most times inside a `p` element). */ | ||
display: block; | ||
height: 500px; | ||
} | ||
|
||
.hoeringsportal-hearing-gis-minimap.invalid-token { | ||
color: #f00; | ||
background: #ff0; | ||
height: auto; | ||
} |
30 changes: 30 additions & 0 deletions
30
web/modules/custom/hoeringsportal_hearing/hoeringsportal_hearing.install
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
/** | ||
* @file | ||
* Code related to installing and updating this module. | ||
*/ | ||
|
||
/** | ||
* Update text format on hearing description. | ||
*/ | ||
function hoeringsportal_hearing_update_9001() { | ||
$storage = \Drupal::entityTypeManager() | ||
->getStorage('node'); | ||
$ids = $storage->getQuery() | ||
->condition('type', 'hearing') | ||
->accessCheck(FALSE) | ||
->execute(); | ||
$hearings = $storage->loadMultiple($ids); | ||
|
||
$field_name = 'field_description'; | ||
$text_format = 'hearing_description'; | ||
foreach ($hearings as $hearing) { | ||
if ($value = ($hearing->get($field_name)->getValue()[0] ?? NULL)) { | ||
$value['format'] = $text_format; | ||
$hearing->set($field_name, $value); | ||
|
||
$hearing->save(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.