mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 09:02:12 +00:00
[Composer][Locale] Add SonataIntlBundle and localized date in templates
This commit is contained in:
parent
5ad9a0c94e
commit
59f3ffe2bd
54 changed files with 148 additions and 82 deletions
|
|
@ -76,7 +76,8 @@
|
|||
"willdurand/hateoas-bundle": "^0.4|^1.0",
|
||||
"winzou/state-machine-bundle": "~0.2",
|
||||
"zendframework/zend-hydrator": "^1.0|^2.0",
|
||||
"zendframework/zend-stdlib": "^2.0|^3.0"
|
||||
"zendframework/zend-stdlib": "^2.0|^3.0",
|
||||
"sonata-project/intl-bundle": "^2.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"akeneo/phpspec-skip-example-extension": "~1.2",
|
||||
|
|
|
|||
72
composer.lock
generated
72
composer.lock
generated
|
|
@ -4,8 +4,8 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"hash": "c146d059e81a758b4c3fae5bbae7e244",
|
||||
"content-hash": "4428c9cc3d8aa00241751656a74b7310",
|
||||
"hash": "fd293c1becb16e2a9f67fa857d74b3c9",
|
||||
"content-hash": "1b4152528e213820c9e8570115df0d1e",
|
||||
"packages": [
|
||||
{
|
||||
"name": "behat/transliterator",
|
||||
|
|
@ -6773,6 +6773,70 @@
|
|||
],
|
||||
"time": "2016-04-22 13:54:51"
|
||||
},
|
||||
{
|
||||
"name": "sonata-project/intl-bundle",
|
||||
"version": "2.2.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sonata-project/SonataIntlBundle.git",
|
||||
"reference": "d49bb8156466a9396e186610fe19d62a50c76202"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sonata-project/SonataIntlBundle/zipball/d49bb8156466a9396e186610fe19d62a50c76202",
|
||||
"reference": "d49bb8156466a9396e186610fe19d62a50c76202",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"symfony/dependency-injection": "~2.2|~3.0",
|
||||
"symfony/http-kernel": "~2.2|~3.0",
|
||||
"symfony/intl": "^2.3.21|~3.0",
|
||||
"symfony/templating": "~2.2|~3.0",
|
||||
"twig/twig": "~1.12"
|
||||
},
|
||||
"require-dev": {
|
||||
"matthiasnoback/symfony-dependency-injection-test": "^0.7.6",
|
||||
"sonata-project/user-bundle": "~2.2",
|
||||
"symfony/phpunit-bridge": "~2.7|~3.0",
|
||||
"symfony/security": "~2.2|~3.0",
|
||||
"symfony/security-acl": "~2.2|~3.0"
|
||||
},
|
||||
"type": "symfony-bundle",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Sonata\\IntlBundle\\": ""
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sonata Community",
|
||||
"homepage": "https://github.com/sonata-project/SonataIntlBundle/contributors"
|
||||
},
|
||||
{
|
||||
"name": "Thomas Rabaix",
|
||||
"email": "thomas.rabaix@sonata-project.org"
|
||||
}
|
||||
],
|
||||
"description": "Symfony SonataIntlBundle",
|
||||
"homepage": "https://sonata-project.org/bundles/intl",
|
||||
"keywords": [
|
||||
"date",
|
||||
"intl",
|
||||
"number",
|
||||
"sonata",
|
||||
"time"
|
||||
],
|
||||
"time": "2016-02-20 16:29:57"
|
||||
},
|
||||
{
|
||||
"name": "stof/doctrine-extensions-bundle",
|
||||
"version": "v1.2.2",
|
||||
|
|
@ -7086,12 +7150,12 @@
|
|||
"version": "1.2.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony-cmf/CreateBundle.git",
|
||||
"url": "https://github.com/symfony-cmf/create-bundle.git",
|
||||
"reference": "86a3ade0210bc30b304f9d992ff21c403681d7f3"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony-cmf/CreateBundle/zipball/86a3ade0210bc30b304f9d992ff21c403681d7f3",
|
||||
"url": "https://api.github.com/repos/symfony-cmf/create-bundle/zipball/86a3ade0210bc30b304f9d992ff21c403681d7f3",
|
||||
"reference": "86a3ade0210bc30b304f9d992ff21c403681d7f3",
|
||||
"shasum": ""
|
||||
},
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<div class="content">
|
||||
<a href="{{ path('sylius_admin_customer_update', {'id': customer.id}) }}" class="header">{{ customer.fullName }}</a>
|
||||
<div class="meta">
|
||||
<span class="date">{{ 'sylius.ui.customer_since'|trans }} {{ customer.createdAt|date }}.</span>
|
||||
<span class="date">{{ 'sylius.ui.customer_since'|trans }} {{ customer.createdAt|format_date }}.</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="extra content">
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<div class="content">
|
||||
{{ 'sylius.ui.order'|trans }} #{{ order.number }}
|
||||
<div class="sub header">
|
||||
{{ order.completedAt|date }}
|
||||
{{ order.completedAt|format_date }}
|
||||
|
||||
{{ label.default(('sylius.ui.'~order.state)|trans) }}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{% if attribute.attribute.configuration['format'] is defined %}
|
||||
{{ attribute.value|date(attribute.attribute.configuration['format']) }}
|
||||
{{ attribute.value|format_date(attribute.attribute.configuration['format']) }}
|
||||
{% else %}
|
||||
{{ attribute.value|date }}
|
||||
{{ attribute.value|format_date }}
|
||||
{% endif %}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{% if attribute.attribute.configuration['format'] is defined %}
|
||||
{{ attribute.value|date(attribute.attribute.configuration['format']) }}
|
||||
{{ attribute.value|format_date(attribute.attribute.configuration['format']) }}
|
||||
{% else %}
|
||||
{{ attribute.value|date }}
|
||||
{{ attribute.value|format_date }}
|
||||
{% endif %}
|
||||
|
|
|
|||
|
|
@ -95,6 +95,7 @@ class Kernel extends HttpKernel
|
|||
new \Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
|
||||
new \Symfony\Bundle\TwigBundle\TwigBundle(),
|
||||
|
||||
new \Sonata\IntlBundle\SonataIntlBundle(),
|
||||
new \Bazinga\Bundle\HateoasBundle\BazingaHateoasBundle(),
|
||||
new \FOS\OAuthServerBundle\FOSOAuthServerBundle(),
|
||||
new \FOS\RestBundle\FOSRestBundle(),
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<url>
|
||||
<loc>{{ url.localization }}</loc>
|
||||
{% if url.lastModification is defined %}
|
||||
<lastmod>{{ url.lastModification|date("c") }}</lastmod>
|
||||
<lastmod>{{ url.lastModification|format_date("c") }}</lastmod>
|
||||
{% endif %}
|
||||
{% if url.changeFrequency is defined %}
|
||||
<changefreq>{{ url.changeFrequency }}</changefreq>
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@
|
|||
{% endblock %}
|
||||
<hr>
|
||||
<footer>
|
||||
<p>© <a href="http://Sylius.org">Sylius.org</a>, 2011 - {{ 'now'|date('Y') }}.</p>
|
||||
<p>© <a href="http://Sylius.org">Sylius.org</a>, 2011 - {{ 'now'|format_date('Y') }}.</p>
|
||||
</footer>
|
||||
</div>
|
||||
{% block sylius_javascripts %}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
</h1>
|
||||
<div class="ui padded segment" id="items">
|
||||
<div class="ui list">
|
||||
<div class="item"><strong>{{ 'sylius.ui.placed_at'|trans }} {{ order.createdAt|date() }}</strong></div>
|
||||
<div class="item"><strong>{{ 'sylius.ui.placed_at'|trans }} {{ order.createdAt|format_date() }}</strong></div>
|
||||
<div class="ui hidden divider"></div>
|
||||
<div class="item" id="number">{{ 'sylius.ui.number'|trans }} <strong>#{{ order.number }}</strong></div>
|
||||
<div class="item">{{ 'sylius.ui.state'|trans }} <strong>{{ label.default(('sylius.ui.'~order.state)|trans) }}</strong></div>
|
||||
|
|
|
|||
|
|
@ -4,5 +4,5 @@
|
|||
<strong>{{ customer.fullName|upper }}</strong><br>
|
||||
{{ 'sylius.ui.customer_id'|trans }}: {{ app.user.id }}<br>
|
||||
{{ 'sylius.ui.email'|trans }}: {{ customer.email }}<br>
|
||||
{{ 'sylius.ui.customer_since'|trans }} {{ app.user.createdAt|date() }}
|
||||
{{ 'sylius.ui.customer_since'|trans }} {{ app.user.createdAt|format_date() }}
|
||||
{% endblock %}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
<td>{% if channel.defaultCurrency is not null %}{{ channel.defaultCurrency.code }}{% endif %}</td>
|
||||
<td>{{ channel.themeName }}</td>
|
||||
<td>{{ misc.state_label(channel.enabled) }}</td>
|
||||
<td>{{ channel.updatedAt|date }}</td>
|
||||
<td>{{ channel.updatedAt|format_date }}</td>
|
||||
<td>
|
||||
<div class="pull-right">
|
||||
{{ buttons.edit(path('sylius_backend_channel_update', {'id': channel.id})) }}
|
||||
|
|
|
|||
|
|
@ -27,9 +27,9 @@
|
|||
{{ block.publishable ? 'sylius.ui.yes'|trans : 'sylius.ui.no'|trans }}
|
||||
</span>
|
||||
</td>
|
||||
<td>{{ block.publishStartDate is empty ? '-' : block.publishStartDate|date }}</td>
|
||||
<td>{{ block.publishStartDate is empty ? '-' : block.publishStartDate|date }}</td>
|
||||
<td>{{ block.updatedAt|date }}</td>
|
||||
<td>{{ block.publishStartDate is empty ? '-' : block.publishStartDate|format_date }}</td>
|
||||
<td>{{ block.publishStartDate is empty ? '-' : block.publishStartDate|format_date }}</td>
|
||||
<td>{{ block.updatedAt|format_date }}</td>
|
||||
<td>
|
||||
<div class="pull-right">
|
||||
{{ buttons.edit(path('sylius_backend_imagine_block_update', {'id': block.id})) }}
|
||||
|
|
|
|||
|
|
@ -27,9 +27,9 @@
|
|||
{{ block.publishable ? 'sylius.ui.yes'|trans : 'sylius.ui.no'|trans }}
|
||||
</span>
|
||||
</td>
|
||||
<td>{{ block.publishStartDate is empty ? '-' : block.publishStartDate|date }}</td>
|
||||
<td>{{ block.publishStartDate is empty ? '-' : block.publishStartDate|date }}</td>
|
||||
<td>{{ block.updatedAt|date }}</td>
|
||||
<td>{{ block.publishStartDate is empty ? '-' : block.publishStartDate|format_date }}</td>
|
||||
<td>{{ block.publishStartDate is empty ? '-' : block.publishStartDate|format_date }}</td>
|
||||
<td>{{ block.updatedAt|format_date }}</td>
|
||||
<td>
|
||||
<div class="pull-right">
|
||||
{{ buttons.edit(path('sylius_backend_simple_block_update', {'id': block.id})) }}
|
||||
|
|
|
|||
|
|
@ -27,9 +27,9 @@
|
|||
{{ block.publishable ? 'sylius.ui.yes'|trans : 'sylius.ui.no'|trans }}
|
||||
</span>
|
||||
</td>
|
||||
<td>{{ block.publishStartDate is empty ? '-' : block.publishStartDate|date }}</td>
|
||||
<td>{{ block.publishStartDate is empty ? '-' : block.publishStartDate|date }}</td>
|
||||
<td>{{ block.updatedAt|date }}</td>
|
||||
<td>{{ block.publishStartDate is empty ? '-' : block.publishStartDate|format_date }}</td>
|
||||
<td>{{ block.publishStartDate is empty ? '-' : block.publishStartDate|format_date }}</td>
|
||||
<td>{{ block.updatedAt|format_date }}</td>
|
||||
<td>
|
||||
<div class="pull-right">
|
||||
{{ buttons.edit(path('sylius_backend_slideshow_block_update', {'id': block.id})) }}
|
||||
|
|
|
|||
|
|
@ -27,9 +27,9 @@
|
|||
{{ block.publishable ? 'sylius.ui.yes'|trans : 'sylius.ui.no'|trans }}
|
||||
</span>
|
||||
</td>
|
||||
<td>{{ block.publishStartDate is empty ? '-' : block.publishStartDate|date }}</td>
|
||||
<td>{{ block.publishStartDate is empty ? '-' : block.publishStartDate|date }}</td>
|
||||
<td>{{ block.updatedAt|date }}</td>
|
||||
<td>{{ block.publishStartDate is empty ? '-' : block.publishStartDate|format_date }}</td>
|
||||
<td>{{ block.publishStartDate is empty ? '-' : block.publishStartDate|format_date }}</td>
|
||||
<td>{{ block.updatedAt|format_date }}</td>
|
||||
<td>
|
||||
<div class="pull-right">
|
||||
{{ buttons.edit(path('sylius_backend_string_block_update', {'id': block.id})) }}
|
||||
|
|
|
|||
|
|
@ -26,8 +26,8 @@
|
|||
{{ menu.publishable ? 'sylius.ui.yes'|trans : 'sylius.ui.no'|trans }}
|
||||
</span>
|
||||
</td>
|
||||
<td>{{ menu.publishStartDate is empty ? '-' : menu.publishStartDate|date }}</td>
|
||||
<td>{{ menu.publishStartDate is empty ? '-' : menu.publishStartDate|date }}</td>
|
||||
<td>{{ menu.publishStartDate is empty ? '-' : menu.publishStartDate|format_date }}</td>
|
||||
<td>{{ menu.publishStartDate is empty ? '-' : menu.publishStartDate|format_date }}</td>
|
||||
<td>
|
||||
<div class="pull-right">
|
||||
{{ buttons.edit(path('sylius_backend_menu_update', {'id': menu.id})) }}
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@
|
|||
{{ menu.publishable ? 'sylius.ui.yes'|trans : 'sylius.ui.no'|trans }}
|
||||
</span>
|
||||
</td>
|
||||
<td>{{ menu.publishStartDate is empty ? '-' : menu.publishStartDate|date }}</td>
|
||||
<td>{{ menu.publishStartDate is empty ? '-' : menu.publishStartDate|date }}</td>
|
||||
<td>{{ menu.publishStartDate is empty ? '-' : menu.publishStartDate|format_date }}</td>
|
||||
<td>{{ menu.publishStartDate is empty ? '-' : menu.publishStartDate|format_date }}</td>
|
||||
<td>
|
||||
<div class="pull-right">
|
||||
{{ buttons.edit(path('sylius_backend_menu_node_update', {'id': menu.id})) }}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
<th>{{ sylius_resource_sort('publishable', 'sylius.page.publishable'|trans) }}</th>
|
||||
<th>{{ sylius_resource_sort('publishStartDate', 'sylius.ui.start_date'|trans) }}</th>
|
||||
<th>{{ sylius_resource_sort('publishEndDate', 'sylius.ui.end_date'|trans) }}</th>
|
||||
<th>{{ sylius_resource_sort('routes', 'sylius.ui.routes'|trans) }}</th>
|
||||
<th>{{ sylius_resource_sort('routes', 'sylius.ui.routes'|trans) }}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
|
@ -27,8 +27,8 @@
|
|||
{{ page.publishable ? 'sylius.ui.yes'|trans : 'sylius.ui.no'|trans }}
|
||||
</span>
|
||||
</td>
|
||||
<td>{{ page.publishStartDate is empty ? '-' : page.publishStartDate|date }}</td>
|
||||
<td>{{ page.publishStartDate is empty ? '-' : page.publishStartDate|date }}</td>
|
||||
<td>{{ page.publishStartDate is empty ? '-' : page.publishStartDate|format_date }}</td>
|
||||
<td>{{ page.publishStartDate is empty ? '-' : page.publishStartDate|format_date }}</td>
|
||||
<td>
|
||||
{% if page.routes is not empty %}
|
||||
<ul>
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@
|
|||
{{ promotion_coupon.used }}
|
||||
</span>
|
||||
</td>
|
||||
<td>{{ promotion_coupon.expiresAt is null ? '-' : promotion_coupon.expiresAt|date }}</td>
|
||||
<td>{{ promotion_coupon.expiresAt is null ? '-' : promotion_coupon.expiresAt|format_date }}</td>
|
||||
<td>
|
||||
<div class="pull-right">
|
||||
{{ buttons.edit(path('sylius_backend_promotion_coupon_update', {'promotionId': promotion.id, 'id': promotion_coupon.id})) }}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
{{ currency.enabled ? 'sylius.ui.yes'|trans : 'sylius.ui.no'|trans }}
|
||||
</span>
|
||||
</td>
|
||||
<td>{{ currency.updatedAt|date }}</td>
|
||||
<td>{{ currency.updatedAt|format_date }}</td>
|
||||
<td>
|
||||
<div class="pull-right">
|
||||
{{ buttons.edit(path('sylius_backend_currency_update', {'id': currency.id})) }}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
<td><a href="{{ path('sylius_backend_customer_show', {'id': customer.id}) }}">{{ customer.email }}</a></td>
|
||||
<td>
|
||||
{% if customer.user is not null %}
|
||||
{{ customer.user.createdAt|date('d-m-Y H:i') }}
|
||||
{{ customer.user.createdAt|format_date('d-m-Y H:i') }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@
|
|||
{% if customer.user is not null and customer.user.lastLogin %}
|
||||
<tr>
|
||||
<td><strong>{{ 'sylius.ui.last_login'|trans }}</strong></td>
|
||||
<td>{{ customer.user.lastLogin|date }}</td>
|
||||
<td>{{ customer.user.lastLogin|format_date }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
<tr>
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
<td>
|
||||
{{ misc.state_label(email.enabled) }}
|
||||
</td>
|
||||
<td>{{ email.updatedAt|date }}</td>
|
||||
<td>{{ email.updatedAt|format_date }}</td>
|
||||
<td>
|
||||
<div class="pull-right">
|
||||
{{ buttons.edit(path('sylius_backend_email_update', {'id': email.id})) }}
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@
|
|||
{% for variant in product.variants %}
|
||||
<tr>
|
||||
<td>{{ variant.id }}</td>
|
||||
<td><span class="label label-{{ variant.available ? 'success' : 'danger' }}">{{ variant.availableOn|date }}</span></td>
|
||||
<td><span class="label label-{{ variant.available ? 'success' : 'danger' }}">{{ variant.availableOn|format_date }}</span></td>
|
||||
<td>
|
||||
<ul>
|
||||
{% for option in variant.options %}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
{% for order in orders %}
|
||||
<tr id="{{ order.id }}">
|
||||
<td class="center-text"><input type="checkbox" value="{{ order.id }}" /></td>
|
||||
<td>{{ order.createdAt|date }}</td>
|
||||
<td>{{ order.createdAt|format_date }}</td>
|
||||
<td>
|
||||
<span {%- if order.channel.color -%} style="color: {{ order.channel.color }};"{%- endif -%}>{{ order.channel.code }}</span>
|
||||
</td>
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@
|
|||
<h4>Order Details</h4>
|
||||
<dl>
|
||||
<dt>{{ 'sylius.ui.creation_time'|trans }}</dt>
|
||||
<dd>{{ order.createdAt|date }}</dd>
|
||||
<dd>{{ order.createdAt|format_date }}</dd>
|
||||
<dt>Email</dt>
|
||||
<dd>
|
||||
{% if order.customer %}
|
||||
|
|
@ -227,7 +227,7 @@
|
|||
{{ (comment.notifyCustomer ? 'sylius.order.comment.customer.notified' : 'sylius.order.comment.customer.not_notified')|trans }}
|
||||
</span>
|
||||
</td>
|
||||
<td>{{ comment.createdAt|date }}</td>
|
||||
<td>{{ comment.createdAt|format_date }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
<tr>
|
||||
|
|
@ -261,8 +261,8 @@
|
|||
<td>{{ unit.inventoryName }}</td>
|
||||
<td>{{ unit.inventoryState|humanize }}</td>
|
||||
<td>{{ unit.shippingState|humanize }}</td>
|
||||
<td>{{ unit.createdAt|date }}</td>
|
||||
<td>{{ unit.updatedAt|date }}</td>
|
||||
<td>{{ unit.createdAt|format_date }}</td>
|
||||
<td>{{ unit.updatedAt|format_date }}</td>
|
||||
<td>
|
||||
{% for transition in ['backorder', 'sell', 'return'] if sm_can(unit, transition, 'sylius_inventory_unit') %}
|
||||
<form action="{{ path('sylius_backend_inventory_unit_update_state', {'id': unit.id, 'transition': transition}) }}" method="post">
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
{{ payment.amount|sylius_price(payment.currencyCode) }}
|
||||
</td>
|
||||
<td>{{ misc.state_label(payment.state, 'payment') }}</td>
|
||||
<td>{{ payment.createdAt|date }}</td>
|
||||
<td>{{ payment.createdAt|format_date }}</td>
|
||||
<td>
|
||||
<div class="pull-right">
|
||||
{{ buttons.edit(path('sylius_backend_payment_update', {'id': payment.id})) }}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
{{ payment_method.enabled ? 'sylius.ui.yes'|trans : 'sylius.ui.no'|trans }}
|
||||
</span>
|
||||
</td>
|
||||
<td>{{ payment_method.updatedAt|date }}</td>
|
||||
<td>{{ payment_method.updatedAt|format_date }}</td>
|
||||
<td>
|
||||
<div class="pull-right">
|
||||
{{ buttons.edit(path('sylius_backend_payment_method_update', {'id': payment_method.id})) }}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
<strong>{{ permission.description }}</strong> <i>({{ permission.code }})</i>
|
||||
</span>
|
||||
</td>
|
||||
<td>{{ permission.updatedAt|date }}</td>
|
||||
<td>{{ permission.updatedAt|format_date }}</td>
|
||||
<td>
|
||||
<div class="pull-right">
|
||||
{{ buttons.edit(path('sylius_backend_permission_update', {'id': permission.id})) }}
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@
|
|||
{% endif %}
|
||||
|
||||
<td class="updated-at">
|
||||
{{ product.updatedAt|date('Y/m/d') }}
|
||||
{{ product.updatedAt|format_date('Y/m/d') }}
|
||||
</td>
|
||||
<td class="center-text">
|
||||
<a href="{{ path('sylius_backend_metadata_container_customize', { 'id': product.metadataIdentifier }) }}" class="btn btn-default">
|
||||
|
|
|
|||
|
|
@ -78,12 +78,12 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>{{ 'sylius.ui.available_on'|trans }}</td>
|
||||
<td><span class="label label-{{ product.available ? 'success' : 'danger' }}">{{ product.availableOn|date }}</span></td>
|
||||
<td><span class="label label-{{ product.available ? 'success' : 'danger' }}">{{ product.availableOn|format_date }}</span></td>
|
||||
</tr>
|
||||
{% if product.availableUntil %}
|
||||
<tr>
|
||||
<td>{{ 'sylius.ui.available_until'|trans }}</td>
|
||||
<td><span class="label label-{{ product.available ? 'success' : 'danger' }}">{{ product.availableUntil|date }}</span></td>
|
||||
<td><span class="label label-{{ product.available ? 'success' : 'danger' }}">{{ product.availableUntil|format_date }}</span></td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
<tr>
|
||||
|
|
@ -158,7 +158,7 @@
|
|||
<tr>
|
||||
<td><strong>{{ attribute.name }}</strong></td>
|
||||
{% if attribute.value.timestamp is defined %}
|
||||
<td>{{ attribute.value|date('Y/m/d H:i:s') }}</td>
|
||||
<td>{{ attribute.value|format_date('Y/m/d H:i:s') }}</td>
|
||||
{% else %}
|
||||
<td>{{ attribute.value }}</td>
|
||||
{% endif %}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
{% endfor %}
|
||||
</ul>
|
||||
</td>
|
||||
<td>{{ archetype.updatedAt|date }}</td>
|
||||
<td>{{ archetype.updatedAt|format_date }}</td>
|
||||
<td>
|
||||
<div class="pull-right">
|
||||
{{ buttons.generic(path('sylius_backend_product_archetype_code_product_index', {'code': archetype.code}), 'sylius.ui.browse_products'|trans) }}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
<td>{{ attribute.code }}</td>
|
||||
<td>{{ attribute.name }}</td>
|
||||
<td><span class="label label-primary">{{ attribute.type|upper }}</span></td>
|
||||
<td>{{ attribute.updatedAt|date }}</td>
|
||||
<td>{{ attribute.updatedAt|format_date }}</td>
|
||||
<td>
|
||||
<div class="pull-right">
|
||||
{{ buttons.edit(path('sylius_backend_product_attribute_update', {'id': attribute.id})) }}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
{% endfor %}
|
||||
</ul>
|
||||
</td>
|
||||
<td>{{ option.updatedAt|date }}</td>
|
||||
<td>{{ option.updatedAt|format_date }}</td>
|
||||
<td>
|
||||
<div class="pull-right">
|
||||
{{ buttons.edit(path('sylius_backend_product_option_update', {'id': option.id})) }}
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@
|
|||
<img class="img-polaroid" src="{{ variant.images.offsetGet(0).path|imagine_filter('sylius_small') }}" />
|
||||
{% endif %}
|
||||
</td>
|
||||
<td><span class="label label-{{ variant.available ? 'success' : 'important' }}">{{ variant.availableOn|date }}</span></td>
|
||||
<td>{{ product.updatedAt|date }}</td>
|
||||
<td><span class="label label-{{ variant.available ? 'success' : 'important' }}">{{ variant.availableOn|format_date }}</span></td>
|
||||
<td>{{ product.updatedAt|format_date }}</td>
|
||||
<td>
|
||||
<ul>
|
||||
{% for option in variant.options %}
|
||||
|
|
|
|||
|
|
@ -52,8 +52,8 @@
|
|||
</span>
|
||||
</td>
|
||||
<td>{{ promotion.priority }}</td>
|
||||
<td>{{ promotion.startsAt is empty ? '-' : promotion.startsAt|date }}</td>
|
||||
<td>{{ promotion.endsAt is empty ? '-' : promotion.endsAt|date }}</td>
|
||||
<td>{{ promotion.startsAt is empty ? '-' : promotion.startsAt|format_date }}</td>
|
||||
<td>{{ promotion.endsAt is empty ? '-' : promotion.endsAt|format_date }}</td>
|
||||
<td>
|
||||
<div class="pull-right">
|
||||
{{ buttons.move(path('sylius_backend_promotion_move_up', {'id': promotion.id}), 'up', loop.first and not promotions.hasPreviousPage, loop.last and not promotions.hasNextPage) }}
|
||||
|
|
|
|||
|
|
@ -57,11 +57,11 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td><strong>{{ 'sylius.ui.starts_at'|trans }}</strong></td>
|
||||
<td>{{ promotion.startsAt is empty ? '-' : promotion.startsAt|date }}</td>
|
||||
<td>{{ promotion.startsAt is empty ? '-' : promotion.startsAt|format_date }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>{{ 'sylius.ui.ends_at'|trans }}</strong></td>
|
||||
<td>{{ promotion.endsAt is empty ? '-' : promotion.endsAt|date }}</td>
|
||||
<td>{{ promotion.endsAt is empty ? '-' : promotion.endsAt|format_date }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>{{ 'sylius.ui.usage_limit'|trans }}</strong></td>
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
<td><label class="label label-{{ review_macros.moderation_label(review) }}">{{ review.status }}</label></td>
|
||||
<td><label class="label label-default">{{ review.rating }}</label></td>
|
||||
<td><a href="{{ path('sylius_backend_customer_show', { 'id': review.author.id }) }}">{{ review.author.email }}</a></td>
|
||||
<td>{{ review.createdAt|date }}</td>
|
||||
<td>{{ review.createdAt|format_date }}</td>
|
||||
<td>
|
||||
<div class="pull-right">
|
||||
{{ buttons.show(path('sylius_backend_product_review_show', {'id': review.id})) }}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
<td>
|
||||
{{ role.description }}
|
||||
</td>
|
||||
<td>{{ role.updatedAt|date }}</td>
|
||||
<td>{{ role.updatedAt|format_date }}</td>
|
||||
<td>
|
||||
<div class="pull-right">
|
||||
{{ buttons.edit(path('sylius_backend_role_update', {'id': role.id})) }}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
<td>{{ misc.shipment_state(shipment.state) }}</td>
|
||||
<td>{{ address.firstname }} {{ address.lastname }} ({{ address.city }}, {{ address.countryCode|sylius_country_name }})</td>
|
||||
<td class="text-center">{{ shipment.units|length }}</td>
|
||||
<td>{{ shipment.createdAt|date }}</td>
|
||||
<td>{{ shipment.createdAt|format_date }}</td>
|
||||
<td>
|
||||
<div class="pull-right">
|
||||
{{ buttons.show(path('sylius_backend_shipment_show', {'id': shipment.id})) }}
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td><strong>{{ 'sylius.ui.creation_time'|trans }}</strong></td>
|
||||
<td>{{ order.createdAt|date }}</td>
|
||||
<td>{{ order.createdAt|format_date }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
@ -114,8 +114,8 @@
|
|||
<td>{{ item.inventoryName }}</td>
|
||||
<td><span class="label label-success">{{ item.shippingState }}</span></td>
|
||||
<td><span class="label label-{{ item.sold ? 'success' : 'important' }}">{{ item.inventoryState }}</span></td>
|
||||
<td>{{ item.createdAt|date }}</td>
|
||||
<td>{{ item.updatedAt|date }}</td>
|
||||
<td>{{ item.createdAt|format_date }}</td>
|
||||
<td>{{ item.updatedAt|format_date }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
<td>{{ shipping_category.id }}</td>
|
||||
<td>{{ shipping_category.code }}</td>
|
||||
<td>{{ shipping_category.name }}</td>
|
||||
<td>{{ shipping_category.updatedAt|date }}</td>
|
||||
<td>{{ shipping_category.updatedAt|format_date }}</td>
|
||||
<td>
|
||||
<div class="pull-right">
|
||||
{{ buttons.edit(path('sylius_backend_shipping_category_update', {'id': shipping_category.id})) }}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
</span>
|
||||
</td>
|
||||
<td><span class="label label-info">{{ shipping_method.calculator|humanize }}</span></td>
|
||||
<td>{{ shipping_method.updatedAt|date }}</td>
|
||||
<td>{{ shipping_method.updatedAt|format_date }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
<td>{{ tax_category.code }}</td>
|
||||
<td>{{ tax_category.name }}</td>
|
||||
<td>{{ tax_category.description|default('sylius.ui.no_description'|trans) }}</td>
|
||||
<td>{{ tax_category.updatedAt|date }}</td>
|
||||
<td>{{ tax_category.updatedAt|format_date }}</td>
|
||||
<td>
|
||||
<div class="pull-right">
|
||||
{{ buttons.edit(path('sylius_backend_tax_category_update', {'id': tax_category.id})) }}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
{{ misc.state_label(tax_rate.includedInPrice) }}
|
||||
</td>
|
||||
<td><span class="label label-primary">{{ tax_rate.calculator|humanize|upper }}</span></td>
|
||||
<td>{{ tax_rate.updatedAt|date }}</td>
|
||||
<td>{{ tax_rate.updatedAt|format_date }}</td>
|
||||
<td>
|
||||
<div class="pull-right">
|
||||
{{ buttons.show(path('sylius_backend_tax_rate_show', {'id': tax_rate.id})) }}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{% macro formatValue(key, value) %}
|
||||
{% if value.timestamp is defined %}
|
||||
{{ value|date() }}
|
||||
{{ value|format_date() }}
|
||||
{% elseif key == 'price' or key == 'unitPrice' %}
|
||||
{{ value|sylius_price() }}
|
||||
{% elseif value is empty %}
|
||||
|
|
@ -27,7 +27,7 @@
|
|||
{% for log in logs %}
|
||||
<tr>
|
||||
<td><span class="label label-{{ log.action == 'danger' ? 'warning' : (log.action == 'update' ? 'success' : 'primary') }}">{{ log.action|upper }}</span></td>
|
||||
<td>{{ log.loggedAt|date }} (#{{ log.version }})</td>
|
||||
<td>{{ log.loggedAt|format_date }} (#{{ log.version }})</td>
|
||||
<td>
|
||||
{% if log.data is not empty %}
|
||||
<ul>
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@
|
|||
{% include 'SyliusWebBundle::confirm-modal.html.twig' %}
|
||||
|
||||
<footer>
|
||||
<p>© <a href="http://Sylius.org">Sylius</a>, 2011 - {{ 'now'|date('Y') }}.</p>
|
||||
<p>© <a href="http://Sylius.org">Sylius</a>, 2011 - {{ 'now'|format_date('Y') }}.</p>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
<div class="row well well-sm" id="information">
|
||||
<div class="col-md-6">
|
||||
<strong>{{ 'sylius.ui.placed_at'|trans }} {{ order.createdAt|date() }}</strong><br><br>
|
||||
<strong>{{ 'sylius.ui.placed_at'|trans }} {{ order.createdAt|format_date() }}</strong><br><br>
|
||||
{#{{ 'sylius.ui.shipment_mode'|trans }} <strong>TODO</strong><br>#}
|
||||
{#{{ 'sylius.ui.payment_mode'|trans }} <strong>TODO</strong><br>#}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
<tbody>
|
||||
{% for order in orders %}
|
||||
<tr class="order" id="order-{{ order.number }}">
|
||||
<td>{{ order.createdAt|date }}</td>
|
||||
<td>{{ order.createdAt|format_date }}</td>
|
||||
<td>{{ order.number }}</td>
|
||||
<td>{{ order.total|sylius_money(order.currencyCode) }}</td>
|
||||
<td>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
{% set shipment = order.lastShipment %}
|
||||
{% if shipment %}
|
||||
{{ ('sylius.account.order.shipment.' ~ shipment.state) |trans({'%at%': shipment.updatedAt|date}) }}
|
||||
{{ ('sylius.account.order.shipment.' ~ shipment.state) |trans({'%at%': shipment.updatedAt|format_date}) }}
|
||||
{% if shipment.tracking %}
|
||||
<br>
|
||||
{{ 'sylius.ui.tracking_number'|trans}}
|
||||
{{ shipment.tracking }}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{{ 'sylius.account.order.placed_at'|trans({'%at%': order.createdAt|date}) }}
|
||||
{{ 'sylius.account.order.placed_at'|trans({'%at%': order.createdAt|format_date}) }}
|
||||
{% endif %}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
<strong>{{ customer.lastName|upper }} {{ customer.firstName }}</strong><br><br>
|
||||
{{ 'sylius.ui.customer_id'|trans }} {{ app.user.id }} <br>
|
||||
{{ 'sylius.ui.email'|trans }} {{ customer.email }}<br>
|
||||
{{ 'sylius.ui.you_are_customer_since'|trans }} {{ app.user.createdAt|date() }}
|
||||
{{ 'sylius.ui.you_are_customer_since'|trans }} {{ app.user.createdAt|format_date() }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<div class="panel-heading">
|
||||
<b>{{ review.title }}</b>
|
||||
<div class="pull-right">
|
||||
{{ review.createdAt|date('Y-m-d H:i') }}
|
||||
{{ review.createdAt|format_date('Y-m-d H:i') }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@
|
|||
{% block footer %}
|
||||
<div class="footer">
|
||||
<p class="text-muted">
|
||||
© Sylius, 2011 - {{ 'now'|date('Y') }}.
|
||||
© Sylius, 2011 - {{ 'now'|format_date('Y') }}.
|
||||
</p>
|
||||
{{ knp_menu_render('sylius.frontend.social', {'template': 'SyliusWebBundle:Frontend:menu.html.twig'}) }}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue