Skip to content
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
18 changes: 18 additions & 0 deletions src/BootstrapAdminUi/assets/styles/_accordion.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*!
* This file is part of the Sylius package.
*
* (c) Sylius Sp. z o.o.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

.accordion {
.accordion-item {
.accordion-header {
&:hover {
background: $gray-100;
}
}
}
}
17 changes: 17 additions & 0 deletions src/BootstrapAdminUi/assets/styles/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,23 @@ $gray-800: #343a40 !default;
$gray-900: #212529 !default;
$black: #000 !default;

$grid-breakpoints: (
xs: 0,
sm: 768px,
md: 992px,
lg: 1200px,
xl: 1400px,
xxl: 2200px
);

$container-max-widths: (
sm: 720px,
md: 960px,
lg: 1140px,
xl: 1320px,
xxl: 1920px
);

$body-color: $gray-900;

$text-secondary: $gray-600;
Expand Down
2 changes: 1 addition & 1 deletion src/BootstrapAdminUi/assets/styles/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
@import "@tabler/core/src/scss/tabler.scss";

@import "body";

@import "accordion";
@import "alert";
@import "datatable";
@import "flashes";
Expand Down
9 changes: 8 additions & 1 deletion src/BootstrapAdminUi/public/app.css

Large diffs are not rendered by default.

9 changes: 8 additions & 1 deletion src/BootstrapAdminUi/public/app.rtl.css

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
'warning': 'tabler:alert-triangle',
} %}

<div class="container-xl mt-3" {{ sylius_test_html_attribute('sylius-flashes-container') }}>
<div class="container-xl" {{ sylius_test_html_attribute('sylius-flashes-container') }}>
{% for type in ['success', 'error', 'info', 'warning'] %}
{% for flash in session.flashbag.get(type) %}
<div
class="sylius alert alert-{{ type == 'error' ? 'danger' : type }}"
class="mt-3 sylius alert alert-{{ type == 'error' ? 'danger' : type }}"
role="alert"
{{ sylius_test_html_attribute('sylius-flash-message') }}
{{ sylius_test_html_attribute('sylius-flash-message-type', type) }}
Expand Down
8 changes: 6 additions & 2 deletions src/BootstrapAdminUi/templates/shared/helper/table.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,15 @@

<tr class="item" {{ sylius_test_html_attribute('row') }} {{ sylius_test_html_attribute('resource-id', row.id) }}>
{% if definition.actionGroups.bulk is defined and definition.getEnabledActions('bulk')|length > 0 %}
<td class="center aligned"><input data-check-all-group="index" class="form-check-input" type="checkbox" value="{{ row.id }}" /></td>
<td class="text-center"><input data-check-all-group="index" class="form-check-input" type="checkbox" value="{{ row.id }}" /></td>
{% endif %}
{% for field in definition.enabledFields|sylius_sort_by('position') %}
<td{% if field.options.vars.td_class is defined %} class="{{ field.options.vars.td_class }}"{% endif %}>
{{ sylius_grid_render_field(grid, field, row) }}
{% if field.name == 'code' %}
<code>{{ sylius_grid_render_field(grid, field, row) }}</code>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if it was regular twig render, then styling of the field should have been done via theme, but guess it's not applicable over here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, interesting comment. For now, I prefer keeping admin-bundle and bootstrap-admin-ui synced.

{% else %}
{{ sylius_grid_render_field(grid, field, row) }}
{% endif %}
</td>
{% endfor %}
{% if definition.actionGroups.item is defined and definition.getEnabledActions('item')|length > 0 %}
Expand Down