Skip to content

Latest commit

 

History

History
71 lines (46 loc) · 2.29 KB

File metadata and controls

71 lines (46 loc) · 2.29 KB

List view

There are several options in the list, which can be accessed via Events.

1. List transformer

img.png

Configuration here: List transformer - Type transformer for lists

2. Overwriting the values for startDate and endDate

The usual values for startDate and endDate are as follows:

<property name="startDate" visibility="no" translation="sulu_event.start_date" type="datetime">
    <field-name>startDate</field-name>
    <entity-name>%sulu.model.event.class%</entity-name>
</property>

<property name="endDate" visibility="no" translation="sulu_event.end_date" type="datetime">
    <field-name>endDate</field-name>
    <entity-name>%sulu.model.event.class%</entity-name>
</property>

IMPORTANT: These are overwritten in the default configuration (events.xml) of this bundle to allow for greater flexibility. If the above values are required, the Resouces/config/lists/events.xml file contained in the bundle can be copied to config/lists/events.xml and adjusted accordingly.

In the SuluEventBundle, the xml has been adjusted so that the date values can be adjusted: The first two properties are necessary so that startDate/endDate can be processed correctly.

Configuration

The configuration can be adjusted as follows:

# config/packages/sulu_event.yaml
sulu_event:
    list_date_format: “time_labels”  # “time_labels”, “clock_format”, “default”

Options for list_date_format:

default: Date; if the time is 00:00, it is not displayed

img.png

time_labels: Labels such as morning, afternoon

img.png

clock_format: the date is displayed in the first field, the time(s) in the second field

img.png

Date formatting

The format of date information is handled by locale strings. Default:

sulu_event:
    # Formats
    date_format: 'm/d/Y'
    datetime_format: 'm/d/Y h:i A'

Publish state indicator

The list shows the publish state with the indicator of SuluAdminExtrasBundle (list transformer publish_state_indicator, see its documentation publish_state). Without that bundle the transformer type is unknown and the column shows plain text.