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

IBX-5778: CT translation dropdown is not aligned and its placement is wrong place #798

Merged
merged 2 commits into from
May 24, 2023
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/bundle/Resources/public/scss/_details.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@
}

&__header {
.ibexa-table-header {
justify-content: flex-start;
&--inline-headline {
.ibexa-table-header {
justify-content: flex-start;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,47 @@
{% set global_properties_headline_items %}
{% if languages|length > 1 %}
<form class="form-inline justify-content-end mb-4">
<select class="form-control ibexa-location-language-change">
{% for language in languages %}
<option
value="{{ path('ibexa.content_type.view', {
'contentTypeId': content_type.id,
'contentTypeGroupId': content_type_group.id,
'languageCode': language.languageCode,
'_fragment': constant('Ibexa\\AdminUi\\Tab\\ContentType\\ViewTab::URI_FRAGMENT'),
}) }}"
{% if current_language == language.languageCode %} selected="selected" {% endif %}
>
{{ language.name }}
</option>
{% endfor %}
</select>
{% set choices = languages|map((language) => {
value: path('ibexa.content_type.view', {
'contentTypeId': content_type.id,
'contentTypeGroupId': content_type_group.id,
'languageCode': language.languageCode,
'_fragment': constant('Ibexa\\AdminUi\\Tab\\ContentType\\ViewTab::URI_FRAGMENT'),
}),
label: language.name
}) %}
{% set value = '' %}

{% for language in languages %}
{% if current_language == language.languageCode %}
{% set value = path('ibexa.content_type.view', {
'contentTypeId': content_type.id,
'contentTypeGroupId': content_type_group.id,
'languageCode': language.languageCode,
'_fragment': constant('Ibexa\\AdminUi\\Tab\\ContentType\\ViewTab::URI_FRAGMENT'),
}) %}
{% endif %}
{% endfor %}

{% set source %}
<select class="form-control ibexa-input ibexa-location-language-change">
{% for choice in choices %}
<option
value="{{ choice.value }}"
{% if value == choice.value %}selected="selected"{% endif %}
>
{{ choice.label }}
</option>
{% endfor %}
</select>
{% endset %}

{% include '@ibexadesign/ui/component/dropdown/dropdown.html.twig' with {
source: source,
choices: choices,
value: value,
is_small: true,
} %}
</form>
{% endif %}
{% endset %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="ibexa-details">
{% block details_header %}
{% if headline is defined %}
<div class="ibexa-details__header">
<div class="ibexa-details__header {{ is_inline_headline|default(false) ? 'ibexa-details__header--inline-headline' }}">
{% include '@ibexadesign/ui/component/table/table_header.html.twig' with {
headline,
actions: headline_items|default([])
Expand Down