|
1 | 1 | {% block column_datetime %}
|
2 |
| - {% apply spaceless %} |
3 |
| - {% if builder.generator.bundleConfig.twig.use_localized_date == true -%} |
4 |
| - {{ echo_if (builder.ModelClass ~ '.' ~ column.getter) }} |
5 |
| - {%- if column.localized_date_format is defined -%} |
6 |
| - {{ echo_set('localized_date_format', column.formOptions.localized_date_format) }} |
7 |
| - {%- else -%} |
8 |
| - {{ echo_set('localized_date_format', builder.generator.bundleConfig.twig.localized_date_format) }} |
9 |
| - {%- endif -%} |
10 |
| - {%- if column.localized_time_format is defined -%} |
11 |
| - {{ echo_set('localized_time_format', column.formOptions.localized_datetime_format) }} |
12 |
| - {%- else -%} |
13 |
| - {{ echo_set('localized_time_format', builder.generator.bundleConfig.twig.localized_datetime_format) }} |
14 |
| - {%- endif -%} |
15 |
| - {%- if column.formOptions.format is defined -%} |
16 |
| - {{ echo_set('datetime_format', column.formOptions.format) }} |
17 |
| - {%- else -%} |
18 |
| - {{ echo_set('datetime_format', builder.generator.bundleConfig.twig.datetime_format) }} |
19 |
| - {%- endif -%} |
| 2 | + {% if builder.generator.bundleConfig.twig.use_localized_date == true -%} |
| 3 | + {{ echo_if (builder.ModelClass ~ '.' ~ column.getter) }} |
| 4 | + {%- if column.localized_date_format is defined -%} |
| 5 | + {{ echo_set('localized_date_format', column.formOptions.localized_date_format) }} |
| 6 | + {%- else -%} |
| 7 | + {{ echo_set('localized_date_format', builder.generator.bundleConfig.twig.localized_date_format) }} |
| 8 | + {%- endif -%} |
| 9 | + {%- if column.localized_time_format is defined -%} |
| 10 | + {{ echo_set('localized_time_format', column.formOptions.localized_datetime_format) }} |
| 11 | + {%- else -%} |
| 12 | + {{ echo_set('localized_time_format', builder.generator.bundleConfig.twig.localized_datetime_format) }} |
| 13 | + {%- endif -%} |
| 14 | + {%- if column.formOptions.format is defined -%} |
| 15 | + {{ echo_set('datetime_format', column.formOptions.format) }} |
| 16 | + {%- else -%} |
| 17 | + {{ echo_set('datetime_format', builder.generator.bundleConfig.twig.datetime_format) }} |
| 18 | + {%- endif -%} |
20 | 19 |
|
21 |
| - {{ echo_twig(builder.ModelClass ~ '.' ~ column.getter ~ '|format_datetime(localized_date_format, localized_time_format, pattern=datetime_format)') }} |
22 |
| - {{ echo_endif() }} |
23 |
| - {%- else -%} |
24 |
| - {{ echo_if (builder.ModelClass ~ '.' ~ column.getter) }} |
25 |
| - {% if column.formOptions.format is defined %} |
26 |
| - {{ echo_set('datetime_format', column.formOptions.format) }} |
27 |
| - {% else %} |
28 |
| - {{ echo_set('datetime_format', builder.generator.bundleConfig.twig.datetime_format) }} |
29 |
| - {% endif %} |
| 20 | + {{ echo_twig(builder.ModelClass ~ '.' ~ column.getter ~ '|format_datetime(localized_date_format, localized_time_format, pattern=datetime_format)') }} |
| 21 | + {{ echo_endif() }} |
| 22 | + {%- else -%} |
| 23 | + {{ echo_if (builder.ModelClass ~ '.' ~ column.getter) }} |
| 24 | + {% if column.formOptions.format is defined %} |
| 25 | + {{ echo_set('datetime_format', column.formOptions.format) }} |
| 26 | + {% else %} |
| 27 | + {{ echo_set('datetime_format', builder.generator.bundleConfig.twig.datetime_format) }} |
| 28 | + {% endif %} |
30 | 29 |
|
31 |
| - {{ echo_twig(builder.ModelClass ~ '.' ~ column.getter ~ '|date(datetime_format)') }} |
32 |
| - {{ echo_endif() }} |
33 |
| - {%- endif %} |
34 |
| - {% endapply %} |
| 30 | + {{ echo_twig(builder.ModelClass ~ '.' ~ column.getter ~ '|date(datetime_format)') }} |
| 31 | + {{ echo_endif() }} |
| 32 | + {%- endif %} |
35 | 33 | {% endblock %}
|
0 commit comments