-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from odiseoteam/1.8
Improvements
- Loading branch information
Showing
26 changed files
with
250 additions
and
196 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
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,8 @@ | ||
odiseo_sylius_vendor_plugin_shop_vendor_product_index: | ||
path: /{slug}/products | ||
path: /{slug} | ||
methods: [GET] | ||
defaults: | ||
_controller: sylius.controller.product::indexAction | ||
_sylius: | ||
template: "@OdiseoSyliusVendorPlugin/Shop/Vendor/Product/index.html.twig" | ||
grid: odiseo_sylius_vendor_plugin_shop_vendor_product | ||
requirements: | ||
slug: .+ |
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 |
---|---|---|
@@ -1,42 +1,41 @@ | ||
{% 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 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') %} | ||
|
||
{% set criteria = app.request.query.all('criteria') %} | ||
{% set default_path = path(route, route_parameters|merge({'sorting': null, 'criteria': criteria})) %} | ||
{% set from_a_to_z_path = path(route, route_parameters|merge({'sorting': {'name': 'asc'}, 'criteria': criteria})) %} | ||
{% set from_z_to_a_path = path(route, route_parameters|merge({'sorting': {'name': 'desc'}, 'criteria': criteria})) %} | ||
{% set oldest_first_path = path(route, route_parameters|merge({'sorting': {'createdAt': 'asc'}, 'criteria': criteria})) %} | ||
{% set newest_first_path = path(route, route_parameters|merge({'sorting': {'createdAt': 'desc'}, 'criteria': criteria})) %} | ||
|
||
{% set default_path = path(route, route_parameters|merge({'sorting': null, 'criteria': criteria})) %} | ||
{% set from_a_to_z_path = path(route, route_parameters|merge({'sorting': {'name': 'asc'}, 'criteria': criteria})) %} | ||
{% set from_z_to_a_path = path(route, route_parameters|merge({'sorting': {'name': 'desc'}, 'criteria': criteria})) %} | ||
{% set oldest_first_path = path(route, route_parameters|merge({'sorting': {'createdAt': 'asc'}, 'criteria': criteria})) %} | ||
{% set newest_first_path = path(route, route_parameters|merge({'sorting': {'createdAt': 'desc'}, 'criteria': criteria})) %} | ||
{% if app.request.query.all()['sorting'] is not defined or app.request.query.all()['sorting'] is empty %} | ||
{% set current_sorting_label = 'sylius.ui.by_position'|trans|lower %} | ||
{% elseif app.request.query.all()['sorting'].name is defined and app.request.query.all()['sorting'].name == 'asc'%} | ||
{% set current_sorting_label = 'sylius.ui.from_a_to_z'|trans|lower %} | ||
{% elseif app.request.query.all()['sorting'].name is defined and app.request.query.all()['sorting'].name == 'desc'%} | ||
{% set current_sorting_label = 'sylius.ui.from_z_to_a'|trans|lower %} | ||
{% elseif app.request.query.all()['sorting'].createdAt is defined and app.request.query.all()['sorting'].createdAt == 'desc'%} | ||
{% set current_sorting_label = 'sylius.ui.newest_first'|trans|lower %} | ||
{% elseif app.request.query.all()['sorting'].createdAt is defined and app.request.query.all()['sorting'].createdAt == 'asc'%} | ||
{% set current_sorting_label = 'sylius.ui.oldest_first'|trans|lower %} | ||
{% endif %} | ||
|
||
{% if app.request.query.all()['sorting'] is not defined or app.request.query.all()['sorting'] is empty %} | ||
{% set current_sorting_label = 'sylius.ui.by_position'|trans|lower %} | ||
{% elseif app.request.query.all()['sorting'].name is defined and app.request.query.all()['sorting'].name == 'asc'%} | ||
{% set current_sorting_label = 'sylius.ui.from_a_to_z'|trans|lower %} | ||
{% elseif app.request.query.all()['sorting'].name is defined and app.request.query.all()['sorting'].name == 'desc'%} | ||
{% set current_sorting_label = 'sylius.ui.from_z_to_a'|trans|lower %} | ||
{% elseif app.request.query.all()['sorting'].createdAt is defined and app.request.query.all()['sorting'].createdAt == 'desc'%} | ||
{% set current_sorting_label = 'sylius.ui.newest_first'|trans|lower %} | ||
{% elseif app.request.query.all()['sorting'].createdAt is defined and app.request.query.all()['sorting'].createdAt == 'asc'%} | ||
{% set current_sorting_label = 'sylius.ui.oldest_first'|trans|lower %} | ||
{% endif %} | ||
|
||
<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"> | ||
<a class="item" href="{{ default_path }}" data-text="{{ 'sylius.ui.by_position'|trans|lower }}">{{ 'sylius.ui.by_position'|trans }}</a> | ||
<a class="item" href="{{ from_a_to_z_path }}" data-text="{{ 'sylius.ui.from_a_to_z'|trans|lower }}">{{ 'sylius.ui.from_a_to_z'|trans }}</a> | ||
<a class="item" href="{{ from_z_to_a_path }}" data-text="{{ 'sylius.ui.from_z_to_a'|trans|lower }}">{{ 'sylius.ui.from_z_to_a'|trans }}</a> | ||
<a class="item" href="{{ newest_first_path }}" data-text="{{ 'sylius.ui.newest_first'|trans|lower }}">{{ 'sylius.ui.newest_first'|trans }}</a> | ||
<a class="item" href="{{ oldest_first_path }}" data-text="{{ 'sylius.ui.oldest_first'|trans|lower }}">{{ 'sylius.ui.oldest_first'|trans }}</a> | ||
<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"> | ||
<a class="item" href="{{ default_path }}" data-text="{{ 'sylius.ui.by_position'|trans|lower }}">{{ 'sylius.ui.by_position'|trans }}</a> | ||
<a class="item" href="{{ from_a_to_z_path }}" data-text="{{ 'sylius.ui.from_a_to_z'|trans|lower }}">{{ 'sylius.ui.from_a_to_z'|trans }}</a> | ||
<a class="item" href="{{ from_z_to_a_path }}" data-text="{{ 'sylius.ui.from_z_to_a'|trans|lower }}">{{ 'sylius.ui.from_z_to_a'|trans }}</a> | ||
<a class="item" href="{{ newest_first_path }}" data-text="{{ 'sylius.ui.newest_first'|trans|lower }}">{{ 'sylius.ui.newest_first'|trans }}</a> | ||
<a class="item" href="{{ oldest_first_path }}" data-text="{{ 'sylius.ui.oldest_first'|trans|lower }}">{{ 'sylius.ui.oldest_first'|trans }}</a> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{% endif %} |
Oops, something went wrong.