Skip to content

Commit

Permalink
TP-1183 merge fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Iiro Järvenpää authored and Iiro Järvenpää committed Feb 27, 2024
2 parents b9b4593 + 17228c5 commit ae05ccd
Show file tree
Hide file tree
Showing 13 changed files with 85 additions and 69 deletions.
6 changes: 6 additions & 0 deletions config/sync/core.menu.static_menu_link_overrides.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,9 @@ definitions:
weight: 0
expanded: false
enabled: false
user__page:
weight: 10
enabled: false
menu_name: account
parent: ''
expanded: false
2 changes: 1 addition & 1 deletion config/sync/language/en/views.view.cart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ display:
label: Updated
field_service_producer:
label: 'Service provider'
field_service_time_and_location:
field_service_language:
label: Language
empty:
area_text_custom:
Expand Down
2 changes: 1 addition & 1 deletion config/sync/language/sv/views.view.cart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ display:
label: Uppdaterat
field_service_producer:
label: Tjänsteproducent
field_service_time_and_location:
field_service_language:
label: Språk
empty:
area_text_custom:
Expand Down
19 changes: 9 additions & 10 deletions config/sync/views.view.cart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ dependencies:
config:
- core.entity_view_mode.node.view_card_lift
- field.storage.node.field_description
- field.storage.node.field_service_language
- field.storage.node.field_service_producer
- field.storage.node.field_service_time_and_location
- flag.flag.cart
- node.type.service
module:
- entity_print_views
- entity_reference_revisions
- flag
- node
- user
Expand Down Expand Up @@ -626,10 +625,10 @@ display:
multi_type: separator
separator: ', '
field_api_classes: false
field_service_time_and_location:
id: field_service_time_and_location
table: node__field_service_time_and_location
field: field_service_time_and_location
field_service_language:
id: field_service_language
table: node__field_service_language
field: field_service_language
relationship: none
group_type: group
admin_label: ''
Expand Down Expand Up @@ -676,10 +675,10 @@ display:
empty_zero: false
hide_alter_empty: true
click_sort_column: target_id
type: entity_reference_revisions_entity_view
type: entity_reference_label
settings:
view_mode: limited_fields
group_column: ''
link: false
group_column: target_id
group_columns: { }
group_rows: true
delta_limit: 0
Expand Down Expand Up @@ -894,8 +893,8 @@ display:
- 'user.node_grants:view'
- user.permissions
tags:
- 'config:field.storage.node.field_service_language'
- 'config:field.storage.node.field_service_producer'
- 'config:field.storage.node.field_service_time_and_location'
page_1:
id: page_1
display_title: Page
Expand Down
22 changes: 22 additions & 0 deletions public/modules/custom/hel_tpm_general/hel_tpm_general.install
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use Drupal\Core\Config\FileStorage;
use Drupal\Core\Site\Settings;
use Drupal\field\Entity\FieldConfig;
use Drupal\field\Entity\FieldStorageConfig;
use Drupal\menu_link_content\Entity\MenuLinkContent;
use Drupal\hel_tpm_general\PreventMailUtility;
use Drupal\node\Entity\Node;

Expand Down Expand Up @@ -619,6 +620,27 @@ function hel_tpm_general_update_10108(&$sandbox) {
$sandbox['#finished'] = empty($sandbox['max']) ? 1 : ($sandbox['progress'] / $sandbox['max']);
}

/**
* Create My account menu link and translations.
*/
function hel_tpm_general_update_10109(&$sandbox) {
$menu_link = MenuLinkContent::create([
'title' => 'Oma käyttäjätilini',
'link' => ['uri' => 'internal:/user/edit'],
'menu_name' => 'account',
'expanded' => TRUE,
'weight' => -10
]);
$menu_link->save();
$translation = $menu_link->addTranslation('en');
$translation->set('title', 'My account');
$translation->save();

$translation = $menu_link->addTranslation('sv');
$translation->set('title', 'Mitt konto');
$translation->save();
}

/**
* Helper function to migrate service language paragraphs to node field.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,7 @@ footer.footer{
.margin-bottom-one-space {
margin-bottom: $space;
}

.add-gap-3 {
gap: 3px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,6 @@
text-transform: uppercase;
font-size: 12px;
font-weight: 700;
&:nth-child(2),
&:nth-child(3),
&:nth-child(4) {
border-left: 2px solid clr(background-border);
}
}

}
Expand Down Expand Up @@ -181,9 +176,6 @@
text-transform: uppercase;
font-size: 12px;
font-weight: 700;
&:nth-child(2) {
border-left: 2px solid clr(background-border);
}
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -645,4 +645,7 @@ $card-font-small-heading: 15px;
margin-top: auto;
}
}
.prefix {
margin-left: 2px;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@
}
}
}
&:last-child() {
&:last-child {
margin-bottom: 0;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,35 @@
.user-form {
display: flex;
flex-direction: column;
> .js-form-type-textfield {
order: 1;
margin-bottom: $space-three-and-half;
}
.form-actions {
order: 2;
}
> .js-form-type-textfield {
order: 1;
margin-bottom: $space-three-and-half;
}
.form-actions {
order: 2;
}
.form-item {
margin-bottom: $space-double;
&__description {
font-size: 14px;
}
.form-item {
margin-bottom: 0;
&-checkbox {
margin-bottom: $space-one-and-half;
}
}
legend {
font-size: 14px;
font-weight: 600;
}
>.form-item {
margin-bottom: $space-double;
&:last-child {
margin-bottom: 0;
}
}
}
}
.layout-container {
margin: 0;
Expand All @@ -17,28 +39,7 @@
max-width: 528px;
}

.form-item {
margin-bottom: $space-double;
&__description {
font-size: 14px;
}
.form-item {
margin-bottom: 0;
&-checkbox {
margin-bottom: $space-one-and-half;
}
}
legend {
font-size: 14px;
font-weight: 600;
}
>.form-item {
margin-bottom: $space-double;
&:last-child {
margin-bottom: 0;
}
}
}

.field--name-field-password-expiration {
>.form-item {
flex-wrap: wrap;
Expand Down
2 changes: 1 addition & 1 deletion public/themes/custom/palvelumanuaali/dist/css/style.css

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
%}

<div{{ attributes.addClass(classes, 'field__items') }}>
<span class="prefix">(</span>
<span class="prefix">{{" ("}}</span>
{% for item in items %}
<span {{ item.attributes.addClass('language-level') }}>{{ item.content }}</span>
{% if not loop.last %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,9 @@
icon_name: 'speech-bubble-dark-blue',
icon_modifiers: ['small'],
} %}
<div class='languages-wrapper'>
<div class='languages-wrapper display-inline-flex flex-wrap add-gap-3'>
{% for item in items %}
<div{{ item.attributes.addClass('field__item') }}>
{{ item.content }}
{% if not loop.last %}
{{", "}}
{% endif %}
</div>
<div{{ item.attributes.addClass('field__item') }}><span>{{ item.content }}</span>{% if not loop.last %}{{", "}}{% endif %}</div>
{% endfor %}
</div>
</div>
Expand All @@ -78,13 +73,10 @@
icon_name: 'speech-bubble-dark-blue',
icon_modifiers: ['small'],
} %}
<div class='languages-wrapper display-inline-flex flex-wrap'>
<div class='languages-wrapper display-inline-flex flex-wrap add-gap-3'>
{% for item in items %}
<div{{ attributes.addClass(classes, 'field__item') }}>
{{ item.content }}
{% if not loop.last %}
{{", "}}
{% endif %}
<span>{{ item.content }}</span>{% if not loop.last %}{{", "}}{% endif %}
</div>
{% endfor %}
</div>
Expand All @@ -101,13 +93,10 @@
<div class="field__items">
{% endif %}

<div class='languages-wrapper display-inline-flex flex-wrap'>
<div class='languages-wrapper display-inline-flex flex-wrap add-gap-3'>
{% for item in items %}
<div{{ item.attributes.addClass('field__item') }}>
{{ item.content }}
{% if not loop.last %}
{{", "}}
{% endif %}
<span>{{ item.content }}</span>{% if not loop.last %}{{", "}}{% endif %}
</div>
{% endfor %}
</div>
Expand Down

0 comments on commit ae05ccd

Please sign in to comment.