-
Notifications
You must be signed in to change notification settings - Fork 38
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
12 changed files
with
125 additions
and
128 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,57 @@ | ||
twig_hooks: | ||
hooks: | ||
'sylius_admin.product.update.content.form.side_navigation': | ||
general: | ||
template: '@SyliusAdmin/product/form/side_navigation/general.html.twig' | ||
configuration: | ||
active: true | ||
channel_pricing: | ||
template: '@SyliusAdmin/product/form/side_navigation/channel_pricing.html.twig' | ||
taxes: | ||
template: '@SyliusAdmin/product/form/side_navigation/taxes.html.twig' | ||
shipping: | ||
template: '@SyliusAdmin/product/form/side_navigation/shipping.html.twig' | ||
inventory: | ||
template: '@SyliusAdmin/product/form/side_navigation/inventory.html.twig' | ||
translations: | ||
template: '@SyliusAdmin/product/form/side_navigation/translations.html.twig' | ||
taxonomy: | ||
template: '@SyliusAdmin/product/form/side_navigation/taxonomy.html.twig' | ||
attributes: | ||
template: '@SyliusAdmin/product/form/side_navigation/attributes.html.twig' | ||
associations: | ||
template: '@SyliusAdmin/product/form/side_navigation/associations.html.twig' | ||
media: | ||
template: '@SyliusAdmin/product/form/side_navigation/media.html.twig' | ||
bundle: | ||
template: '@BitBagSyliusProductBundlePlugin/Admin/product/form/side_navigation/bundle.html.twig' | ||
|
||
'sylius_admin.product.update.content.form.sections': | ||
general: | ||
template: '@SyliusAdmin/product/form/sections/general.html.twig' | ||
configuration: | ||
active: true | ||
channel_pricing: | ||
template: '@SyliusAdmin/product/form/sections/channel_pricing.html.twig' | ||
taxes: | ||
template: '@SyliusAdmin/product/form/sections/taxes.html.twig' | ||
shipping: | ||
template: '@SyliusAdmin/product/form/sections/shipping.html.twig' | ||
inventory: | ||
template: '@SyliusAdmin/product/form/sections/inventory.html.twig' | ||
translations: | ||
template: '@SyliusAdmin/product/form/sections/translations.html.twig' | ||
taxonomy: | ||
template: '@SyliusAdmin/product/form/sections/taxonomy.html.twig' | ||
attributes: | ||
template: '@SyliusAdmin/product/form/sections/attributes.html.twig' | ||
associations: | ||
template: '@SyliusAdmin/product/form/sections/associations.html.twig' | ||
media: | ||
template: '@SyliusAdmin/product/form/sections/media.html.twig' | ||
bundle: | ||
template: '@BitBagSyliusProductBundlePlugin/Admin/product/form/sections/bundle.html.twig' | ||
|
||
'sylius_admin.product.update.content.form.sections.bundle': | ||
product_bundle: | ||
template: '@BitBagSyliusProductBundlePlugin/Admin/product/form/sections/bundle/productBundleItem.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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
imports: | ||
- { resource: "@BitBagSyliusProductBundlePlugin/Resources/config/twig_hooks/product/create.yaml" } | ||
- { resource: "@BitBagSyliusProductBundlePlugin/Resources/config/twig_hooks/product/**/*.yaml" } |
68 changes: 0 additions & 68 deletions
68
src/Resources/views/Admin/Form/productBundleItem.html.twig
This file was deleted.
Oops, something went wrong.
8 changes: 1 addition & 7 deletions
8
src/Resources/views/Admin/product/form/sections/bundle.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 |
---|---|---|
@@ -1,21 +1,15 @@ | ||
{#{% form_theme form '@BitBagSyliusProductBundlePlugin/Admin/Form/productBundleItem.html.twig' %}#} | ||
{% set form = hookable_metadata.context.form %} | ||
{% set product = hookable_metadata.context.resource %} | ||
|
||
<div class="tab pane " id="product-bundle" role="tabpanel" tabindex="0"> | ||
<div class="tab pane {% if hookable_metadata.configuration.active|default(false) %}show active{% endif %}" id="product-bundle" role="tabpanel" tabindex="0"> | ||
<div class="card mb-3"> | ||
<div class="card-header"> | ||
<h2 id="productBundle" class="card-title"> | ||
{{ 'bitbag_sylius_product_bundle.ui.bundle'|trans }} | ||
</h2> | ||
</div> | ||
<div class="card-body"> | ||
{{ dump(form) }} | ||
{{ form_row(form.productBundle.isPackedProduct) }} | ||
{{ form_row(form.productBundle.productBundleItems) }} | ||
{# {{ sonata_block_render_event('sylius.admin.product.' ~ action ~ '.tab_bundle', {'form': form }) }}#} | ||
{% hook 'bundle' with { product } %} | ||
</div> | ||
</div> | ||
|
||
</div> |
39 changes: 39 additions & 0 deletions
39
src/Resources/views/Admin/product/form/sections/bundle/productBundleItem.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,39 @@ | ||
{% from '@SyliusResource/Macros/notification.html.twig' import error %} | ||
|
||
{% set form = hookable_metadata.context.form %} | ||
{% set product_bundle_items = hookable_metadata.context.form.productBundle.productBundleItems %} | ||
|
||
<div class="row"> | ||
|
||
{{ error(form.vars.errors) }} | ||
|
||
<div class="col-12 mb-4"> | ||
<table class="table table-bordered"> | ||
<thead> | ||
<tr> | ||
<th class="col-6">{{ 'bitbag_sylius_product_bundle.ui.product_variant'|trans }}</th> | ||
<th class="col-4">{{ 'bitbag_sylius_product_bundle.ui.quantity'|trans }}</th> | ||
<th class="col-2">{{ 'bitbag_sylius_product_bundle.ui.delete'|trans }}</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for product_bundle_form in product_bundle_items %} | ||
<tr> | ||
<td> | ||
{{ form_row(product_bundle_form.children.productVariant) }} | ||
</td> | ||
<td> | ||
{{ form_row(product_bundle_form.children.quantity) }} | ||
</td> | ||
<td> | ||
{{ form_widget(product_bundle_form.vars.button_delete, { label: 'sylius.ui.delete'|trans, attr: { class: 'btn btn-outline-danger w-100','data-test-image-delete': '' }}) }} | ||
</td> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
<div class="d-grid gap-2"> | ||
{{ form_widget(product_bundle_items.vars.button_add) }} | ||
</div> | ||
</div> | ||
</div> |
24 changes: 14 additions & 10 deletions
24
src/Resources/views/Admin/product/form/side_navigation/bundle.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 |
---|---|---|
@@ -1,10 +1,14 @@ | ||
<button | ||
type="button" | ||
class="list-group-item list-group-item-action {% if hookable_metadata.configuration.active|default(false) %}active{% endif %}" | ||
data-bs-toggle="tab" | ||
data-bs-target="#product-bundle" | ||
role="tab" | ||
{{ sylius_test_html_attribute('side-navigation-tab', 'bundle') }} | ||
> | ||
{{ 'bitbag_sylius_product_bundle.ui.bundle'|trans }} | ||
</button> | ||
{% set product = hookable_metadata.context.resource %} | ||
|
||
{% if product.productBundle is not null %} | ||
<button | ||
type="button" | ||
class="list-group-item list-group-item-action {% if hookable_metadata.configuration.active|default(false) %}active{% endif %}" | ||
data-bs-toggle="tab" | ||
data-bs-target="#product-bundle" | ||
role="tab" | ||
{{ sylius_test_html_attribute('side-navigation-tab', 'bundle') }} | ||
> | ||
{{ 'bitbag_sylius_product_bundle.ui.bundle'|trans }} | ||
</button> | ||
{% endif %} |
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