Last active
August 29, 2015 13:56
-
-
Save juliensnz/9209155 to your computer and use it in GitHub Desktop.
Example for grid configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
datagrid: | |
job-profile-grid: # grid name | |
options: | |
requireJSModules: | |
- pim/datagrid/state-listener | |
source: # data source | |
type: orm | |
query: | |
select: | |
- j.id | |
- j.code | |
- j.label | |
- j.alias as jobAlias | |
- j.status | |
- j.connector | |
- CONCAT('pim_import_export.status.', j.status) as statusLabel | |
from: | |
- { table: AkeneoBatchBundle:JobInstance, alias: j } | |
# Version plus simple de source : | |
# source: | |
# type: pim_orm | |
# entity: Acme\Bundle\CatalogBundle\Entity\AcmeEntity | |
columns: # Columns for the datagrid | |
code: | |
label: Code | |
label: | |
label: Label | |
alias: | |
label: Job | |
data_name: jobAlias | |
connector: | |
label: Connector | |
status: | |
label: Status | |
type: translateable | |
data_name: statusLabel | |
properties: # properties for actions link | |
id: ~ | |
edit_link: | |
type: url | |
params: | |
- id | |
delete_link: | |
type: url | |
params: | |
- id | |
launch_link: | |
type: url | |
params: | |
- id | |
# other example for properties : | |
# properties: | |
# id: ~ | |
# edit_link: | |
# type: custom_entity_url | |
# route: pim_customentity_edit{customEntityName:acmeEntity} | |
# params: | |
# - id | |
actions: #Actions on each row | |
edit: | |
type: navigate | |
label: Edit | |
icon: edit | |
link: edit_link | |
delete: | |
type: delete | |
label: Delete | |
icon: trash | |
link: delete_link | |
launch: | |
type: navigate | |
label: Launch | |
icon: play | |
link: launch_link | |
rowAction: true # The default action (on row click) | |
sorters: # Sorters | |
columns: | |
code: | |
data_name: j.code | |
label: | |
data_name: j.label | |
alias: | |
data_name: jobAlias | |
connector: | |
data_name: j.connector | |
status: | |
data_name: statusLabel | |
default: | |
code: %oro_datagrid.extension.orm_sorter.class%::DIRECTION_ASC | |
filters: # filters | |
columns: | |
code: | |
type: string | |
data_name: j.code | |
label: | |
type: string | |
data_name: j.label | |
alias: | |
type: choice | |
data_name: j.alias | |
options: | |
field_options: | |
multiple: true | |
connector: | |
type: choice | |
data_name: j.connector | |
options: | |
field_options: | |
multiple: true | |
status: | |
type: choice | |
data_name: j.status | |
options: | |
field_options: | |
multiple: true | |
choices: | |
0: pim_import_export.status.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment