{% extends 'D2ShopBundle::base_admin.html.twig' %} {% block head_script_extra %} {% endblock head_script_extra %} {% block page_header %}
{{ with_selected_form('shop_product_list') }}

{% for k, v in app.request.query %} {% if k|lower not in ['search', 'page', 'status', 'approved', 'account'] %} {% endif %} {% endfor %}
New
Displaying {{ (shop_products.getCurrentPageNumber()-1) * shop_products.getItemNumberPerPage() + 1 }} to {{ ((shop_products.getCurrentPageNumber()-1) * shop_products.getItemNumberPerPage()) + (shop_products.getItems()|length) }} of {{ shop_products.getTotalItemCount() }} {% trans %}Product{% endtrans %} records
{% endblock page_header %} {% block content %}
{% for entity in shop_products %} {% endfor %}
{{ knp_pagination_sortable(shop_products, 'Status', 's.enabled') }} {{ knp_pagination_sortable(shop_products, 'Approved', 's.approved') }} {{ knp_pagination_sortable(shop_products, 'Product Image', 's.orig_path') }} {{ knp_pagination_sortable(shop_products, 'Product Name', 's.product_name') }} {{ knp_pagination_sortable(shop_products, 'Product Code', 's.product_code') }} {{ knp_pagination_sortable(shop_products, 'Sales Item', 'si.sales_code') }} Attributes {{ knp_pagination_sortable(shop_products, 'Price (Excl)', 's.product_price') }} {{ knp_pagination_sortable(shop_products, 'Weight (Kg)', 's.product_weight') }} {{ knp_pagination_sortable(shop_products, 'Volume (M3)', 's.product_volume') }} {{ knp_pagination_sortable(shop_products, 'Date', 's.date') }}
{{ with_selected_checkbox('shop_product_list', entity.id) }} {{ entity.enabled ? 'Enabled' : 'Disabled' }} {{ entity.approved ? 'Approved' : 'Not Approved' }} {{ entity.origPath|trim }} {{ entity.productName|trim }} {{ entity.productCode|trim }} {{ entity.salesItem.salesCode|trim }} {% if entity.attributes|length > 0 %} {% for attr in entity.attributes %} {% if is_granted('ROLE_ADMIN_SHOP_MANAGE') %} [{{ attr.attributeName|trim }}] {% else %} [{{ attr.attributeName|trim }}] {% endif %} {% endfor %} {% endif %} {{ entity.productPrice|number_format(2, '.', '') }} {{ entity.productWeight|number_format(2, '.', '') }} {{ entity.productVolume|number_format(2, '.', '') }} {{ entity.date|date("Y/m/d") }}
{% endblock content %}