{% extends 'layouts/main-layout.html' %} {% block content %}

产品

{% if perms.authentication.add_product %}
{% endif %}
{% if page_object %}
{% if request.user.is_superuser %} {% endif %}
{% endif %} {% if perms.authentication.delete_product or perms.authentication.view_product or perms.authentication.edit_product %} {% endif %} {% if page_object %} {% for products in page_object %} {% endfor %} {% else %} {% endif %}
序号 产品图片 产品名称 产品类型 产品类别 状态操作
{{page_object.start_index|add:forloop.counter0}} {% if products.product_picture %} {% else %} Not Uploaded {% endif %} {{products.name}} {{products.product_type}} {% if products.product_type.is_deleted %} {% endif %} {{products.product_category}} {% if products.product_category.is_deleted %} {% endif %} {% if request.user.is_superuser %}
{% else %} {% if products.status %} Active {% else %} Inactive {% endif %} {% endif %}
{% if perms.authentication.view_product %} {% endif %} {% if perms.authentication.edit_product %} {% endif %} {% if perms.authentication.delete_product %}
{% csrf_token %}
{% endif %}
{% include 'commons/pagination.html' %}
{% endblock content%}