Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ui_suite_bootstrap
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
ui_suite_bootstrap
Commits
cc8278db
Commit
cc8278db
authored
1 year ago
by
Florent Torregrosa
Committed by
Florent Torregrosa
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3359437
by mademo, Grimreaper, pdureau: Field display: respect label inline or above
parent
6ba986f4
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!119
Issue #3359437: Field display: respect label inline or above
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
assets/css/component/field.css
+3
-0
3 additions, 0 deletions
assets/css/component/field.css
templates/overrides/system/field.html.twig
+15
-3
15 additions, 3 deletions
templates/overrides/system/field.html.twig
ui_suite_bootstrap.libraries.yml
+5
-0
5 additions, 0 deletions
ui_suite_bootstrap.libraries.yml
with
23 additions
and
3 deletions
assets/css/component/field.css
0 → 100644
+
3
−
0
View file @
cc8278db
.field--label--inline
::after
{
content
:
":"
;
}
This diff is collapsed.
Click to expand it.
templates/overrides/system/field.html.twig
+
15
−
3
View file @
cc8278db
...
...
@@ -38,18 +38,30 @@
* @ingroup themeable
*/
#}
{{
attach_library
(
'ui_suite_bootstrap/field'
)
}}
{%
set
title_classes
=
[
'field--label'
,
'field--label--'
~
label_display
|
clean_class
,
label_display
==
'visually_hidden'
?
'visually-hidden'
,
label_display
==
'inline'
?
'float-start'
,
label_display
==
'inline'
?
'pe-2'
,
'fw-bold'
,
]
%}
<div
{{
attributes.addClass
(
classes
)
}}
>
{%
set
field_items_attributes
=
create_attribute
(
{
'class'
:
[
'field--items'
,
multiple
and
label_display
==
'inline'
?
'float-start'
,
]
}
)
%}
<div
{{
attributes
}}
>
{%
if
not
label_hidden
%}
<div
{{
title_attributes.addClass
(
title_classes
)
}}
>
{{
label
}}
</div>
{%
endif
%}
<div
class=
"field__items"
>
<div
{{
field_items_attributes
}}
>
{%
for
item
in
items
%}
<div
{{
item.attributes.addClass
(
'field
__
item'
)
}}
>
{{
item.content
}}
</div>
<div
{{
item.attributes.addClass
(
'field
--
item'
)
}}
>
{{
item.content
}}
</div>
{%
endfor
%}
</div>
</div>
This diff is collapsed.
Click to expand it.
ui_suite_bootstrap.libraries.yml
+
5
−
0
View file @
cc8278db
...
...
@@ -45,6 +45,11 @@ example_carousel:
theme
:
assets/css/example/carousel.css
:
{}
field
:
css
:
component
:
assets/css/component/field.css
:
{}
form
:
css
:
component
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment