mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 00:51:33 +00:00
Merge branch '1.10' into 1.11
* 1.10: [maintenance]Fix ECS HeaderCommentFixer [maintenance]Run ECS in parallel [Templates][Admin] Refactor order payments template to use events [Documentation] Fix the description of items total shipping rules
This commit is contained in:
commit
52e8b9c502
5 changed files with 44 additions and 20 deletions
|
|
@ -105,8 +105,8 @@ Rule Types
|
|||
|
||||
The types of rules that are configured in **Sylius** by default are:
|
||||
|
||||
* **Items total greater than or equal** - checks if the order total is greater than or equal to a given amount
|
||||
* **Items total less than or equal** - checks if the order total is less than or equal to a given amount
|
||||
* **Items total greater than or equal** - checks if the items total is greater than or equal to a given amount
|
||||
* **Items total less than or equal** - checks if the items total is less than or equal to a given amount
|
||||
* **Total weight greater than or equal** - checks if the total weight of the order is greater than or equal to a given number
|
||||
* **Total weight less than or equal** - checks if the total weight of the order is less than or equal to a given number
|
||||
|
||||
|
|
|
|||
39
ecs.php
39
ecs.php
|
|
@ -1,5 +1,14 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Sylius package.
|
||||
*
|
||||
* (c) Paweł Jędrzejewski
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
use PhpCsFixer\Fixer\ClassNotation\VisibilityRequiredFixer;
|
||||
use SlevomatCodingStandard\Sniffs\Commenting\InlineDocCommentDeclarationSniff;
|
||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
|
|
@ -8,18 +17,26 @@ use Symplify\EasyCodingStandard\ValueObject\Option;
|
|||
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
$containerConfigurator->import('vendor/sylius-labs/coding-standard/ecs.php');
|
||||
|
||||
// $containerConfigurator->services()->set(HeaderCommentFixer::class)->call('configure', [
|
||||
// 'location' => 'after_open',
|
||||
// 'header' =>
|
||||
//'This file is part of the Sylius package.
|
||||
//
|
||||
//(c) Paweł Jędrzejewski
|
||||
//
|
||||
//For the full copyright and license information, please view the LICENSE
|
||||
//file that was distributed with this source code.',
|
||||
// ]);
|
||||
$containerConfigurator->services()
|
||||
->set(HeaderCommentFixer::class)
|
||||
->call('configure', [
|
||||
[
|
||||
'location' => 'after_open',
|
||||
'comment_type' => HeaderCommentFixer::HEADER_COMMENT,
|
||||
'header' => <<<TEXT
|
||||
This file is part of the Sylius package.
|
||||
|
||||
$containerConfigurator->parameters()->set(Option::SKIP, [
|
||||
(c) Paweł Jędrzejewski
|
||||
|
||||
For the full copyright and license information, please view the LICENSE
|
||||
file that was distributed with this source code.
|
||||
TEXT
|
||||
]
|
||||
]);
|
||||
|
||||
$parameters = $containerConfigurator->parameters();
|
||||
$parameters->set(Option::PARALLEL, true);
|
||||
$parameters->set(Option::SKIP, [
|
||||
InlineDocCommentDeclarationSniff::class . '.MissingVariable',
|
||||
InlineDocCommentDeclarationSniff::class . '.NoAssignment',
|
||||
VisibilityRequiredFixer::class => ['*Spec.php'],
|
||||
|
|
|
|||
|
|
@ -640,6 +640,12 @@ sylius_ui:
|
|||
template: '@SyliusAdmin/Order/Show/_headerItems.html.twig'
|
||||
priority: 10
|
||||
|
||||
sylius.admin.order.show.payments_content:
|
||||
blocks:
|
||||
content:
|
||||
template: '@SyliusAdmin/Order/Show/_paymentsContent.html.twig'
|
||||
priority: 10
|
||||
|
||||
sylius.admin.order.show.payment_content:
|
||||
blocks:
|
||||
header:
|
||||
|
|
|
|||
|
|
@ -1,12 +1,6 @@
|
|||
{% if order.hasPayments %}
|
||||
<div class="ui segment" id="payment-state">
|
||||
{% include '@SyliusAdmin/Order/Label/PaymentState/' ~ order.paymentState ~ '.html.twig' with { 'value': 'sylius.ui.' ~ order.paymentState, 'attached': true } %}
|
||||
<h3 class="ui dividing header">{{ 'sylius.ui.payments'|trans }}</h3>
|
||||
<div class="ui relaxed divided list" id="sylius-payments">
|
||||
{% for payment in order.payments %}
|
||||
{% include '@SyliusAdmin/Order/Show/_payment.html.twig' %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{{ sylius_template_event('sylius.admin.order.show.payments_content', _context) }}
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="ui segment center aligned" id="no-payments">
|
||||
|
|
|
|||
|
|
@ -0,0 +1,7 @@
|
|||
{% include '@SyliusAdmin/Order/Label/PaymentState/' ~ order.paymentState ~ '.html.twig' with { 'value': 'sylius.ui.' ~ order.paymentState, 'attached': true } %}
|
||||
<h3 class="ui dividing header">{{ 'sylius.ui.payments'|trans }}</h3>
|
||||
<div class="ui relaxed divided list" id="sylius-payments">
|
||||
{% for payment in order.payments %}
|
||||
{% include '@SyliusAdmin/Order/Show/_payment.html.twig' %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
Loading…
Add table
Reference in a new issue