Skip to content
Open
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
17 changes: 9 additions & 8 deletions src/bundle/Resources/public/scss/_tables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -209,14 +209,6 @@
width: 70%;
}

&--content-center {
text-align: center;

.ibexa-input--checkbox {
margin-bottom: 0;
}
}

.ibexa-input--radio {
vertical-align: middle;
}
Expand All @@ -233,6 +225,15 @@
justify-content: flex-end;
}

&__cell-center-wrapper {
display: flex;
justify-content: center;

.ibexa-input--checkbox {
margin-bottom: 0;
}
}

&__cell-link,
&__cell-link:hover {
color: $ibexa-color-dark;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
{%- if has_action_btns|default(false) %} ibexa-table__cell--has-action-btns{% endif -%}
{%- if has_icon|default(false) %} ibexa-table__cell--has-icon{% endif -%}
{%- if is_close_left|default(false) %} ibexa-table__cell--close-left {% endif %}
{%- if center_content|default(false) %} ibexa-table__cell--content-center {% endif %}
{{ class|default('') -}}"
{{ html.attributes(attr|default({})) }}
>
Expand All @@ -18,6 +17,10 @@
{{- table_macros.conditional_escape(content, raw|default(false)) -}}
{%- endblock -%}
</div>
{%- elseif center_content|default(false) -%}
<div class="ibexa-table__cell-center-wrapper">
{{- table_macros.conditional_escape(content, raw|default(false)) -}}
</div>
{%- else -%}
{{- table_macros.conditional_escape(content, raw|default(false)) -}}
{%- endif -%}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
>
{% block body_row_cells %}
{% set next_is_close_left = false %}
{% for body_col in body_row_cols %}
{% for index, body_col in body_row_cols %}
{% include '@ibexadesign/ui/component/table/table_body_cell.html.twig' with {
has_checkbox: body_col.has_checkbox|default(false),
has_action_btns: body_col.has_action_btns|default(false),
has_icon: body_col.has_icon|default(false),
is_close_left: body_col.is_close_left is defined ? body_col.is_close_left : next_is_close_left,
is_close_left: body_col.is_close_left is defined ? body_col.is_close_left : next_is_close_left and index === 1,
center_content: body_col.center_content|default(false),
content: body_col.content,
raw: body_col.raw|default(false),
Expand Down
Loading