-
Notifications
You must be signed in to change notification settings - Fork 4.7k
/
list.html.twig
140 lines (135 loc) · 5.93 KB
/
list.html.twig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
{#**
* 2007-2018 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-2018 PrestaShop SA
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*#}
<tbody
{% if activate_drag_and_drop and has_category_filter %}class="sortable"{% endif %}
last_sql="{{ last_sql_query|escape('html_attr') }}"
>
{% for product in products %}
{% block product_catalog_form_table_row %}
<tr data-uniturl="{{ product.unit_action_url|default('#') }}" data-product-id="{{ product.id_product }}">
<td class="checkbox-column form-group">
<div class="md-checkbox md-checkbox-inline">
<label>
<input type="checkbox" id="bulk_action_selected_products-{{ product.id_product }}" name="bulk_action_selected_products[]" value="{{ product.id_product }}">
<i class="md-checkbox-control"></i>
</label>
</div>
</td>
<td>
<label class="form-check-label" for="bulk_action_selected_products-{{ product.id_product }}">
{{ product.id_product }}
</label>
</td>
<td>
<a href="{{ product.url|default('') }}#tab-step1">{{ product.image|raw }}</a>
</td>
<td>
<a href="{{ product.url|default('') }}#tab-step1">{{ product.name|default('N/A'|trans({}, 'Admin.Global')) }}</a>
</td>
<td>
{{ product.reference|default('') }}
</td>
<td>
{{ product.name_category|default('') }}
</td>
<td class="text-center">
<a href="{{ product.url|default('') }}#tab-step2">{{ product.price|default('N/A'|trans({}, 'Admin.Global')) }}</a>
</td>
{% if 'PS_STOCK_MANAGEMENT'|configuration %}
<td class="product-sav-quantity text-center" data-product-quantity-value="{{ product.sav_quantity|default('') }}">
<a href="{{ product.url|default('') }}#tab-step3">
{% if product.sav_quantity is defined and product.sav_quantity > 0 %}
{{ product.sav_quantity }}
{% else %}
{{ product.sav_quantity|default('N/A'|trans({}, 'Admin.Global')) }}
{% endif %}
</a>
</td>
{% else %}
<td></td>
{% endif %}
<td class="text-center">
{% if product.active|default(0) == 0 %}
<a href="#" onclick="unitProductAction(this, 'activate'); return false;">
<i class="material-icons action-disabled">clear</i>
</a>
{% else %}
<a href="#" onclick="unitProductAction(this, 'deactivate'); return false;">
<i class="material-icons action-enabled ">check</i>
</a>
{% endif %}
</td>
{% if product.position is defined %}
<td {% if activate_drag_and_drop %}class="placeholder"{% endif %} style="cursor: pointer; cursor: hand;">
{% if activate_drag_and_drop %}
<big><big>⇅</big></big>
{% endif %}
<span class="position">{{ product.position }}</span>
<input type="hidden" name="mass_edit_action_sorted_products[]" value="{{ product.id_product }}" />
<input type="hidden" name="mass_edit_action_sorted_positions[]" value="{{ product.position }}" />
</td>
{% endif %}
<td class="text-right">
<div class="btn-group-action">
{% set buttons_action = [
{
"href": product.preview_url|default('#'),
"target": "_blank",
"icon": "remove_red_eye",
"label": "Preview"|trans({}, 'Admin.Actions')
}
] %}
{% set buttons_action = buttons_action|merge([
{
"onclick": "unitProductAction(this, 'duplicate');",
"icon": "content_copy",
"label": "Duplicate"|trans({}, 'Admin.Actions')
}
]) %}
{% set buttons_action = buttons_action|merge([
{
"onclick": "unitProductAction(this, 'delete');",
"icon": "delete",
"label": "Delete"|trans({}, 'Admin.Actions')
}
]) %}
{% include '@Product/CatalogPage/Forms/form_edit_dropdown.html.twig' with {
'button_id': "product_list_id_" ~ product.id_product ~ "_menu",
'default_item': {
"href": product.url|default('#'),
"icon": "mode_edit"
},
'right': true,
'items': buttons_action
} %}
</div>
</td>
</tr>
{% endblock %}
{% else %}
<tr><td colspan="11">
{{ "There is no result for this search. Update your filters to view other products."|trans({}, 'Admin.Catalog.Notification') }}
</td></tr>
{% endfor %}