forked from PrestaShop/PrestaShop
-
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.
Merge pull request PrestaShop#8489 from mickaelandrieu/bogoss/refacto…
…r-product-page Improved Product pages templates management
- Loading branch information
Showing
47 changed files
with
2,414 additions
and
2,005 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
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
143 changes: 143 additions & 0 deletions
143
src/PrestaShopBundle/Resources/views/Admin/Product/CatalogPage/Blocks/filters.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,143 @@ | ||
{#** | ||
* 2007-2017 PrestaShop | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Open Software License (OSL 3.0) | ||
* that is bundled with this package in the file LICENSE.txt. | ||
* It is also available through the world-wide-web at this URL: | ||
* https://opensource.org/licenses/OSL-3.0 | ||
* If you did not receive a copy of the license and are unable to | ||
* obtain it through the world-wide-web, please send an email | ||
* to license@prestashop.com so we can send you a copy immediately. | ||
* | ||
* DISCLAIMER | ||
* | ||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer | ||
* versions in the future. If you wish to customize PrestaShop for your | ||
* needs please refer to http://www.prestashop.com for more information. | ||
* | ||
* @author PrestaShop SA <contact@prestashop.com> | ||
* @copyright 2007-2017 PrestaShop SA | ||
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) | ||
* International Registered Trademark & Property of PrestaShop SA | ||
*#} | ||
<div class="row"> | ||
{% block product_catalog_filter_select_all %} | ||
<div class="col-md-1"> | ||
<label class="form-check-label"> | ||
<input | ||
class="form-check-input" | ||
type="checkbox" | ||
id="bulk_action_select_all" | ||
onclick="$('#product_catalog_list').find('table td.checkbox-column input:checkbox').prop('checked', $(this).prop('checked')); updateBulkMenu();" | ||
value="" | ||
> | ||
{{ "Select all"|trans({}, 'Admin.Actions') }} | ||
</label> | ||
</div> | ||
{% endblock %} | ||
|
||
{% block product_catalog_filter_bulk_actions %} | ||
<div | ||
class="col-md-2" | ||
bulkurl="{{ path('admin_product_bulk_action', {'action': 'activate_all'}) }}" | ||
massediturl="{{ path('admin_product_mass_edit_action', {'action': 'sort'}) }}" | ||
redirecturl="{{ path('admin_product_catalog', {'limit': limit, 'offset': offset, 'orderBy': orderBy, 'sortOrder': sortOrder}) }}" | ||
redirecturlnextpage="{{ path('admin_product_catalog', {'limit': limit, 'offset': offset+limit, 'orderBy': orderBy, 'sortOrder': sortOrder}) }}" | ||
> | ||
{% set buttons_action = [ | ||
{ | ||
"onclick": "bulkProductAction(this, 'activate_all');", | ||
"icon": "radio_button_checked", | ||
"label": "Activate selection"|trans({}, 'Admin.Actions') | ||
}, | ||
{ | ||
"onclick": "bulkProductAction(this, 'deactivate_all');", | ||
"icon": "radio_button_unchecked", | ||
"label": "Deactivate selection"|trans({}, 'Admin.Actions') | ||
} | ||
] %} | ||
|
||
{% set buttons_action = buttons_action|merge([ | ||
{ | ||
"divider": true | ||
}, | ||
{ | ||
"onclick": "bulkProductAction(this, 'duplicate_all');", | ||
"icon": "content_copy", | ||
"label": "Duplicate selection"|trans({}, 'Admin.Actions') | ||
} | ||
]) %} | ||
|
||
|
||
{% set buttons_action = buttons_action|merge([ | ||
{ | ||
"divider": true | ||
}, | ||
{ | ||
"onclick": "bulkProductAction(this, 'delete_all');", | ||
"icon": "delete", | ||
"label": "Delete selection"|trans({}, 'Admin.Actions') | ||
} | ||
]) %} | ||
|
||
{% include 'PrestaShopBundle:Admin/Helpers:dropdown_menu.html.twig' with { | ||
'div_style': "btn-group dropup bulk-catalog", | ||
'button_id': "product_bulk_menu", | ||
'disabled': true, | ||
'menu_label': "Bulk actions"|trans({}, 'Admin.Global'), | ||
'buttonType': "outline-secondary", | ||
'menu_icon': "icon-caret-up", | ||
'items': buttons_action | ||
}%} | ||
</div> | ||
{% endblock %} | ||
|
||
{% block product_catalog_filter_by_categories %} | ||
<div id="product_catalog_category_tree_filter" class="col-md-3"> | ||
<button | ||
class="btn btn-outline-secondary" | ||
data-toggle="collapse" | ||
data-target="#tree-categories" | ||
> | ||
{{ 'Filter by categories'|trans({}, 'Admin.Actions') }} | ||
<i class="material-icons">expand_more</i> | ||
</button> | ||
<div id="tree-categories" class="collapse pt-1"> | ||
<a | ||
class="categories-tree-actions" | ||
href="#" | ||
name="product_catalog_category_tree_filter_expand" | ||
onclick="productCategoryFilterExpand($('div#product_catalog_category_tree_filter'), this);" | ||
id="product_catalog_category_tree_filter_expand" | ||
> | ||
<i class="material-icons">expand_more</i> | ||
{{ 'Expand'|trans({}, 'Admin.Actions') }} | ||
</a> | ||
<a | ||
class="categories-tree-actions" | ||
href="#" | ||
name="product_catalog_category_tree_filter_collapse" | ||
onclick="productCategoryFilterCollapse($('div#product_catalog_category_tree_filter'), this);" | ||
id="product_catalog_category_tree_filter_collapse" | ||
> | ||
<i class="material-icons">expand_less</i> | ||
{{ 'Collapse'|trans({}, 'Admin.Actions') }} | ||
</a> | ||
<a | ||
class="categories-tree-actions" | ||
href="#" | ||
name="product_catalog_category_tree_filter_reset" | ||
onclick="productCategoryFilterReset($('div#product_catalog_category_tree_filter'));" | ||
id="product_catalog_category_tree_filter_reset" | ||
> | ||
<i class="material-icons">radio_button_unchecked</i> | ||
{{ 'Unselect'|trans({}, 'Admin.Actions') }} | ||
</a> | ||
<hr> | ||
{{ form_widget(categories) }} | ||
</div> | ||
</div> | ||
{% endblock %} | ||
</div> |
43 changes: 43 additions & 0 deletions
43
src/PrestaShopBundle/Resources/views/Admin/Product/CatalogPage/Blocks/tooltips.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,43 @@ | ||
{#** | ||
* 2007-2017 PrestaShop | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Open Software License (OSL 3.0) | ||
* that is bundled with this package in the file LICENSE.txt. | ||
* It is also available through the world-wide-web at this URL: | ||
* https://opensource.org/licenses/OSL-3.0 | ||
* If you did not receive a copy of the license and are unable to | ||
* obtain it through the world-wide-web, please send an email | ||
* to license@prestashop.com so we can send you a copy immediately. | ||
* | ||
* DISCLAIMER | ||
* | ||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer | ||
* versions in the future. If you wish to customize PrestaShop for your | ||
* needs please refer to http://www.prestashop.com for more information. | ||
* | ||
* @author PrestaShop SA <contact@prestashop.com> | ||
* @copyright 2007-2017 PrestaShop SA | ||
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) | ||
* International Registered Trademark & Property of PrestaShop SA | ||
*#} | ||
<div class="row"> | ||
<div class="col-md-12"> | ||
<div class="float-right"> | ||
{{ renderhook('displayDashboardToolbarIcons', {}) }} | ||
<a id="desc-product-export" class="list-toolbar-btn" href="{{ path('admin_product_export_action') }}"> | ||
{{ ps.tooltip(("Export"|trans({}, 'Admin.Actions')), 'cloud_upload') }} | ||
</a> | ||
<a id="desc-product-import" class="list-toolbar-btn" href="{{ import_link }}"> | ||
{{ ps.tooltip(("Import"|trans({}, 'Admin.Actions')), 'cloud_download') }} | ||
</a> | ||
<a id="desc-product-show-sql" class="list-toolbar-btn" href="javascript:void(0);" onclick="showLastSqlQuery();"> | ||
{{ ps.tooltip(("Show SQL query"|trans({}, 'Admin.Actions')), 'code') }} | ||
</a> | ||
<a id="desc-product-sql-manager" class="list-toolbar-btn" href="javascript:void(0);" onclick="sendLastSqlQuery(createSqlQueryName());"> | ||
{{ ps.tooltip(("Export to SQL Manager"|trans({}, 'Admin.Actions')), 'storage') }} | ||
</a> | ||
</div> | ||
</div> | ||
</div> |
File renamed without changes.
74 changes: 74 additions & 0 deletions
74
src/PrestaShopBundle/Resources/views/Admin/Product/CatalogPage/Forms/form_products.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,74 @@ | ||
{#** | ||
* 2007-2017 PrestaShop | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Open Software License (OSL 3.0) | ||
* that is bundled with this package in the file LICENSE.txt. | ||
* It is also available through the world-wide-web at this URL: | ||
* https://opensource.org/licenses/OSL-3.0 | ||
* If you did not receive a copy of the license and are unable to | ||
* obtain it through the world-wide-web, please send an email | ||
* to license@prestashop.com so we can send you a copy immediately. | ||
* | ||
* DISCLAIMER | ||
* | ||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer | ||
* versions in the future. If you wish to customize PrestaShop for your | ||
* needs please refer to http://www.prestashop.com for more information. | ||
* | ||
* @author PrestaShop SA <contact@prestashop.com> | ||
* @copyright 2007-2017 PrestaShop SA | ||
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) | ||
* International Registered Trademark & Property of PrestaShop SA | ||
*#} | ||
<form | ||
name="product_catalog_list" | ||
id="product_catalog_list" | ||
method="post" | ||
action="{{ path('admin_product_catalog', {'limit': limit, 'orderBy': orderBy, 'sortOrder': sortOrder}) }}" | ||
orderingurl="{{ path('admin_product_catalog', {'limit': limit, 'orderBy': 'name', 'sortOrder': 'asc'}) }}" | ||
newproducturl="{{ path('admin_product_new') }}" | ||
> | ||
<div class="row"> | ||
<div class="col-md-12"> | ||
<input type="hidden" name="filter_category" value="{{ filter_category|default('') }}" /> | ||
</div> | ||
</div> | ||
|
||
<div class="row"> | ||
<div class="col-md-12"> | ||
{% block product_catalog_form_table %} | ||
{{ include('@Product/CatalogPage/Lists/products_table.html.twig', { | ||
'limit': limit, | ||
'orderBy': orderBy, | ||
'offset': offset, | ||
'sortOrder': sortOrder, | ||
'filter_category': filter_category, | ||
'filter_column_id_product': filter_column_id_product, | ||
'filter_column_name': filter_column_name, | ||
'filter_column_reference': filter_column_reference, | ||
'filter_column_name_category': filter_column_name_category, | ||
'filter_column_price': filter_column_price, | ||
'filter_column_sav_quantity': filter_column_sav_quantity, | ||
'filter_column_active':filter_column_active, | ||
'has_category_filter': has_category_filter, | ||
'activate_drag_and_drop': activate_drag_and_drop, | ||
'products': products, | ||
'last_sql': last_sql | ||
}) | ||
}} | ||
{% endblock %} | ||
</div> | ||
</div> | ||
|
||
{% if product_count_filtered > 20 %} | ||
<div class="row"> | ||
<div class="col-md-12"> | ||
{{ render(controller('PrestaShopBundle:Admin\\Common:pagination', | ||
{'limit': limit, 'offset': offset, 'total': product_count_filtered, 'caller_parameters': pagination_parameters, 'limit_choices': pagination_limit_choices})) | ||
}} | ||
</div> | ||
</div> | ||
{% endif %} | ||
</form> |
Oops, something went wrong.