-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
d3c20ab
commit 69a2c36
Showing
11 changed files
with
101 additions
and
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
gally_admin: | ||
resource: "@GallySyliusPlugin/Resources/config/admin_routing.yml" | ||
prefix: /admin |
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,35 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\Migrations; | ||
|
||
use Doctrine\DBAL\Schema\Schema; | ||
use Doctrine\Migrations\AbstractMigration; | ||
|
||
/** | ||
* Auto-generated Migration: Please modify to your needs! | ||
*/ | ||
final class Version20231120150637 extends AbstractMigration | ||
{ | ||
public function getDescription(): string | ||
{ | ||
return ''; | ||
} | ||
|
||
public function up(Schema $schema): void | ||
{ | ||
// this up() migration is auto-generated, please modify it to your needs | ||
$this->addSql('ALTER TABLE gally_configuration CHANGE id id INT AUTO_INCREMENT NOT NULL'); | ||
$this->addSql('ALTER TABLE sylius_channel ADD gally_active TINYINT(1) NOT NULL, ADD gally_product_index_batch_size INT NOT NULL, ADD gally_category_index_batch_size INT NOT NULL'); | ||
$this->addSql('ALTER TABLE messenger_messages CHANGE created_at created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', CHANGE available_at available_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', CHANGE delivered_at delivered_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\''); | ||
} | ||
|
||
public function down(Schema $schema): void | ||
{ | ||
// this down() migration is auto-generated, please modify it to your needs | ||
$this->addSql('ALTER TABLE gally_configuration CHANGE id id INT NOT NULL'); | ||
$this->addSql('ALTER TABLE messenger_messages CHANGE created_at created_at DATETIME NOT NULL, CHANGE available_at available_at DATETIME NOT NULL, CHANGE delivered_at delivered_at DATETIME DEFAULT NULL'); | ||
$this->addSql('ALTER TABLE sylius_channel DROP gally_active, DROP gally_product_index_batch_size, DROP gally_category_index_batch_size'); | ||
} | ||
} |
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
21 changes: 21 additions & 0 deletions
21
templates/bundles/SyliusShopBundle/Product/Index/_search.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,21 @@ | ||
<div class="ui segment"> | ||
<form method="get" action="{{ path('sylius_shop_product_index', {'slug': app.request.attributes.get('slug')}) }}" class="ui loadable form"> | ||
<div class="ui stackable grid" id="searchbar"> | ||
<div class="column" id="searchbarTextField"> | ||
{% for filter in products.definition.enabledFilters %} | ||
{% if filter.type == 'shop_string' %} | ||
{{ sylius_grid_render_filter(products, filter) }} | ||
{% endif %} | ||
{% endfor %} | ||
</div> | ||
<div class="right aligned column" id="searchbarButtons"> | ||
<div class="ui buttons"> | ||
<button type="submit" class="ui primary icon labeled button" {{ sylius_test_html_attribute('search') }}><i class="search icon"></i> {{ 'sylius.ui.search'|trans }}</button> | ||
<a href="{{ path('sylius_shop_product_index', {'slug': app.request.attributes.get('slug')}) }}" class="ui negative icon labeled button" {{ sylius_test_html_attribute('clear') }}> | ||
<i class="cancel icon"></i> {{ 'sylius.ui.clear'|trans }} | ||
</a> | ||
</div> | ||
</div> | ||
</div> | ||
</form> | ||
</div> |
6 changes: 6 additions & 0 deletions
6
templates/bundles/SyliusShopBundle/Product/Index/_sidebar.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,6 @@ | ||
{{ render(url('sylius_shop_partial_taxon_show_by_slug', { | ||
'slug': app.request.attributes.get('slug'), | ||
'template': '@SyliusShop/Taxon/_verticalMenu.html.twig', | ||
})) }} | ||
|
||
{{ sylius_template_event('sylius.shop.product.index.filters', {'products': products}) }} |
23 changes: 23 additions & 0 deletions
23
templates/bundles/SyliusShopBundle/Product/Index/_sorting.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,23 @@ | ||
{% if resources.data.nbResults > 0 %} | ||
|
||
{% set route = app.request.attributes.get('_route') %} | ||
{% set route_parameters = app.request.attributes.all('_route_params')|merge(app.request.query.all) %} | ||
{% set criteria = app.request.query.all('criteria') %} | ||
|
||
<div class="ui right floated small header"> | ||
<div class="content"> | ||
{{ 'sylius.ui.sort'|trans }} | ||
<div class="ui inline dropdown"> | ||
<div class="text">{{ current_sorting_label }}</div> | ||
<i class="dropdown icon"></i> | ||
<div class="menu"> | ||
{% for option in sort_options %} | ||
{% set sort_path = path(route, route_parameters|merge({'sorting': option.sorting, 'criteria': criteria})) %} | ||
|
||
<a class="item" href="{{ sort_path }}" data-text="{{ option.label }}">{{ option.label }}</a> | ||
{% endfor %} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{% endif %} |