-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
344 additions
and
34 deletions.
There are no files selected for viewing
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"> | ||
<services> | ||
<service id="sonata.templates.twig_intl.extension" class="Twig\Extra\Intl\IntlExtension"> | ||
<tag name="twig.extension"/> | ||
</service> | ||
</services> | ||
</container> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{# | ||
This file is part of the Sonata package. | ||
(c) Thomas Rabaix <[email protected]> | ||
For the full copyright and license information, please view the LICENSE | ||
file that was distributed with this source code. | ||
#} | ||
|
||
{%- apply spaceless %} | ||
{%- if value is null -%} | ||
| ||
{%- else -%} | ||
{% set currency = field_description.options.currency %} | ||
{% set attributes = field_description.options.attributes|default({}) %} | ||
{% set locale = field_description.options.locale|default(null) %} | ||
|
||
{{ value|format_currency(currency, attributes, locale) }} | ||
{%- endif -%} | ||
{% endapply -%} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{# | ||
This file is part of the Sonata package. | ||
(c) Thomas Rabaix <[email protected]> | ||
For the full copyright and license information, please view the LICENSE | ||
file that was distributed with this source code. | ||
#} | ||
|
||
{%- apply spaceless %} | ||
{%- if value is empty -%} | ||
| ||
{%- else -%} | ||
{% set pattern = field_description.options.pattern|default('') %} | ||
{% set calendar = field_description.options.calendar|default('') %} | ||
{% set locale = field_description.options.locale|default(null) %} | ||
{% set timezone = field_description.options.timezone|default(null) %} | ||
{% set dateType = field_description.options.dateType|default(null) %} | ||
|
||
<time datetime="{{ value|date('Y-m-d', 'UTC') }}" title="{{ value|date('Y-m-d', 'UTC') }}"> | ||
{{ value|format_date(dateType, pattern, timezone, calendar, locale) }} | ||
</time> | ||
{%- endif -%} | ||
{% endapply -%} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{# | ||
This file is part of the Sonata package. | ||
(c) Thomas Rabaix <[email protected]> | ||
For the full copyright and license information, please view the LICENSE | ||
file that was distributed with this source code. | ||
#} | ||
|
||
{%- apply spaceless %} | ||
{%- if value is empty -%} | ||
| ||
{%- else -%} | ||
{% set pattern = field_description.options.pattern|default('') %} | ||
{% set calendar = field_description.options.calendar|default('') %} | ||
{% set locale = field_description.options.locale|default(null) %} | ||
{% set timezone = field_description.options.timezone|default(null) %} | ||
{% set dateType = field_description.options.dateType|default(null) %} | ||
{% set timeType = field_description.options.timeType|default(null) %} | ||
|
||
<time datetime="{{ value|date('c', 'UTC') }}" title="{{ value|date('c', 'UTC') }}"> | ||
{{ value|format_datetime(dateType, timeType, pattern, timezone, calendar, locale) }} | ||
</time> | ||
{%- endif -%} | ||
{% endapply -%} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{# | ||
This file is part of the Sonata package. | ||
(c) Thomas Rabaix <[email protected]> | ||
For the full copyright and license information, please view the LICENSE | ||
file that was distributed with this source code. | ||
#} | ||
|
||
{%- apply spaceless %} | ||
{%- if value is null -%} | ||
| ||
{%- else -%} | ||
{% set attributes = field_description.options.attributes|default({}) %} | ||
{% set locale = field_description.options.locale|default(null) %} | ||
{% set type = field_description.options.type|default('default') %} | ||
|
||
{{ value | format_number(attributes, 'decimal', type, locale) }} | ||
{%- endif -%} | ||
{% endapply -%} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{# | ||
This file is part of the Sonata package. | ||
(c) Thomas Rabaix <[email protected]> | ||
For the full copyright and license information, please view the LICENSE | ||
file that was distributed with this source code. | ||
#} | ||
|
||
{%- apply spaceless %} | ||
{%- if value is null -%} | ||
| ||
{%- else -%} | ||
{% set attributes = field_description.options.attributes|default({}) %} | ||
{% set locale = field_description.options.locale|default(null) %} | ||
{% set type = field_description.options.type|default('default') %} | ||
|
||
{{ value | format_number(attributes, 'percent', type, locale) }} | ||
{%- endif -%} | ||
{% endapply -%} |
12 changes: 12 additions & 0 deletions
12
src/Resources/views/CRUD/Intl/history_revision_timestamp.html.twig
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{# | ||
This file is part of the Sonata package. | ||
(c) Thomas Rabaix <[email protected]> | ||
For the full copyright and license information, please view the LICENSE | ||
file that was distributed with this source code. | ||
#} | ||
|
||
{%- include '@SonataAdmin/CRUD/Intl/display_datetime.html.twig' with { value: revision.timestamp } -%} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{# | ||
This file is part of the Sonata package. | ||
(c) Thomas Rabaix <[email protected]> | ||
For the full copyright and license information, please view the LICENSE | ||
file that was distributed with this source code. | ||
#} | ||
|
||
{% extends admin.getTemplate('base_list_field') %} | ||
|
||
{% block field%} | ||
{%- include '@SonataAdmin/CRUD/Intl/display_currency.html.twig' -%} | ||
{% endblock %} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{# | ||
This file is part of the Sonata package. | ||
(c) Thomas Rabaix <[email protected]> | ||
For the full copyright and license information, please view the LICENSE | ||
file that was distributed with this source code. | ||
#} | ||
|
||
{% extends admin.getTemplate('base_list_field') %} | ||
|
||
{% block field %} | ||
{%- include '@SonataAdmin/CRUD/Intl/display_date.html.twig' -%} | ||
{% endblock %} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{# | ||
This file is part of the Sonata package. | ||
(c) Thomas Rabaix <[email protected]> | ||
For the full copyright and license information, please view the LICENSE | ||
file that was distributed with this source code. | ||
#} | ||
|
||
{% extends admin.getTemplate('base_list_field') %} | ||
|
||
{% block field %} | ||
{%- include '@SonataAdmin/CRUD/Intl/display_datetime.html.twig' -%} | ||
{% endblock %} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{# | ||
This file is part of the Sonata package. | ||
(c) Thomas Rabaix <[email protected]> | ||
For the full copyright and license information, please view the LICENSE | ||
file that was distributed with this source code. | ||
#} | ||
|
||
{% extends admin.getTemplate('base_list_field') %} | ||
|
||
{% block field %} | ||
{%- include '@SonataAdmin/CRUD/Intl/display_decimal.html.twig' -%} | ||
{% endblock %} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{# | ||
This file is part of the Sonata package. | ||
(c) Thomas Rabaix <[email protected]> | ||
For the full copyright and license information, please view the LICENSE | ||
file that was distributed with this source code. | ||
#} | ||
|
||
{% extends admin.getTemplate('base_list_field') %} | ||
|
||
{% block field %} | ||
{%- include '@SonataAdmin/CRUD/Intl/display_percent.html.twig' -%} | ||
{% endblock %} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{# | ||
This file is part of the Sonata package. | ||
(c) Thomas Rabaix <[email protected]> | ||
For the full copyright and license information, please view the LICENSE | ||
file that was distributed with this source code. | ||
#} | ||
|
||
{% extends '@SonataAdmin/CRUD/base_show_field.html.twig' %} | ||
|
||
{% block field %} | ||
{%- include '@SonataAdmin/CRUD/Intl/display_currency.html.twig' -%} | ||
{% endblock %} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{# | ||
This file is part of the Sonata package. | ||
(c) Thomas Rabaix <[email protected]> | ||
For the full copyright and license information, please view the LICENSE | ||
file that was distributed with this source code. | ||
#} | ||
|
||
{% extends '@SonataAdmin/CRUD/base_show_field.html.twig' %} | ||
|
||
{% block field %} | ||
{%- include '@SonataAdmin/CRUD/Intl/display_date.html.twig' -%} | ||
{% endblock %} |
Oops, something went wrong.