Skip to content

Commit

Permalink
Improve grids view
Browse files Browse the repository at this point in the history
  • Loading branch information
kulczy authored and GSadee committed May 14, 2024
1 parent d3748e9 commit 4e6f42d
Show file tree
Hide file tree
Showing 26 changed files with 329 additions and 162 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ imports:
- { resource: "@SyliusAdminBundle/Resources/config/app/sylius/sylius_mailer.yml" }
- { resource: "@SyliusAdminBundle/Resources/config/grids/address_log_entry.yml" }
- { resource: "@SyliusAdminBundle/Resources/config/grids/admin_user.yml" }
- { resource: "@SyliusAdminBundle/Resources/config/grids/catalog_promotion.yaml" }
- { resource: "@SyliusAdminBundle/Resources/config/grids/catalog_promotion.yml" }
- { resource: "@SyliusAdminBundle/Resources/config/grids/channel.yml" }
- { resource: "@SyliusAdminBundle/Resources/config/grids/channel_pricing_log_entry.yml" }
- { resource: "@SyliusAdminBundle/Resources/config/grids/country.yml" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ sylius_grid:
sorting:
createdAt: desc
fields:
email:
type: twig
label: sylius.ui.email
sortable: ~
options:
template: "@SyliusAdmin/shared/grid/field/name.html.twig"
firstName:
type: string
label: sylius.ui.first_name
Expand All @@ -20,22 +26,23 @@ sylius_grid:
type: string
label: sylius.ui.username
sortable: ~
email:
type: string
label: sylius.ui.email
sortable: ~
createdAt:
type: datetime
type: twig
label: sylius.ui.registration_date
sortable: ~
options:
format: d-m-Y H:i
template: "@SyliusAdmin/shared/grid/field/date.html.twig"
vars:
th_class: "w-1 text-center"
enabled:
type: twig
label: sylius.ui.enabled
sortable: ~
options:
template: "@SyliusAdmin/shared/grid/field/boolean.html.twig"
vars:
th_class: "w-1 text-center"
td_class: "text-center"
filters:
search:
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,49 +8,68 @@ sylius_grid:
sorting:
code: asc
fields:
code:
type: string
label: sylius.ui.code
priority:
type: twig
label: sylius.ui.priority
sortable: ~
options:
template: "@SyliusAdmin/catalog_promotion/grid/field/priority.html.twig"
vars:
th_class: "w-1 text-center"
td_class: "text-center"
name:
type: string
type: twig
label: sylius.ui.name
sortable: ~
startDate:
options:
template: "@SyliusAdmin/shared/grid/field/name.html.twig"
code:
type: twig
label: sylius.ui.start_date
label: sylius.ui.code
sortable: ~
options:
template: '@SyliusAdmin/catalog_promotion/grid/field/date.html.twig'
endDate:
template: "@SyliusAdmin/shared/grid/field/code.html.twig"
channels:
type: twig
label: sylius.ui.end_date
sortable: ~
label: sylius.ui.channels
options:
template: '@SyliusAdmin/catalog_promotion/grid/field/date.html.twig'
priority:
template: "@SyliusAdmin/shared/grid/field/channels.html.twig"
vars:
th_class: "w-1 text-center"
startDate:
type: twig
label: sylius.ui.priority
label: sylius.ui.start_date
sortable: ~
options:
template: '@SyliusAdmin/catalog_promotion/grid/field/priority.html.twig'
channels:
template: "@SyliusAdmin/shared/grid/field/date.html.twig"
vars:
th_class: "text-center"
endDate:
type: twig
label: sylius.ui.channels
label: sylius.ui.end_date
sortable: ~
options:
template: '@SyliusAdmin/shared/grid/field/channels.html.twig'
template: "@SyliusAdmin/shared/grid/field/date.html.twig"
vars:
th_class: "text-center"
state:
type: twig
label: sylius.ui.state
path: state
options:
template: '@SyliusAdmin/catalog_promotion/grid/field/state.html.twig'
template: "@SyliusAdmin/catalog_promotion/grid/field/state.html.twig"
vars:
th_class: "w-1 text-center"
td_class: "text-center"
enabled:
type: twig
label: sylius.ui.enabled
sortable: ~
options:
template: "@SyliusAdmin/shared/grid/field/boolean.html.twig"
vars:
th_class: "w-1 text-center"
td_class: "text-center"
filters:
search:
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ sylius_grid:
label: sylius.ui.code
sortable: code
options:
template: "@SyliusAdmin/channel/grid/field/code.html.twig"
template: "@SyliusAdmin/shared/grid/field/code.html.twig"
themeName:
type: twig
label: sylius.ui.theme
Expand All @@ -33,6 +33,8 @@ sylius_grid:
sortable: ~
options:
template: "@SyliusAdmin/shared/grid/field/boolean.html.twig"
vars:
th_class: "w-1 text-center"
filters:
search:
type: string
Expand Down
12 changes: 8 additions & 4 deletions src/Sylius/Bundle/AdminBundle/Resources/config/grids/country.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,27 @@ sylius_grid:
sorting:
code: asc
fields:
code:
type: string
label: sylius.ui.code
sortable: ~
name:
type: twig
label: sylius.ui.name
path: .
sortable: code
options:
template: "@SyliusAdmin/country/grid/field/name.html.twig"
code:
type: twig
label: sylius.ui.code
sortable: ~
options:
template: "@SyliusAdmin/shared/grid/field/code.html.twig"
enabled:
type: twig
label: sylius.ui.enabled
sortable: ~
options:
template: "@SyliusAdmin/shared/grid/field/boolean.html.twig"
vars:
th_class: "w-1 text-center"
filters:
code:
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@ sylius_grid:
code: asc
fields:
code:
type: string
type: twig
label: sylius.ui.code
sortable: ~
options:
template: "@SyliusAdmin/shared/grid/field/code.html.twig"
vars:
th_class: "w-1 text-center"
name:
type: string
label: sylius.ui.name
Expand Down
22 changes: 15 additions & 7 deletions src/Sylius/Bundle/AdminBundle/Resources/config/grids/customer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,44 @@ sylius_grid:
sorting:
createdAt: desc
fields:
firstName:
type: string
label: sylius.ui.first_name
email:
type: twig
label: sylius.ui.email
sortable: ~
options:
template: "@SyliusAdmin/shared/grid/field/name.html.twig"
lastName:
type: string
label: sylius.ui.last_name
sortable: ~
email:
firstName:
type: string
label: sylius.ui.email
label: sylius.ui.first_name
sortable: ~
createdAt:
type: datetime
type: twig
label: sylius.ui.registration_date
sortable: ~
options:
format: d-m-Y H:i
template: "@SyliusAdmin/shared/grid/field/date.html.twig"
vars:
th_class: "w-1 text-center"
enabled:
type: twig
label: sylius.ui.enabled
path: user?.enabled
options:
template: "@SyliusAdmin/shared/grid/field/boolean.html.twig"
vars:
th_class: "w-1 text-center"
verified:
type: twig
label: sylius.ui.verified
path: user?.verified
options:
template: "@SyliusAdmin/shared/grid/field/boolean.html.twig"
vars:
th_class: "w-1 text-center"
filters:
search:
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,22 @@ sylius_grid:
sorting:
name: asc
fields:
code:
type: string
label: sylius.ui.code
sortable: ~
name:
type: string
type: twig
label: sylius.ui.name
sortable: ~
options:
template: "@SyliusAdmin/shared/grid/field/name.html.twig"
vars:
th_class: "w-75"
code:
type: twig
label: sylius.ui.code
sortable: ~
options:
template: "@SyliusAdmin/shared/grid/field/code.html.twig"
vars:
th_class: "w-25"
filters:
search:
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,11 @@ sylius_grid:
enabled: false
sortable: ~
sourceCurrency:
type: twig
type: string
label: sylius.ui.source_currency
path: .
options:
template: "@SyliusAdmin/ExchangeRate/Grid/Field/sourceCurrencyName.html.twig"
targetCurrency:
type: twig
type: string
label: sylius.ui.target_currency
path: .
options:
template: "@SyliusAdmin/ExchangeRate/Grid/Field/targetCurrencyName.html.twig"
ratio:
type: string
label: sylius.ui.ratio
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,15 @@ sylius_grid:
label: sylius.ui.name
options:
template: "@SyliusAdmin/inventory/grid/field/name.html.twig"
vars:
th_class: "w-75"
code:
type: string
type: twig
label: sylius.ui.code
options:
template: "@SyliusAdmin/shared/grid/field/code.html.twig"
vars:
th_class: "w-25"
inventory:
type: twig
path: .
Expand Down
10 changes: 6 additions & 4 deletions src/Sylius/Bundle/AdminBundle/Resources/config/grids/locale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,19 @@ sylius_grid:
sorting:
code: asc
fields:
code:
type: string
label: sylius.ui.code
sortable: ~
name:
type: twig
label: sylius.ui.name
path: .
sortable: code
options:
template: "@SyliusAdmin/locale/grid/field/name.html.twig"
code:
type: twig
label: sylius.ui.code
sortable: ~
options:
template: "@SyliusAdmin/shared/grid/field/code.html.twig"
filters:
code:
type: string
Expand Down

0 comments on commit 4e6f42d

Please sign in to comment.