Skip to content

Commit 74eb7e4

Browse files
committed
Merge branch 'develop' of github.com:OS2web/os2web8 into develop
2 parents 7b720c7 + 250d784 commit 74eb7e4

File tree

6 files changed

+35
-7
lines changed

6 files changed

+35
-7
lines changed

composer.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web/modules/custom/ballerup_d7_migration/config/install/migrate_plus.migration.ballerup_d7_node_gallery_slide.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ process:
6262
- createUrlFromNid
6363
source: nid
6464
field_os2web_page_intro: field_deck
65-
field_os2web_page_heading: field_navn3
65+
field_os2web_page_heading: title
6666
field_os2web_page_section:
6767
plugin: migration_lookup
6868
migration: ballerup_d7_taxonomy_section

web/modules/custom/ballerup_d7_migration/config/install/migrate_plus.migration.ballerup_d7_node_indholdside.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ process:
3535
default_value: 1
3636
source: '@migrate_uid'
3737
status: status
38+
moderation_state:
39+
plugin: callback
40+
callable:
41+
- 'Drupal\ballerup_d7_migration\Utility\MigrationHelper'
42+
- setModerationState
43+
source: status
3844
created: created
3945
changed: changed
4046
#promote: promote

web/modules/custom/ballerup_d7_migration/config/install/migrate_plus.migration.ballerup_d7_node_institution_page.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ process:
3333
plugin: default_value
3434
default_value: 1
3535
source: '@migrate_uid'
36+
status: status
37+
moderation_state:
38+
plugin: callback
39+
callable:
40+
- 'Drupal\ballerup_d7_migration\Utility\MigrationHelper'
41+
- setModerationState
42+
source: status
3643
field_migration_old_url:
3744
plugin: callback
3845
callable:
@@ -46,7 +53,7 @@ process:
4653
value: value
4754
format:
4855
plugin: default_value
49-
default_value: 'wysiwyg_tekst'
56+
default_value: 'wysiwyg_tekst'
5057
# ...
5158
field_os2web_page_contact:
5259
plugin: migration_lookup

web/modules/custom/ballerup_d7_migration/src/Utility/MigrationHelper.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,22 @@ function createUrlFromNid($nid) {
1818
return MigrationHelper::$siteUrl . '/node/' . $nid;
1919
}
2020

21+
/**
22+
* Sets the moderation state for the node based on a status.
23+
*
24+
* @param $status
25+
*
26+
* @return string
27+
*/
28+
function setModerationState($status) {
29+
if ($status) {
30+
return 'published';
31+
}
32+
else {
33+
return 'draft';
34+
}
35+
}
36+
2137
/**
2238
* Creates Borger.dk paragraph with the right article selected.
2339
*

web/themes/custom/fds_ballerup_theme/templates/page/page.html.twig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@
110110
{% if page.sidebar_second %}
111111
{% block sidebar_second %}
112112
{% if ( not is_front ) %}
113-
<br>
114113
<a href="/selvbetjening" class="button button-primary button--selvbetjening">
115114
{{ 'Genvej til al Selvbetjening' | trans }} <span class="icon fa fa-angle-right"></span>
116115
</a>

0 commit comments

Comments
 (0)